Sentry Integration: Track staging commits
維護者通常 1 天內回覆
@vprashrex 已經在處理了。
開始於 2026年10月10日。
評估
這個 Issue 還沒有評估資料。
描述
Is your feature request related to a problem?
Staging deploys for every green main CI run do not correctly capture commit shas in Sentry releases. With multiple changes landing on staging, it is difficult to identify which merge introduced a staging issue.
Describe the solution you'd like
Implement the shared release-id code from the production issue:
- Update
docker-compose.staging.ymlto passRELEASE_TAGalongsideGIT_SHAfor backend services. - In
deploy-staging.yml, setRELEASE_TAG=mainandGIT_SHA=$DEPLOY_SHAin thedocker compose buildcommand. - Checkout the repo with
fetch-depth: 0after the SSM command succeeds. - Register the release and deploy using
getsentry/action-releaseonly if the SSM deploy is successful. - Reuse the
SENTRY_AUTH_TOKENsecret andSENTRY_ORGvariable; addSENTRY_STAGING_PROJECTaskaapi-staging.
Why is this enhancement needed?
This enhancement will ensure each staging deploy is associated with its specific commits, allowing quick identification of the source of staging issues before changes reach production.
Original issue
Describe the current behavior
Staging deploys on every green main CI run through .github/workflows/deploy-staging.yml (SSM → EC2 → docker compose -f docker-compose.staging.yml). The commit sha is already passed as the GIT_SHA build arg, but the Sentry release id ignores it, so every staging event in the kaapi-staging project reports the same release. Many changes land on staging between production releases, and there is no way to tell which merge introduced a staging issue.
Describe the enhancement you'd like
Depends on the shared release-id code from the production issue (kaapi-backend@<RELEASE_TAG or API_VERSION>+<git sha 12>).
docker-compose.staging.yml: passRELEASE_TAGas a build arg next toGIT_SHAfor every service that builds the backend image.deploy-staging.yml:- set
RELEASE_TAG=mainalongsideGIT_SHA=$DEPLOY_SHAin thedocker compose buildcommand - checkout the repo with
fetch-depth: 0in a step after the SSM command succeeds - register the release and deploy with
getsentry/action-release(release: kaapi-backend@main+<DEPLOY_SHA 12>,environment: staging,set_commits: auto) only when the SSM deploy succeeded
- set
- GitHub setup: reuse the
SENTRY_AUTH_TOKENsecret andSENTRY_ORGvariable; addSENTRY_STAGING_PROJECT=kaapi-staging.
Why is this enhancement needed?
Each staging deploy becomes a Sentry release with its commits, so a new staging issue points at the merge that caused it before the change reaches production.
Additional context
- Use
DEPLOY_SHA(workflow_run.head_sha), notgithub.sha: this workflow is triggered byworkflow_run, wheregithub.shais the default-branch head, not necessarily the deployed commit. deploy-staging-ecs.yml(manualworkflow_dispatch) is a second staging path; decide whether it stays and, if so, apply the same steps there.- Verify after the next
mainmerge: Sentry → Releases inkaapi-stagingshowskaapi-backend@main+<sha>understagingwith commits attached.
- 主要語言
- Python
- 星號
- 18
- 分支
- 11
- 平均合併
- 3 天 11 小時
- 30 天內合併 PR
- 8
環境準備
- 提供 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
ProjectTech4DevAI/kaapi-backend 的其他 Issue
-
bug
難度 2/5 1-3 小時 新手友好度 68/100
ProjectTech4DevAI/kaapi-backend#889 ·
維護者通常 1 天內回覆
-
Logging: Reduce INFO log noise可能已有人在做 @vprashrex 於 2 天前認領。 未關閉maintenance
ProjectTech4DevAI/kaapi-backend#1243 · 已指派 1 人 ·
維護者通常 1 天內回覆
-
Sentry Integration: Dynamic release tagging可能已有人在做 @vprashrex 於 2 天前認領。 未關閉enhancement parent
ProjectTech4DevAI/kaapi-backend#1242 · 已指派 1 人 ·
維護者通常 1 天內回覆
-
Sentry release tracking for production (git sha + deploy markers)可能已有人在做 @vprashrex 於 2 天前認領。 未關閉enhancement
ProjectTech4DevAI/kaapi-backend#1240 · 已指派 1 人 ·
維護者通常 1 天內回覆
-
API Management: Restrict Gemini API keys可能已有人在做 @Prajna1999 於 3 天前認領。 未關閉
ProjectTech4DevAI/kaapi-backend#1239 · 已指派 1 人 ·
維護者通常 1 天內回覆
查看 ProjectTech4DevAI/kaapi-backend 的全部 Issue
相似的 Issue
-
enhancement from-review
難度 2/5 1-3 小時 新手友好度 78/100
khuisman/mcp-gee-sweet#1010 ·
維護者通常 1 天內回覆
-
bug confirmed issue
難度 2/5 1-3 小時 新手友好度 72/100
open-webui/open-webui#32333 · 2 則留言 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 68/100
ll7/robot_sf_ll7#10368 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 62/100
-
難度 2/5 1-3 小時 新手友好度 68/100
flop-labs/technocore-chat#982 ·
維護者通常 1 天內回覆