Skip to content

ci(scraps): Scope release tags and automate versioning - #126643

Merged
natemoo-re merged 10 commits into
masterfrom
nm/scraps/publish-workspace
Oct 7, 2026
Merged

natemoo-re merged 10 commits into
masterfrom
nm/scraps/publish-workspace

Conversation

@natemoo-re

@natemoo-re natemoo-re commented Oct 6, 2026 •

Copy link
Copy Markdown
Member

#125903 added craft-based releases for @sentry/scraps but had a few problems.

  • it introduced a new, nested .craft.yml file
  • changelog entries were manual
  • the release was tagged scraps-v<version> which isn't an accepted standard format
  • release workflow trigger required an explicit version

This PR updates the release process to...

  • use a single root .craft.yml file with workspaces
  • generate changelog entries from conventional commits
  • use scraps@<version> tags
  • default the release workflow to auto (while still accepting explicit versions)

@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Oct 6, 2026
@natemoo-re
natemoo-re marked this pull request as ready for review October 6, 2026 20:47
@natemoo-re
natemoo-re requested review from a team as code owners October 6, 2026 20:47
Comment thread .github/workflows/release.yml Resolved
Comment thread .github/workflows/scraps-release.yml Resolved
Comment thread .craft.yml Resolved
natemoo-re and others added 2 commits October 6, 2026 16:25
Comment thread .craft.yml Resolved
@natemoo-re
natemoo-re enabled auto-merge (squash) October 7, 2026 17:07
@natemoo-re
natemoo-re merged commit d2f32d8 into master Oct 7, 2026
70 checks passed
@natemoo-re
natemoo-re deleted the nm/scraps/publish-workspace branch October 7, 2026 17:14
aldy505 added a commit to aldy505/sentry-publish that referenced this pull request Oct 16, 2026
BYK pushed a commit to getsentry/publish that referenced this pull request Oct 16, 2026
BYK added a commit to getsentry/craft that referenced this pull request Oct 22, 2026
Workspace changelogs treat every file outside all workspaces as shared,
so it lands in every workspace's changelog. That breaks repos where an
application lives at the root next to independently released packages.
In getsentry/sentry, `@sentry/scraps@0.2.0` picked up 785 commits since
`scraps@0.1.0`; only 21 touched `static/packages/scraps`. The rest were
backend changes under `src/` and `tests/`.

This adds `changelog.unownedPaths`:

- `include` (default): current behavior.
- `exclude`: this workspace ignores files outside every workspace.
- `own`: this workspace claims them, and every other workspace ignores
them. Only one workspace may set `own`. Workspaces without their own
`changelog` block inherit the top-level one, so a top-level `own` that
reaches several workspaces is rejected.

```yaml
workspaces:
  sentry:
    changelog:
      unownedPaths: own
  static/packages/scraps:
    changelog:
      policy: auto
```

## First releases

A workspace's first release has no matching tag, so Craft read the whole
repository history. When sentry switched scraps from `scraps-v*` to
`scraps@*` tags, `craft prepare` ran through about 75k commits and
~1,500 GraphQL batches, and the run was cancelled after 34 minutes.

Now, when no previous tag exists and a workspace is selected, Craft
walks back through `.craft.yml` history to the commit that first defined
the workspace's key and starts there. If that commit has no parent,
Craft keeps the full history. Craft now logs how many commits it reads:
at info level when it found a starting commit, and as a warning when it
falls back to the full history. Pushing a tag with the workspace's
prefix still overrides this.

Against a sentry checkout at the 0.2.0 release base, a first release of
`static/packages/scraps` reads 1,152 commits starting at the commit that
added the workspace (getsentry/sentry#126643) and keeps 21 once `sentry`
owns unowned paths.

## Relation to #920

#920 handles `includePaths` when Craft runs without workspaces. This PR
only changes workspace mode, so the two don't overlap in behavior.
`exclude` is the workspace option that #920's open question describes.
Both PRs edit the top of `getChangesSince`, so whichever lands second
needs a small rebase.

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

<!-- junior-session-footer:start -->
<!-- junior-conversation-id:local%3Aweb%3A5fa09a4fbd66e4ebf0b123c1 -->

--

[View Junior Session in
Sentry](https://sentry.sentry.io/explore/conversations/local%3Aweb%3A5fa09a4fbd66e4ebf0b123c1/?project=4510944073809921)

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

Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: BYK <burak.kaya@sentry.io>
BYK added a commit that referenced this pull request Oct 22, 2026
Since the move to Craft release workspaces (#126643), Craft treats every
pnpm workspace directory as owned by something other than the `sentry`
workspace. That includes `static/app`, `static/gsApp`, `static/gsAdmin`,
`api-docs` and `tests/js`. Commits that only touch those directories are
dropped from the automatic `CHANGES` changelog. Between `scraps@0.1.0`
and the scraps 0.2.0 release base, that's 451 of 1,232 commits.

This lists those directories under `changelog.includePaths` for the
`sentry` workspace. With this config, 1,227 of the 1,232 commits are
kept. The 5 still excluded only touch `static/packages/scraps` or its
lint plugin. `includePaths` has been supported since Craft 2.32.0, below
our `minVersion` of 2.33.1.

The scraps and icons changelogs still pick up backend commits, because
files outside every workspace (`src/`, `tests/`, …) count as shared.
getsentry/craft#921 adds `changelog.unownedPaths: own` so the `sentry`
workspace can claim those files. Setting it here will be a follow-up
once that ships in a Craft release.

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

<!-- junior-session-footer:start -->
<!-- junior-conversation-id:local%3Aweb%3A5fa09a4fbd66e4ebf0b123c1 -->

--

[View Junior Session in
Sentry](https://sentry.sentry.io/explore/conversations/local%3Aweb%3A5fa09a4fbd66e4ebf0b123c1/?project=4510944073809921)

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

---------

Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: BYK <burak.kaya@sentry.io>

This branch was successfully deployed

1 active deployment
Preview — 41c69ebe Deployed Oct 7, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants