Skip to content

ci(release): Release clients and server as Craft workspaces - #737

Merged
lcian merged 7 commits into
mainfrom
ci/craft-workspaces
Oct 29, 2026
Merged

lcian merged 7 commits into
mainfrom
ci/craft-workspaces

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Releases now go through a single root .craft.yml with three Craft workspaces: the Python client, the Rust client and the server. The release workflow asks which one to release.

  • Clients: released independently as before, with the same tags, release branches and changelogs. A PR lands in a client's changelog only if it changes that client's directory. GitHub releases are now titled py-client@x.y.z / rs-client@x.y.z automatically.
  • Server (new, for future use): CalVer releases tagged and titled server@YY.M.N. Its changelog covers PRs that change objectstore-server or objectstore-service, starting from this PR. No artifacts are published yet, only the GitHub release.
  • Release commits are authored by whoever runs the workflow instead of getsentry-bot.
  • Changelog preview: the two per-client previews are replaced by one PR comment that lists each changelog the PR lands in, with its bump (Craft 3.4.0). It only runs from the base branch, so it starts working after this merges.

#skip-changelog

via @lcian.

--

View Junior Session [Sentry]

Co-Authored-By: Lorenzo Cian <17258265+lcian@users.noreply.github.com>
Comment thread .github/workflows/changelog-preview.yml Fixed
Comment thread .github/workflows/changelog-preview.yml Fixed
@codecov

codecov Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.57%. Comparing base (3d78dbd) to head (3524bd1).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #737      +/-   ##
==========================================
- Coverage   91.58%   91.57%   -0.02%     
==========================================
  Files         116      116              
  Lines       22081    22081              
==========================================
- Hits        20223    20220       -3     
- Misses       1858     1861       +3     
Components Coverage Δ
Rust Backend 94.75% <ø> (ø)
Rust Client 84.29% <ø> (ø)
Python Client 93.88% <ø> (ø)

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread .github/workflows/changelog-preview.yml Fixed
Without a prefix, Craft finds the previous server release with an
unfiltered git describe, so a client tag released after the last server
release becomes the changelog base and drops the server PRs merged in
between. With server@, Craft only considers server tags, for both the
changelog base and the CalVer patch scan.

Co-Authored-By: Lorenzo Cian <17258265+lcian@users.noreply.github.com>
@lcian
lcian marked this pull request as ready for review October 28, 2026 11:18
@lcian
lcian requested a review from a team as a code owner October 28, 2026 11:18

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

Comment thread .craft.yml
Craft writes the server changelog on prepare but only commits tracked
files, so without a checked-in file the first release commit would leave
it out. Both clients already have one.
BYK added a commit to getsentry/craft that referenced this pull request Oct 28, 2026
…942)

Closes #941.

The changelog preview workflow didn't work in repos that define release
workspaces. `craft changelog --pr N` failed because no workspace was
selected, and the workflow hid the error, so every PR showed "No
changelog entries" with no bump. Even with a workspace selected, the
current PR was always added to the preview without the workspace path
rules, so a server-only PR showed up as a bump in a client's changelog.

**What changes**

- If the config defines workspaces and none is selected, `craft
changelog --pr N` previews the PR in each workspace, starting from that
workspace's latest tag. It keeps only the workspaces whose changelog
would list the PR. The JSON output gets a `workspaces` array (`name`,
`bumpType`, `versioningPolicy`). `changelog` holds the PR's own entry
once, since the entry text is the same in every workspace.
- With a workspace selected, the PR's changed files (from the GitHub
API, including the old path of renamed files) go through the same rules
as the release changelog: owned paths, `includePaths`, `unownedPaths`. A
PR outside the workspace is left out and doesn't bump the version. To
support this, the path matching in `getChangesSince` moved into
`getWorkspaceChangeFilter()` so both callers share it.
- The workflow still posts one comment or one commit status. It lists
each workspace the PR lands in with its bump (CalVer workspaces show
`CalVer`), and the status description reads e.g. `clients/python: Minor,
clients/rust: Patch`. When a PR lands in no workspace, the preview says
so, and title enforcement is skipped as it is for `skip-changelog`.
Repos without workspaces get the same output as before.

I ran the built binary against the three-workspace config in
getsentry/objectstore#737:

- getsentry/objectstore#690 only changes `objectstore-service`. It now
lands only in `objectstore-server` (CalVer).
- getsentry/objectstore#721 lands only in `clients/python`, as a major
bump.
- getsentry/objectstore#728 is CI-only. Every workspace uses
`unownedPaths: exclude`, so it lands in none.

Callers that pin `craft-version` need a release with this change. The
default `latest` picks it up.

<!-- junior-request-attribution:start -->
via @BYK.
<!-- junior-request-attribution:end -->

<!-- junior-session-footer:start -->
<!-- junior-conversation-id:slack%3AC0CACQ70E8Z%3A1793125577.652579 -->

--

[View Junior
Session](https://junior-prod.sentry.dev/conversations/slack%3AC0CACQ70E8Z%3A1793125577.652579)
[[Sentry]](https://sentry.sentry.io/explore/conversations/slack%3AC0CACQ70E8Z%3A1793125577.652579/?project=4510944073809921)

<!-- junior-session-footer:end -->

Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: Burak Yigit Kaya <126780+BYK@users.noreply.github.com>
Craft 3.4.0's changelog preview supports release workspaces: one PR
comment lists each workspace whose changelog lists the PR, with its bump,
using the same path rules as the release changelog.

Co-Authored-By: Lorenzo Cian <17258265+lcian@users.noreply.github.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 3524bd1. Configure here.

Comment thread .github/workflows/changelog-preview.yml
@lcian
lcian merged commit 23e6e45 into main Oct 29, 2026
30 checks passed
@lcian
lcian deleted the ci/craft-workspaces branch October 29, 2026 12:19
lcian added a commit that referenced this pull request Oct 29, 2026
Fixes the changelog preview added in #737, which fails at startup on
every PR ([run on
#700](https://github.com/getsentry/objectstore/actions/runs/40873702019):
"likely failed because of a workflow file issue").

Craft's reusable preview job requests `contents: read`, `pull-requests:
write` and `statuses: write`. A called workflow can't get more
permissions than its caller, and our caller only granted the first two.
This adds `statuses: write`, matching the old per-client preview
workflows.

The preview runs from the base branch (`pull_request_target`), so it
starts working on other PRs once this merges.

#skip-changelog

---------

Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: Lorenzo Cian <17258265+lcian@users.noreply.github.com>
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.

3 participants