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

Remove create-stable-version action and use regexes #2423

Merged
merged 5 commits into from
Nov 27, 2024

Conversation

MitchLillie
Copy link
Contributor

Background

This automation didn't quite work due to missing perms, and it was a bit clunky anyways as the PR this attempted to create needs to be merged before the action runs.

Solution

(Describe your solution, why this approach was chosen, and what the alternatives/impacts may be)

🎩

  • ...

Checklist

  • I have 🎩'd these changes
  • I have updated relevant documentation

Comment on lines -36 to -45
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.SHOPIFY_GH_ACCESS_TOKEN }}
commit-message: 'Add ${{ github.event.inputs.version }} to watched branches'
title: 'Add ${{ github.event.inputs.version }} to watched branches'
body: 'This PR adds the new stable version ${{ github.event.inputs.version }} to the list of watched branches in the changesets-reminder and deploy GitHub actions.'
branch: 'update-watched-branches-${{ github.event.inputs.version }}'
base: '${{ github.event.inputs.version }}'

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are removing the PR that gets created, but you still create the branch with the updated GH action files? I'm not sure if I understand correctly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a different PR: to update the Github action yml files. It requires some special permissions in order for a GH app to edit action yml.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean that you are still actually updating the files in the workflow, so I think you'd want to remove that too?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh I see what you mean. Yes good call, we don't need that either.

Copy link
Contributor

@jamesvidler jamesvidler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see a slight problem with this existing workflow. We update the "latest version" variable a little too early in the process. Sometimes a stable version might be cut for days before it actually ships.

Consider that we create a branch for 2025-01 and the "latest version" is updated to that. But, while it is in review a patch was shipped for 2024-10. 2024-10 is still technically the latest version, but it won't get tagged as "latest" because the "latest version" variable has already been updated to 2025-01.

Maybe we can find another way to identify the "latest" version?

@MitchLillie MitchLillie force-pushed the ml/new-version-action branch from d63d323 to 16e798c Compare November 22, 2024 21:57
@MitchLillie MitchLillie changed the title Add back manual watched branches step Remove create-stable-version action and use regexes Nov 22, 2024
@MitchLillie
Copy link
Contributor Author

@jamesvidler Good point. If we remove that part, all the action did was create a new branch which isn't very helpful. I updated the PR to remove the new action entirely and use the new regexes where appropriate.

Copy link
Contributor

@jamesvidler jamesvidler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for driving improvements on this process 🙏

@@ -12,6 +12,7 @@ on:
- 2024-07
- 2024-10
- unstable
- 20[0-9][0-9]-[01][1470]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love this! When we we are a 100 year company, we'll need to remember and come back to update this 🥇.

documentation/versions-and-deploys.md Outdated Show resolved Hide resolved
@MitchLillie MitchLillie merged commit 4a113ea into unstable Nov 27, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants