question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PR review companion seems flaky?

See original GitHub issue

On this build the PR review companion keep failing with the following stack:

Run actions/github-script@v5
  with:
    script: var artifacts = await github.rest.actions.listWorkflowRunArtifacts({
     owner: context.repo.owner,
     repo: context.repo.repo,
     run_id: 1480759121,
  });
  var matchArtifacts = artifacts.data.artifacts.filter((artifact) => {
    return artifact.name == "build"
  });
  if (matchArtifacts.length === 0) {
    console.warn(
      'No artifacts to download probably just means nothing ' +
      'was built in the "PR test" workflow. That\'s OK. ' +
      'This is actually not a genuine CI error.'
    );
    throw new Error(
      'No matched build artifacts. ' +
      'Perhaps nothing built in the "PR test" workflow'
    );
  }
  var matchArtifact = matchArtifacts[0];
  var download = await github.rest.actions.downloadArtifact({
      owner: context.repo.owner,
      repo: context.repo.repo,
      artifact_id: matchArtifact.id,
      archive_format: 'zip',
  });
  var fs = require('fs');
  fs.writeFileSync('/home/runner/work/content/content/build.zip', Buffer.from(download.data));
  
    github-token: ***
    debug: false
    user-agent: actions/github-script
    result-encoding: json
(node:1562) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
No artifacts to download probably just means nothing was built in the "PR test" workflow. That's OK. This is actually not a genuine CI error.
Error: No matched build artifacts. Perhaps nothing built in the "PR test" workflow
    at eval (eval at callAsyncFunction (/home/runner/work/_actions/actions/github-script/v5/dist/index.js:4942:56), <anonymous>:17:9)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async main (/home/runner/work/_actions/actions/github-script/v5/dist/index.js:4997:20)
Error: Unhandled error: Error: No matched build artifacts. Perhaps nothing built in the "PR test" workflow

We recently changes github.actions.listWorkflowRunArtifacts to github.rest.actions.listWorkflowRunArtifacts because of the breaking change in the underlying GitHub action. The same change was made by @SphinxKnight on translated-content. It looks like the error is not related to the change, but based on the fact that there was no artefacts. However, there is this console.warn in the code:

console.warn(
      'No artifacts to download probably just means nothing ' +
      'was built in the "PR test" workflow. That\'s OK. ' +
      'This is actually not a genuine CI error.'
    );

There is also this run that did not error. We will need to have a look at what the actual cause is and resolve the issue.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:2
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
wbambergcommented, Nov 23, 2021

FWIW I’m also not seeing built pages for https://github.com/mdn/content/pull/10646 (the first time it worked, but after review the author made some changes, and those I am not seeing).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Reviews: A Prairie Home Companion - IMDb
Lily Tomlin and Meryl have the best moments in the film. They appear, look and sound as if they had been working together...
Read more >
The Best Carry-On Travel Backpacks - The New York Times
Though these backpacks are great as companion bags for any trip, they're designed to ultimately replace all of your other luggage and become ......
Read more >
Gawith, Hoggarth & Co. - Kendal Flake - Tobacco Reviews
A stronger tobacco with light side proportions of 68% virginia and a dark side of nearly 1/3, including 16% dark-cured Indian leaf, provide...
Read more >
The Year in Sequels | The New Yorker
Andrew Sean Greer published “Less Is Lost,” a surprise companion to his ... In her review, Alexandra Schwartz raised an eyebrow at the ......
Read more >
Ali Smith's 'Companion Piece' connects plagues and artists ...
Review. Book Reviews. 'Companion Piece' connects two plagues and two female artists five centuries ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found