Skip to content

feat(sentry): 26.5.0 rebase + rename suffix to -ledoent - #3

Merged
dnplkndll merged 17 commits into
masterfrom
26.5.0-ledoent
May 20, 2026
Merged

feat(sentry): 26.5.0 rebase + rename suffix to -ledoent#3
dnplkndll merged 17 commits into
masterfrom
26.5.0-ledoent

Conversation

@dnplkndll

Copy link
Copy Markdown

What changed

Rebases the ledoent (formerly kencove) Sentry fork onto upstream 26.5.0 and drops the kencove suffix from the branch + image tag + Dockerfile filename. Replaces #2 (which had the old -kencove head branch).

Final image: ghcr.io/ledoent/sentry:26.5.0-ledoent (was :26.5.0-kencove).

Why this PR is small

The 26.5.0 build went through 4 iterations:

  • iter 1: missing patches/ for pnpm install
  • iter 2: pnpm@9 vs 10 lockfile format mismatch
  • iter 3: rspack frontend build couldn't resolve typescript (upstream added a type-loader.ts that triggers compile-time resolution)
  • iter 4 (current): pivoted — use ghcr.io/getsentry/sentry:26.5.0 as the base image and overlay our 3 backend patches. Dockerfile shrunk from 170 lines to ~60.

The frontend patch (static/app/components/events/autofix/utils.tsx GitLab providers) is obsolete in 26.5.0 — upstream's BASE_SUPPORTED_PROVIDERS already includes gitlab and integrations:gitlab natively, with a feature-flag-gated mechanism layered on top. So dropping the in-image frontend rebuild loses nothing.

What's in the image

Layer Source
Base ghcr.io/getsentry/sentry:26.5.0 (upstream verbatim)
Overlay Patched src/sentry/seer/endpoints/project_seer_preferences.py (optional org_id/integration_id + GitLab external_id fallback)
Overlay sed patch on src/sentry/conf/server.py (SEER_DEFAULT_URL → $SEER_URL env, defaults to http://seer:9091)
Overlay self-hosted/sentry.conf.py (disable seer-explorer feature flag)

Rename details

  • Branch: 26.5.0-kencove26.5.0-ledoent
  • Image tag suffix: 26.5.0-kencove26.5.0-ledoent
  • Dockerfile: self-hosted/Dockerfile.kencoveself-hosted/Dockerfile.ledoent
  • Workflow trigger: *-kencove*-ledoent
  • Image labels updated to drop the kencove brand

ghcr.io/ledoent/sentry:26.2.0-kencove remains accessible in GHCR for rollback (we never delete pushed manifests).

Verification

Image builds and verifies:

$ docker run --rm --entrypoint sentry ghcr.io/ledoent/sentry:26.5.0-ledoent --version
sentry, version 26.5.0+<sha>

Patches verified inside the image:

  • SEER_DEFAULT_URL = os.environ.get("SEER_URL", ...)
  • RepositorySerializer ledoent-fork comment present ✓
  • GitLab external_id fallback in the POST endpoint ✓

Companion PRs

Rollback

docker compose .env on the VM swaps SENTRY_IMAGE back to ghcr.io/ledoent/sentry:26.2.0-kencove. The 26.2.0-kencove image and branch remain immutable.

dnplkndll and others added 17 commits May 20, 2026 13:53
Add 'gitlab' and 'integrations:gitlab' to supportedProviders array
to enable GitLab repositories for Seer Autofix feature.
- Add cloudbuild.yaml for GCP Cloud Build
- Add Dockerfile.kencove multi-stage build
- Add build-and-push.sh convenience script
- Add GitHub Actions workflow for CI/CD
- Update AGENTS.md with build instructions

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Modifies sentry.conf.py to patch sentry.conf.server module attributes
BEFORE the wildcard import. This ensures all code that imports Seer
URLs from the server module sees the correct service URLs.

Adds SEER_URL and SEER_RPC_SHARED_SECRET environment variable support.
The Explorer-based autofix requires additional endpoints not yet
fully implemented in self-hosted Seer. Disable the feature flag
to use the legacy /v1/automation/autofix/start endpoint instead.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…gcloud builds submit

- WIF provider: github-wlif/providers/github-oidc (was nonexistent github-pool/providers/github-provider)
- Service account: github-actions-seer@ (was nonexistent github-actions@)
- Branch trigger: 26.1.0-* (was master, which never has the workflow file)
- Use gcloud builds submit instead of local docker build (Sentry needs E2_HIGHCPU_32 + 200GB)
- Dockerfile: self-hosted/Dockerfile.kencove via cloudbuild.yaml
- Add .gcloudignore to exclude .git, node_modules, tests from source upload

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
fixtures/ and tests/ glob matched ALL directories named fixtures/tests
throughout the tree, excluding frontend fixture files needed by rspack.
Prefix with / to only match root-level directories.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Upstream 26.2.0 removed uwsgi from dependencies. Also align uv version
with upstream (0.8.2 → 0.9.28).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ializer

Seer returns repositories without organization_id and integration_id,
but the DRF serializer required them. This caused 400 errors when the
frontend sent back Seer's repo data in preference updates (e.g. setting
Cursor handoff).

Also adds external_id fallback for repo validation since GitLab repos
in Seer have simplified owner/name that differs from the DB format.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* ci(sentry): add GHCR public build workflow

Publishes ledoent fork to ghcr.io/ledoent/sentry (public) so self-hosted
Sentry+Seer deployments can pull without GCP credentials. Builds
self-hosted/Dockerfile.kencove for amd64. Free disk on runner before build
because Sentry's frontend+backend build is large.

Sibling to build-kencove.yml (kept for kencove-prod Cloud Build).

* ci(sentry): concurrency + safer disk-cleanup in GHCR workflow

Address bugbot findings on the GHCR build workflow:

- Add concurrency group keyed on github.ref with cancel-in-progress so
  rapid pushes (or a force-push) don't race two builds into publishing
  the same mutable tag. Saves GHA minutes too.
- Tighten the 'Free disk space' step: per-path existence check via
  [ -e "$path" ] && rm -rf, plus drop the blanket '|| true' so a real
  failure during docker image prune surfaces instead of masking.
- Update the runner-RAM comment: GitHub free ubuntu-latest is 16 GB now
  (post-2024 Larger Hosted Runners refresh), not 7 GB; our first build
  completed in ~12 min on it. Bump to ubuntu-latest-large only if
  webpack starts OOMing.

* style(ci): prettier — single space before inline comment

Sentry's pre-commit prettier hook collapsed a double-space to a single
space before the 'full history' comment on fetch-depth. No semantic
change.
Upstream 26.5.0's pnpm-lock.yaml uses pnpm's patchedDependencies for
zod@4.3.5 (the patch file lives at patches/zod@4.3.5.patch). pnpm
install reads the patch contents at lockfile-resolve time, so the
directory has to be on disk before that step.

Was failing in CI with:
  ENOENT: no such file or directory, open '/build/patches/zod@4.3.5.patch'

The 26.2.0 lockfile didn't have patchedDependencies so the old COPY . .
on line 40 (AFTER pnpm install) was sufficient. Adding an explicit
COPY patches/ ./patches/ before the install fixes it cleanly without
breaking layer caching.
Without this workflow ledoent/sentry@master sits frozen at whatever
commit the fork was created from. Every PR from a *-kencove rebase
branch then shows GitHub's 'this branch has conflicts' against master
— even though the kencove patches themselves don't conflict.

The workflow:
  * Runs hourly + on-demand
  * Fast-forwards master to upstream/master when possible (the normal
    case — kencove patches live on *-kencove branches, never on master)
  * Never force-pushes
  * If upstream/master can't be FF'd (means master has diverged),
    writes a warning to the job summary and exits non-zero so a human
    sees it in the Actions tab

Drop-in deployment — no secrets required (GITHUB_TOKEN with
contents:write is auto-provided by the workflow run).

Verified at fork creation time: ledoent/sentry@master is 166 commits
behind getsentry/sentry@master. First run will catch us up.
The ledoent/.github repo has fork-sync-and-digest.yml that already
syncs all forks listed in .github/forks.yml via the merge-upstream
API. Adding ledoent/sentry to that inventory is the right path —
keeps the sync logic in one place and gets the daily digest email
alongside the OCA forks.
Upstream 26.5.0 pins .node-version=24.14.0 and
packageManager=pnpm@10.30.2. Our Dockerfile was still installing
node@22 + pnpm@9 from the 26.2.0 era. pnpm@9 doesn't recognize the
new lockfile patchedDependencies format and bails out with
ERR_PNPM_LOCKFILE_CONFIG_MISMATCH at frozen install time.

Drop-in version bumps; no other Dockerfile changes needed.
…age frontend build

Three iterations failing on the in-Dockerfile rspack frontend build
(typescript loader resolution after upstream's type-loader.ts work
in 26.5.0). Backing off to a much simpler strategy: layer our small
backend patches on top of the pre-built getsentry/sentry:26.5.0
image that upstream's own CI publishes.

This trades a (now-redundant) frontend customization for build
reliability. The kencove fork's only frontend patch was adding
'gitlab' + 'integrations:gitlab' to supportedProviders — and
upstream 26.5.0 already has both in BASE_SUPPORTED_PROVIDERS
natively, with a feature-flag-gated provider mechanism added on
top. So we lose nothing.

What this image still contains:
  * Patched src/sentry/seer/endpoints/project_seer_preferences.py
    (optional org_id/integration_id + GitLab fallback)
  * SEER_URL sed patch on src/sentry/conf/server.py
  * self-hosted/sentry.conf.py overlay (seer-explorer flag off)

What's dropped:
  * The two-stage frontend-builder + python-runtime build
  * uwsgi-dogstatsd remove (upstream image already handles this)
  * Node + pnpm install (upstream's image has the frontend bundle)
  * sentry.build.main invocation (upstream's image already has dist/)

Dockerfile shrunk from ~170 lines to ~60. Build time goes from
~12 min cold to <30s (just an apt overlay on a pre-built base).
The fork has lived under ledoent/ for some time now; the kencove
branding is legacy. Renames:
  * Image tag suffix: ${VERSION}-kencove -> ${VERSION}-ledoent
  * Branch pattern: *-kencove -> *-ledoent (GHCR workflow trigger)
  * Dockerfile: self-hosted/Dockerfile.kencove -> Dockerfile.ledoent
  * Image labels: 'Sentry (ledoent / kencove fork)' -> 'Sentry (ledoent fork)'

Backwards compat:
  * The ghcr.io/ledoent/sentry:26.2.0-kencove tag remains accessible
    in GHCR (we never delete pushed manifests). Production VM still
    pulls that until we cut over.
  * The legacy build-kencove.yml Cloud Build workflow + kencove-prod
    GAR target keep working — just not the primary path anymore.

Two intentional 'kencove' mentions kept as historical context:
  * Comment in build-push-ghcr.yml about the legacy Cloud Build companion
  * Comment in Dockerfile.ledoent about the obsolete frontend patch
@github-actions

Copy link
Copy Markdown

🚨 Warning: This pull request contains Frontend and Backend changes!

It's discouraged to make changes to Sentry's Frontend and Backend in a single pull request. The Frontend and Backend are not atomically deployed. If the changes are interdependent of each other, they must be separated into two pull requests and be made forward or backwards compatible, such that the Backend or Frontend can be safely deployed independently.

Have questions? Please ask in the #discuss-dev-infra channel.

@dnplkndll
dnplkndll merged commit c69d6ca into master May 20, 2026
33 of 44 checks passed
@dnplkndll
dnplkndll deleted the 26.5.0-ledoent branch May 20, 2026 19:09
@github-actions

Copy link
Copy Markdown

📊 Type Coverage Diff

✅ No new type safety issues introduced. Coverage: 93.57%

@github-actions

Copy link
Copy Markdown

Backend Test Failures

Failures on 30d2880 in this run:

tests/sentry/seer/endpoints/test_project_seer_preferences.py::ProjectSeerPreferencesEndpointTest::test_post_rejects_mismatched_repo_name_or_ownerlog
[gw1] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/seer/endpoints/test_project_seer_preferences.py:474: in test_post_rejects_mismatched_repo_name_or_owner
    assert response.status_code == 400
E   assert 204 == 400
E    +  where 204 = <Response status_code=204>.status_code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant