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

[DNM] Post-"ghost"-release hotfix workflow #8264

Draft
wants to merge 10 commits into
base: develop
Choose a base branch
from

Conversation

angusbayley
Copy link
Contributor

@angusbayley angusbayley commented Oct 31, 2024

⚠️ DO NOT MERGE - must be merged in sync with global hotfix process change

Ticket here

This PR implements the new hotfix process for targeting arbitrary past releases to issue a hotfix for

Create hotfix branch from any release

This modifies the existing create hotfix workflow to accept parameters for version and application. Specifying these values allows you to create a hotfix branch at the point of any previous release

Screenshot 2024-10-31 at 15 19 15
  • version is optional, and if unspecified defaults to "latest" - a special keyword that bypasses the tag finding process (see below), instead creating the hotfix branch from main just as the workflow did before this PR
  • application is mandatory and is implemented as a choice dropdown with LLM and LLD as the only two options

If version is specified it is reformatted into a tag using the specified application, e.g. version 2.91.0 + LLD will be reformatted into a the tag for the 2.91.0 release @ledgerhq/live-desktop@2.91.0. This is then used to checkout the repo prior to the remaining hotfix steps.

Bonus: the version + application being targeted is appended to the hotfix PR title:

Screenshot 2024-11-01 at 11 19 57

Edge case behaviour:

  • when someone deletes the default value in version and submits it as empty: it falls back to a ref of main (test run)
  • when version is a non-existent version: git fetch fails during the checkout action (test run).

Implement new hotfixing process in release-prepare-hotfix

The PR also:

  • enforces patch changesets only on the hotfix branch during the release-prepare-hotfix workflow
    • here's a test run of this working as expected
    • to run this workflow you must now re-specify the application and tag to target. I don't love this, but haven't thought about a slick and low complexity way to handle this automatically yet
  • removes workflow steps for merging the hotfix branch back into main and develop

To confirm, the new process is:

  1. make updates made on the hotfix branch
  2. publish packages, create production build from the hotfix branch
  3. (don't merge back into main or develop)

Copy link

vercel bot commented Oct 31, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

5 Skipped Deployments
Name Status Preview Comments Updated (UTC)
ledger-live-docs ⬜️ Ignored (Inspect) Visit Preview Nov 1, 2024 3:03pm
ledger-live-github-bot ⬜️ Ignored (Inspect) Visit Preview Nov 1, 2024 3:03pm
native-ui-storybook ⬜️ Ignored (Inspect) Visit Preview Nov 1, 2024 3:03pm
react-ui-storybook ⬜️ Ignored (Inspect) Visit Preview Nov 1, 2024 3:03pm
web-tools ⬜️ Ignored (Inspect) Visit Preview Nov 1, 2024 3:03pm

@live-github-bot live-github-bot bot added the automation CI/CD stuff label Oct 31, 2024
@angusbayley angusbayley force-pushed the support/post-ghost-release-hotfix-workflow branch 4 times, most recently from 977ded9 to 5559f90 Compare October 31, 2024 15:11
@angusbayley angusbayley changed the title [DNM] Support/post ghost release hotfix workflow [DNM] Post-"ghost"-release hotfix workflow Oct 31, 2024
@angusbayley angusbayley force-pushed the support/post-ghost-release-hotfix-workflow branch from 322b8ce to 23c00a5 Compare November 1, 2024 11:59
fix: bad var name

pull develop, use --since on changeset status

fix step name, fetch depth for develop 0

only fetch develop at tag, dont check it out

get develop before checking out hotfix

git fetch tags first

ultra conservative checkout, see if this works
@angusbayley angusbayley force-pushed the support/post-ghost-release-hotfix-workflow branch from 23c00a5 to 3ebebec Compare November 1, 2024 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automation CI/CD stuff
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant