-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
LinuxTools builders fails to (mabye?) push at the end of PR builds #62811
Labels
T-infra
Relevant to the infrastructure team, which will review and decide on the PR/issue.
Comments
alexcrichton
added
the
T-infra
Relevant to the infrastructure team, which will review and decide on the PR/issue.
label
Jul 19, 2019
I believe I hit this in when updating RLS in #62805 (comment) |
Merged
So is it expected that all PR builds currently fail with this error on the LinuxTools builder? EDIT: Ah nevermind, only PRs that update submodules. |
Merged
Merged
Centril
added a commit
to Centril/rust
that referenced
this issue
Jul 25, 2019
…lexcrichton ci: gate toolstate repo pushes on the TOOLSTATE_PUBLISH envvar This PR fixes toolstate failing to push on the LinuxTools PR builder by gating the pushes on the new `TOOLSTATE_PUBLISH` environment variable, which is set on prod credentials but not on the PR ones. The old code checked whether the access token was set, but that doesn't work due to an Azure quirk. For a bit of background, secret environment variables are not available by default, but each step needs to explicitly declare which secret vars to load: ```yaml - bash: echo foo env: SECRET_VAR: $(SECRET_VAR) ``` This works fine when the variable is present but when it's missing, instead of setting `SECRET_VAR` to an empty string or just not setting it at all, Azure Pipelines puts the literal `$(SECRET_VAR)` as the content, which completly breaks the old check we had. I tried almost every thing to make this work in a sensible way, and the only conclusion I reached is to set the variable at the top level with the runtime expression evaluation syntax, which sets the variable to an empty string if missing: ```yaml # At the top: variables: - name: MAYBE_SECRET_VAR value: $[ variables.MAYBE_SECRET_VAR ] # In the step: - bash: echo foo env: SECRET_VAR: $(MAYBE_SECRET_VAR) ``` While that *could've worked* it was ugly and messy, so I just opted to add yet another non-secret variable. r? @alexcrichton fixes rust-lang#62811
Centril
added a commit
to Centril/rust
that referenced
this issue
Jul 26, 2019
…lexcrichton ci: gate toolstate repo pushes on the TOOLSTATE_PUBLISH envvar This PR fixes toolstate failing to push on the LinuxTools PR builder by gating the pushes on the new `TOOLSTATE_PUBLISH` environment variable, which is set on prod credentials but not on the PR ones. The old code checked whether the access token was set, but that doesn't work due to an Azure quirk. For a bit of background, secret environment variables are not available by default, but each step needs to explicitly declare which secret vars to load: ```yaml - bash: echo foo env: SECRET_VAR: $(SECRET_VAR) ``` This works fine when the variable is present but when it's missing, instead of setting `SECRET_VAR` to an empty string or just not setting it at all, Azure Pipelines puts the literal `$(SECRET_VAR)` as the content, which completly breaks the old check we had. I tried almost every thing to make this work in a sensible way, and the only conclusion I reached is to set the variable at the top level with the runtime expression evaluation syntax, which sets the variable to an empty string if missing: ```yaml # At the top: variables: - name: MAYBE_SECRET_VAR value: $[ variables.MAYBE_SECRET_VAR ] # In the step: - bash: echo foo env: SECRET_VAR: $(MAYBE_SECRET_VAR) ``` While that *could've worked* it was ugly and messy, so I just opted to add yet another non-secret variable. r? @alexcrichton fixes rust-lang#62811
Centril
added a commit
to Centril/rust
that referenced
this issue
Jul 26, 2019
…lexcrichton ci: gate toolstate repo pushes on the TOOLSTATE_PUBLISH envvar This PR fixes toolstate failing to push on the LinuxTools PR builder by gating the pushes on the new `TOOLSTATE_PUBLISH` environment variable, which is set on prod credentials but not on the PR ones. The old code checked whether the access token was set, but that doesn't work due to an Azure quirk. For a bit of background, secret environment variables are not available by default, but each step needs to explicitly declare which secret vars to load: ```yaml - bash: echo foo env: SECRET_VAR: $(SECRET_VAR) ``` This works fine when the variable is present but when it's missing, instead of setting `SECRET_VAR` to an empty string or just not setting it at all, Azure Pipelines puts the literal `$(SECRET_VAR)` as the content, which completly breaks the old check we had. I tried almost every thing to make this work in a sensible way, and the only conclusion I reached is to set the variable at the top level with the runtime expression evaluation syntax, which sets the variable to an empty string if missing: ```yaml # At the top: variables: - name: MAYBE_SECRET_VAR value: $[ variables.MAYBE_SECRET_VAR ] # In the step: - bash: echo foo env: SECRET_VAR: $(MAYBE_SECRET_VAR) ``` While that *could've worked* it was ugly and messy, so I just opted to add yet another non-secret variable. r? @alexcrichton fixes rust-lang#62811
Centril
added a commit
to Centril/rust
that referenced
this issue
Jul 26, 2019
…lexcrichton ci: gate toolstate repo pushes on the TOOLSTATE_PUBLISH envvar This PR fixes toolstate failing to push on the LinuxTools PR builder by gating the pushes on the new `TOOLSTATE_PUBLISH` environment variable, which is set on prod credentials but not on the PR ones. The old code checked whether the access token was set, but that doesn't work due to an Azure quirk. For a bit of background, secret environment variables are not available by default, but each step needs to explicitly declare which secret vars to load: ```yaml - bash: echo foo env: SECRET_VAR: $(SECRET_VAR) ``` This works fine when the variable is present but when it's missing, instead of setting `SECRET_VAR` to an empty string or just not setting it at all, Azure Pipelines puts the literal `$(SECRET_VAR)` as the content, which completly breaks the old check we had. I tried almost every thing to make this work in a sensible way, and the only conclusion I reached is to set the variable at the top level with the runtime expression evaluation syntax, which sets the variable to an empty string if missing: ```yaml # At the top: variables: - name: MAYBE_SECRET_VAR value: $[ variables.MAYBE_SECRET_VAR ] # In the step: - bash: echo foo env: SECRET_VAR: $(MAYBE_SECRET_VAR) ``` While that *could've worked* it was ugly and messy, so I just opted to add yet another non-secret variable. r? @alexcrichton fixes rust-lang#62811
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Discovered through #62766 the end of a build failed with:
That could be a weird unauthenticated pull from GitHub but I suspect that it's a push which will inevitably fail. I think we haven't configured the toolstate builder to not do anything on PRs on push?
The text was updated successfully, but these errors were encountered: