Skip to content

Commit 350c9ec

Browse files
Merge branch 'main' into brendan/job-manager
2 parents 65ec093 + 6ce7a86 commit 350c9ec

71 files changed

Lines changed: 5150 additions & 435 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/_build-cloud.yml

Lines changed: 46 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ on:
2222
required: false
2323
type: string
2424
default: us-west-1
25+
require_sentry:
26+
description: "Require complete Sentry build configuration and source-map upload credentials"
27+
required: false
28+
type: boolean
29+
default: true
2530

2631
jobs:
2732
build:
@@ -58,13 +63,14 @@ jobs:
5863
SENTRY_ORG: ${{ vars.SENTRY_ORG }}
5964
SENTRY_WEBAPP_PROJECT: ${{ vars.SENTRY_WEBAPP_PROJECT }}
6065
SENTRY_BACKEND_PROJECT: ${{ vars.SENTRY_BACKEND_PROJECT }}
66+
REQUIRE_SENTRY: ${{ inputs.require_sentry }}
6167
run: |
6268
missing=0
63-
for name in SENTRY_AUTH_TOKEN AWS_ECR_ROLE_ARN \
64-
NEXT_PUBLIC_SENTRY_ENVIRONMENT \
65-
NEXT_PUBLIC_SENTRY_WEBAPP_DSN \
66-
NEXT_PUBLIC_SENTRY_BACKEND_DSN \
67-
SENTRY_ORG SENTRY_WEBAPP_PROJECT SENTRY_BACKEND_PROJECT; do
69+
required_names="AWS_ECR_ROLE_ARN"
70+
if [ "$REQUIRE_SENTRY" = "true" ]; then
71+
required_names="$required_names SENTRY_AUTH_TOKEN NEXT_PUBLIC_SENTRY_ENVIRONMENT NEXT_PUBLIC_SENTRY_WEBAPP_DSN NEXT_PUBLIC_SENTRY_BACKEND_DSN SENTRY_ORG SENTRY_WEBAPP_PROJECT SENTRY_BACKEND_PROJECT"
72+
fi
73+
for name in $required_names; do
6874
if [ -z "${!name}" ]; then
6975
echo "::error::${name} is not set on the '${ENVIRONMENT}' environment (or the repository)."
7076
missing=1
@@ -73,9 +79,36 @@ jobs:
7379
fi
7480
done
7581
if [ "$missing" -ne 0 ]; then
76-
echo "::error::Refusing to build: the image would ship without Sentry wiring."
82+
echo "::error::Refusing to build: required environment configuration is missing."
7783
exit 1
7884
fi
85+
if [ "$REQUIRE_SENTRY" != "true" ]; then
86+
echo "Sentry wiring is intentionally disabled for the isolated internal demo image."
87+
fi
88+
89+
- name: Verify internal GitHub OIDC identity
90+
if: inputs.environment == 'internal'
91+
env:
92+
EXPECTED_OIDC_SUBJECT: repo:sourcebot-dev/sourcebot:environment:internal
93+
run: |
94+
response=$(curl --fail --silent --show-error \
95+
-H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" \
96+
"$ACTIONS_ID_TOKEN_REQUEST_URL&audience=sts.amazonaws.com")
97+
token=$(jq -r '.value' <<<"$response")
98+
OIDC_TOKEN="$token" node - <<'NODE'
99+
const claims = JSON.parse(Buffer.from(process.env.OIDC_TOKEN.split('.')[1], 'base64url'));
100+
console.log(JSON.stringify({
101+
sub: claims.sub,
102+
aud: claims.aud,
103+
repository: claims.repository,
104+
repository_id: claims.repository_id,
105+
job_workflow_ref: claims.job_workflow_ref,
106+
}, null, 2));
107+
if (claims.sub !== process.env.EXPECTED_OIDC_SUBJECT) {
108+
console.error(`Unexpected OIDC subject: ${claims.sub}`);
109+
process.exit(1);
110+
}
111+
NODE
79112
80113
- name: Check Prisma migrations
81114
uses: ./.github/actions/check-prisma-migrations
@@ -128,8 +161,7 @@ jobs:
128161
SENTRY_RELEASE=${{ steps.commit.outputs.sha }}
129162
# Passed as a secret, not a build-arg: build args are recorded in layer
130163
# metadata that `mode=max` exports to the cache. @see: Dockerfile
131-
secrets: |
132-
sentry_auth_token=${{ secrets.SENTRY_AUTH_TOKEN }}
164+
secrets: ${{ inputs.require_sentry && format('sentry_auth_token={0}', secrets.SENTRY_AUTH_TOKEN) || '' }}
133165
# Cache scope is per-environment, and distinct from the OSS build's
134166
# (which is keyed on platform alone). Sharing a scope would let a build
135167
# that never sees SENTRY_AUTH_TOKEN restore layers from one that did.
@@ -141,15 +173,20 @@ jobs:
141173
ENVIRONMENT: ${{ inputs.environment }}
142174
COMMIT_SHA: ${{ steps.commit.outputs.sha }}
143175
TAGS: ${{ steps.meta.outputs.tags }}
176+
REQUIRE_SENTRY: ${{ inputs.require_sentry }}
144177
run: |
178+
sentry_summary="disabled"
179+
if [ "$REQUIRE_SENTRY" = "true" ]; then
180+
sentry_summary="$COMMIT_SHA"
181+
fi
145182
{
146183
echo "### Pushed to ECR"
147184
echo
148185
echo "| | |"
149186
echo "|---|---|"
150187
echo "| Environment | \`${ENVIRONMENT}\` |"
151188
echo "| Commit | \`${COMMIT_SHA}\` |"
152-
echo "| Sentry release | \`${COMMIT_SHA}\` |"
189+
echo "| Sentry | \`${sentry_summary}\` |"
153190
echo
154191
echo '```'
155192
echo "$TAGS"
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Release Sourcebot (Cloud - Internal Demo)
2+
3+
permissions:
4+
contents: read
5+
id-token: write
6+
7+
on:
8+
workflow_dispatch:
9+
10+
concurrency:
11+
group: release-cloud-internal
12+
cancel-in-progress: false
13+
14+
jobs:
15+
build:
16+
uses: ./.github/workflows/_build-cloud.yml
17+
with:
18+
environment: internal
19+
# Pin the checkout and image tags to the same dispatch commit so metadata
20+
# can never identify image contents as a different revision.
21+
git_ref: ${{ github.sha }}
22+
require_sentry: false
23+
docker_tags: |
24+
type=raw,value=main
25+
type=raw,value=sha-${{ github.sha }}

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,28 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Fixed
11+
- Fixed memory leak attributed to CodeMirror allocating objects on heap that were never freed. [#1580](https://github.com/sourcebot-dev/sourcebot/pull/1580)
12+
- Kept Git provider credentials out of subprocess arguments and on-disk configuration by using isolated in-memory credential caches. [#1584](https://github.com/sourcebot-dev/sourcebot/pull/1584)
13+
14+
## [5.1.7] - 2026-08-13
15+
16+
### Added
17+
- Added a manually triggered cloud image release workflow for isolated internal deployments. [#1566](https://github.com/sourcebot-dev/sourcebot/pull/1566)
18+
- Added Prometheus metrics for the web process, served on `WEB_METRICS_PORT` (default `3070`). [#1570](https://github.com/sourcebot-dev/sourcebot/pull/1570)
19+
- Added an `http_request_duration_seconds` metric recording web request latency by route, method, and status. [#1571](https://github.com/sourcebot-dev/sourcebot/pull/1571)
20+
- [EE] Added one-hour repository-scoped access tokens with public mint and revoke APIs. [#1549](https://github.com/sourcebot-dev/sourcebot/pull/1549)
21+
- Added public connection listing and connection-based repository filtering APIs. [#1550](https://github.com/sourcebot-dev/sourcebot/pull/1550)
22+
23+
### Fixed
24+
- Fixed the web process being capped at a ~4GiB heap regardless of how much memory the container has, which caused multi-second garbage collection pauses on larger deployments. [#1569](https://github.com/sourcebot-dev/sourcebot/pull/1569)
25+
- Upgraded `@sentry/*` to `^10.70.0`, fixing memory leaks where spans retained request data indefinitely. [#1572](https://github.com/sourcebot-dev/sourcebot/pull/1572)
26+
- Fixed code search result links occasionally getting stuck during navigation and restored Cmd/Ctrl-click to open matches in preview. [#1574](https://github.com/sourcebot-dev/sourcebot/pull/1574)
27+
- Fixed a server-side memory leak where a single shared react-query cache retained state from every server render; the cache is now created per-request. [#1575](https://github.com/sourcebot-dev/sourcebot/pull/1575)
28+
- Fixed code host retry warnings to include the HTTP response status. [#1576](https://github.com/sourcebot-dev/sourcebot/pull/1576)
29+
- Fixed streamed code search updates silently cancelling in-flight result navigation. [#1577](https://github.com/sourcebot-dev/sourcebot/pull/1577)
30+
- Fixed the `grep` and `glob` agent tools mis-parsing structured search inputs containing spaces, commas, or quotes. [#1573](https://github.com/sourcebot-dev/sourcebot/pull/1573)
31+
1032
## [5.1.6] - 2026-08-10
1133

1234
### Added

0 commit comments

Comments
 (0)