Split create_draft_release worfklow into hotfix / normal#7601
Split create_draft_release worfklow into hotfix / normal#7601
create_draft_release worfklow into hotfix / normal#7601Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting
andrewlock
left a comment
There was a problem hiding this comment.
Thanks for doing this! And great call RE leaving the existing workflow in place
| description: 'Is this a hotfix release? If true, skips vNext milestone renaming' | ||
| required: true | ||
| type: boolean | ||
| secrets: |
| steps: | ||
| - name: Verify running on main release branch | ||
| run: | | ||
| if [[ "${{ github.ref }}" != "refs/heads/master" ]]; then |
There was a problem hiding this comment.
Technically we may need to do this from a "release" branch in the future too, but we can 100% deal with that if it comes to it
| # We don't rename vNext/vNext-v1 for hotfix releases | ||
| if: ${{ !inputs.is_hotfix && !contains(github.ref, 'hotfix') }} |
There was a problem hiding this comment.
Isn't the contains(github.ref, 'hotfix') superfluous? 🤔 Given we're explicitly providing a variable saying it's a hotfix, I think it might be better to just use that, otherwise the checks could get out of sync?
There was a problem hiding this comment.
Yeah that is a good point I can swap it to just using the is_hotfix
Initially my thought was just as a layer of extra protection, but yeah definitely see how this can cause it to be out of sync
0f09cdc to
a18ef5e
Compare
Summary of changes
This creates two new GitHub workflows: one to create a draft hotfix release and another to create a normal draft release.
Reason for change
During the recent hotfixes I accidentally ran the current
create_draft_releaseworkflow on themasterbranch (but it failed). If this would have succeeded we would have pushed the 3.27.0 artifacts to NuGet too soon when we just wanted to push3.26.3artifacts from that hotfix branch.Splitting this helps prevent that from happening in the future.
Implementation details
.github/workflows/_create_draft_release.ymlcreate_draft_release.yml- I copy/pasted that one. I'll paste below in "Other details" the diff between the files.github/workflows/create_hotfix_draft_release.ymlhotfix/*branchesvNextmilestone (main difference)create_draft_release.ymlwould do if ran against ahotfix/branch.github/workflows/create_normal_draft_release.ymlmaster<- we can consider allowing others at a later point, but we don't have any other release lines that we currently supportcreate_draft_release.ymlwould do if ran onmasterTest coverage
None!
Other details
Note that I have NOT removed the current
create_draft_releaseworkflow. This is to ensure that when it comes time to release if these new workflows do not work that we won't be blocked. Testing workflows is always a bit challenging 🤷I can try to see if this works in a fork though if that is desired :)
https://datadoghq.atlassian.net/browse/LANGPLAT-833