-
Notifications
You must be signed in to change notification settings - Fork 67
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
automation/deployer: respect PR label deployer:skip-deploy
#4065
automation/deployer: respect PR label deployer:skip-deploy
#4065
Conversation
d8c70de
to
80ef99b
Compare
f"support-and-staging-matrix-jobs={json.dumps(support_and_staging_matrix_jobs)}" | ||
f"support-and-staging-matrix-jobs={json.dumps(support_and_staging_matrix_jobs)}\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an PR unrelated fix - when we write to the file path $GITHUB_ENV
, it should always get full lines written to it. Otherwise we could get lines like MY_ENV=testSOMEOTHER_ENV=value
@yuvipanda I requested your review since you were involved in discussion about this in #2009 - focusing on the work patterns it leads to for 2i2c engineers rather than the technical implementation, is this an acceptable change to you? EDIT: From a video meet with Yuvi, I understand no objection is raised. |
deployer:skip-deploy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@consideRatio, sorry if it's a silly question, I didn't spent much time reasoning about it, but why have the label special cased in the deployer and not inside the workflow itself, maybe similar to
infrastructure/.github/workflows/project-board-update.yml
Lines 7 to 11 in 296d855
jobs: | |
update-project-board-fields: | |
if: github.event.label.name == 'support' | |
runs-on: ubuntu-latest | |
steps: |
The crux is that the information that is available in context under For Due to that, I ended up adding a job step to get the associated PRs labels adjusting for the context on how to acquire it - I'll add a comment clarifying this next to the step. |
🎉🎉🎉🎉 Monitor the deployment of the hubs here 👉 https://github.com/2i2c-org/infrastructure/actions/runs/9115204920 |
I'll go for a merge here to not add overhead of thinking about the planning - I've performed self-review of this and think its acceptable to merge without further review by someone else. |
@consideRatio, would you be willing to document this label and when to use it (maybe in our SRE section)? I'm not suggesting to think up-front about all possible scenarios, but while you notice yourself using it, I think it would be very useful for others on the team to have it documented and to understand when it it's beneficial to skip the deploy. |
I wanted this a lot in order to:
#gha-failures
for manually cancelled workloads, and to not need to comment that it was just a intentionally cancelled workloadI also wanted this for some additional reasons, like reducing cloud costs for communities and reducing risk of #3214 further, but the main reasons motivating me now to implement this feature was those above.
Review notes
deployer
code changes is partially tested by added tests, where this PR triggered a run that tested the remaining partsThe PR comment made listing what gets deployed won't get updated once the
deployer:skip-deploy
label gets added. This is also the case if you first push a commit that leads to a deploy, and then reverts the commit. There is no logic to delete an existing comment or update it to declare nothing will get deployed in those situations.