Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manually running CI jobs dist-various-{1,2} complains about missing metrics.json #112561

Open
pjhades opened this issue Jun 12, 2023 · 0 comments
Labels
A-contributor-roadblock Area: Makes things more difficult for new contributors to rust itself T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.

Comments

@pjhades
Copy link
Contributor

pjhades commented Jun 12, 2023

I ran the CI jobs dist-various-{1,2} manually by editing src/ci/github-actions/ci.yml but the jobs failed with the following error:

cp: cannot stat 'obj/build/metrics.json': No such file or directory

However I didn't touch anything on metrics. If I understand correctly, the cause of this error is:

  • Build metrics were not enabled, because GITHUB_REF=refs/pull/111626/merge was defined in the environment, according to this logic.
  • Build artifacts were asked to be uploaded, because DEPLOY=1 was defined in the environment, according to this logic.

I only ran dist-various-{1,2} but I guess that if other dist-* jobs are run manually, the same error would happen, because these jobs would have DEPLOY=1 or DEPLOY_ALT=1 but metrics would not be enabled as GITHUB_REF would be refs/pull/<PULL_REQUEST_ID>/merge.

I think this is somewhat confusing to people who want to use CI to test their PRs, because without this error their PRs could have passed the CI. I'm not sure what would be a good fix for this, maybe we could define an environment variable when build metrics are enabled, and check this variable before we fetch metrics.json. Or at least the problem could be mentioned in the document.

@jyn514 jyn514 added T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. A-contributor-roadblock Area: Makes things more difficult for new contributors to rust itself labels Jun 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-contributor-roadblock Area: Makes things more difficult for new contributors to rust itself T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

2 participants