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

CI: fix publishing of toolstate history #126033

Merged
merged 1 commit into from
Jun 7, 2024

Conversation

Kobzol
Copy link
Contributor

@Kobzol Kobzol commented Jun 5, 2024

Hopefully fixes the upload of toolstate history that I broke in #125145. The problem is that the toolstate environment variables need to be available not just when updating latest.json through the Bash/Python script, but also in the main CI workflow, where history is updated in bootstrap (the toolstate logic is distributed in two places :/ ).

The only tricky thing is how to pass the token secret to the CI job, as I need to enable it only for privileged (auto/try) builds. I assume that the secret is filled only on rust-lang-ci, not on rust-lang, so I chose the easiest way of just configuring the environment variable globally. We'll see if that works on PR CI.

r? @ehuss

@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Jun 5, 2024
@ehuss
Copy link
Contributor

ehuss commented Jun 6, 2024

Thanks!

I believe PR-triggered jobs do not have access to the secret context, so even if the secret was set in the rust-lang/rust repository, it would be empty in the PR job.

Personally I would prefer to see secrets only set in very constrained jobs to reduce the chance of being compromised or exfiltrated in some way. However, previously it was on the run-build-from-ci.sh step which is a pretty huge step, and this secret probably is low on the list of important secrets.

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Jun 6, 2024

📌 Commit 2fe41c6 has been approved by ehuss

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 6, 2024
@Kobzol
Copy link
Contributor Author

Kobzol commented Jun 6, 2024

I believe PR-triggered jobs do not have access to the secret context, so even if the secret was set in the rust-lang/rust repository, it would be empty in the PR job.

Indeed, it is empty on PR jobs.

bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 6, 2024
…kingjubilee

Rollup of 12 pull requests

Successful merges:

 - rust-lang#125220 (Repair several `riscv64gc-unknown-linux-gnu` codegen tests)
 - rust-lang#126033 (CI: fix publishing of toolstate history)
 - rust-lang#126034 (Clarify our tier 1 Windows Server support)
 - rust-lang#126035 (Some minor query system cleanups)
 - rust-lang#126051 (Clarify an `x fmt` error.)
 - rust-lang#126059 (Raise `DEFAULT_MIN_STACK_SIZE` to at least 64KiB)
 - rust-lang#126064 (Migrate `run-make/manual-crate-name` to `rmake.rs`)
 - rust-lang#126072 (compiletest: Allow multiple `//@ run-flags:` headers)
 - rust-lang#126073 (Port `tests/run-make-fulldeps/obtain-borrowck` to ui-fulldeps)
 - rust-lang#126081 (Do not use relative paths to Rust source root in run-make tests)
 - rust-lang#126086 (use windows compatible executable name for libcxx-version)
 - rust-lang#126096 ([RFC-2011] Allow `core_intrinsics` when activated)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 835ceea into rust-lang:master Jun 7, 2024
6 checks passed
@rustbot rustbot added this to the 1.80.0 milestone Jun 7, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Jun 7, 2024
Rollup merge of rust-lang#126033 - Kobzol:fix-toolstate-history, r=ehuss

CI: fix publishing of toolstate history

Hopefully fixes the upload of toolstate history that I broke in rust-lang#125145. The problem is that the toolstate environment variables need to be available not just when updating `latest.json` through the Bash/Python script, but also in the main CI workflow, where `history` is updated in bootstrap (the toolstate logic is distributed in two places :/ ).

The only tricky thing is how to pass the token secret to the CI job, as I need to enable it only for privileged (`auto`/`try`) builds. I assume that the secret is filled only on `rust-lang-ci`, not on `rust-lang`, so I chose the easiest way of just configuring the environment variable globally. We'll see if that works on PR CI.

r? `@ehuss`
@Kobzol Kobzol deleted the fix-toolstate-history branch June 7, 2024 05:33
@Kobzol
Copy link
Contributor Author

Kobzol commented Jun 7, 2024

Looks like it works now (rust-lang-nursery/rust-toolstate@6aedc60).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants