-
Notifications
You must be signed in to change notification settings - Fork 106
ci(release): Switch from action-prepare-release to Craft #5527
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
base: master
Are you sure you want to change the base?
Conversation
This PR migrates from the deprecated action-prepare-release to the new Craft GitHub Actions (reusable workflow or composite action). Changes: - Migrate .github/workflows/release_library.yml to Craft reusable workflow
64b9e3e to
1736a75
Compare
Semver Impact of This PR🟢 Patch (bug fixes) 📋 Changelog PreviewThis is how your changes will appear in the changelog. New Features ✨
Bug Fixes 🐛
Build / dependencies / internal 🔧
🤖 This preview updates automatically when you update the PR. |
The previous migration incorrectly removed the GitHub App token authentication step. This commit restores it by switching to the composite action pattern which preserves the auth flow.
The previous migration incorrectly removed the GitHub App token authentication step. This commit restores it by switching to the composite action pattern which preserves the auth flow.
| name: Changelog Preview | ||
| on: | ||
| pull_request: | ||
| types: | ||
| - opened | ||
| - synchronize | ||
| - reopened | ||
| - edited | ||
| - labeled | ||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
|
|
||
| jobs: | ||
| changelog-preview: | ||
| uses: getsentry/craft/.github/workflows/changelog-preview.yml@v2 | ||
| secrets: inherit |
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.
I don't think we want this, also it does not use the changelog.md we actually curate.
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.
Yeah this only makes sense if you are using automated changelogs. Happy to remove but I also recommend giving automated changelogs a shot. It allows curation too: https://getsentry.github.io/craft/configuration/#custom-changelog-entries-from-pr-descriptions
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.
I am interested about the automated snapshots, but I'd like to review/look into that separately. From your presentation it sounds like the automated changelogs can possibly do what we're interested in now, but we still have a few workflows tied to the manual process.
| with: | ||
| version: ${{ github.event.inputs.version }} | ||
| force: ${{ github.event.inputs.force }} | ||
| version: ${{ inputs.version }} | ||
| force: ${{ inputs.force }} | ||
| calver: true |
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.
Bug: The release_binary.yml workflow passes calver: true as a parameter, but the required versioning.policy: calver is missing from the corresponding .craft.yml configuration file.
Severity: HIGH
🔍 Detailed Analysis
The pull request description states that .craft.yml was updated with versioning.policy: calver, but this change is not present in the code. Instead, the release_binary.yml workflow passes calver: true as a parameter to the getsentry/craft action. It is unconfirmed whether the action supports this parameter. If the action requires this configuration in .craft.yml, the binary release process will likely fail or use an incorrect versioning scheme, as the necessary configuration is missing.
💡 Suggested Fix
Verify if the getsentry/craft action supports the calver: true input parameter. If not, add versioning.policy: calver to the root .craft.yml file as described in the PR description and remove the calver parameter from the workflow file to ensure the release process uses the correct versioning.
🤖 Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: .github/workflows/release_binary.yml#L41-L44
Potential issue: The pull request description states that `.craft.yml` was updated with
`versioning.policy: calver`, but this change is not present in the code. Instead, the
`release_binary.yml` workflow passes `calver: true` as a parameter to the
`getsentry/craft` action. It is unconfirmed whether the action supports this parameter.
If the action requires this configuration in `.craft.yml`, the binary release process
will likely fail or use an incorrect versioning scheme, as the necessary configuration
is missing.
Did we get this right? 👍 / 👎 to inform future reviews.
Reference ID: 8472764
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.
@Dav1dde do we still have calver + semver in Relay
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.
Calver for self-hosted and binary releases, semver for (Python) library releases
| jobs: | ||
| changelog-preview: | ||
| uses: getsentry/craft/.github/workflows/changelog-preview.yml@v2 | ||
| secrets: inherit |
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.
Duplicate changelog workflow with incompatible changelog mechanism
Medium Severity
This new workflow adds a Craft-based changelog preview that runs on the same PR events as the existing changelog.yml workflow. The project uses a custom changelog system (via .github/actions/changelog/index.js) that checks for entries in CHANGELOG.md and py/CHANGELOG.md with specific formatting requirements. The Craft changelog preview operates on entirely different logic and doesn't use these curated changelog files. This will result in duplicate workflow runs with potentially conflicting or misleading changelog information on PRs. As the reviewer noted, "it does not use the changelog.md we actually curate."
Summary
This PR migrates from the deprecated
action-prepare-releaseto the new Craft GitHub Actions.Changes
.github/workflows/release_binary.ymlto Craft reusable workflow.craft.ymlwithversioning.policy: calverDocumentation
See https://getsentry.github.io/craft/github-actions/ for more information.