feat: optional chartcuterie service & profile#4333
Conversation
|
|
||
| chartcuterie: | ||
| <<: [*restart_policy, *pull_policy] | ||
| image: "$CHARTCUTERIE_IMAGE" |
There was a problem hiding this comment.
Bug: The chartcuterie service in docker-compose.yml uses the $CHARTCUTERIE_IMAGE variable, which is not defined in the .env file, causing the service to fail when enabled.
Severity: HIGH
Suggested Fix
Define the CHARTCUTERIE_IMAGE variable in the .env file, similar to how other service images like SENTRY_IMAGE and SNUBA_IMAGE are defined. This will provide a valid image for Docker Compose to use when the chartcuterie profile is active.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location: docker-compose.yml#L857
Potential issue: The `chartcuterie` Docker Compose service references the
`$CHARTCUTERIE_IMAGE` environment variable for its image source. However, this variable
is not defined in the `.env` file, unlike other services such as `sentry` or `snuba`.
When a developer enables the `chartcuterie` profile, Docker Compose will substitute an
empty string for the image name. This will cause the `docker-compose up` command to fail
for the `chartcuterie` service, preventing it from starting.
Did we get this right? 👍 / 👎 to inform future reviews.
| NEW_VERSION="${CRAFT_NEW_VERSION:-${2:-}}" | ||
|
|
||
| sed -i -e "s/^\(SENTRY\|SNUBA\|RELAY\|SYMBOLICATOR\|TASKBROKER\|VROOM\|UPTIME_CHECKER\|LAUNCHPAD\)_IMAGE=\([^:]\+\):.\+\$/\1_IMAGE=\2:$NEW_VERSION/" .env | ||
| sed -i -e "s/^\(SENTRY\|SNUBA\|RELAY\|SYMBOLICATOR\|TASKBROKER\|VROOM\|UPTIME_CHECKER\|LAUNCHPAD\|CHARTCUTERIE\)_IMAGE=\([^:]\+\):.\+\$/\1_IMAGE=\2:$NEW_VERSION/" .env |
There was a problem hiding this comment.
Bug: The bump-version.sh script incorrectly includes CHARTCUTERIE in the version bump process, leading to a non-existent image tag being used for the service.
Severity: HIGH
Suggested Fix
Remove CHARTCUTERIE from the list of services that have their image tags updated in the bump-version.sh script. It should be treated independently from the core Sentry services' coordinated release process.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location: scripts/bump-version.sh#L9
Potential issue: The `bump-version.sh` script now includes `CHARTCUTERIE` in the group
of services that have their image tags updated during a self-hosted release. Since
Chartcuterie is not part of the coordinated release process, its image tags (e.g.,
`:nightly`) do not align with the core Sentry versioning scheme (e.g., `:25.X.Y`). This
change will cause the script to set an invalid, non-existent image tag for the
`chartcuterie` service. Consequently, the service will fail to start on new
installations or when enabled for the first time, as the required Docker image will not
be found.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit cc76962. Configure here.
| # To enable it, add `chartcuterie` to `COMPOSE_PROFILES` in your `.env` file. | ||
| # An example would be: | ||
| # ```env | ||
| # COMPOSE_PROFILES=feature-complete,chartcuterie |
There was a problem hiding this comment.
Bug: Install scripts use an exact string match for COMPOSE_PROFILES, which fails when multiple profiles are set as recommended in the documentation, breaking profiling features.
Severity: HIGH
Suggested Fix
Update the conditional checks in bootstrap-s3-profiles.sh, ensure-correct-permissions-profiles-dir.sh, and wrap-up.sh to use glob matching (e.g., [[ "$COMPOSE_PROFILES" == *"feature-complete"* ]]) instead of exact string equality. This will correctly handle comma-separated, multi-profile values.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location: sentry/sentry.conf.example.py#L459-L462
Potential issue: Multiple install scripts, including `bootstrap-s3-profiles.sh` and
`ensure-correct-permissions-profiles-dir.sh`, check the `COMPOSE_PROFILES` variable
using an exact string match (`== "feature-complete"`). However, the documentation
encourages setting a multi-profile value like `feature-complete,chartcuterie`. When a
user follows this documentation, the exact match fails, causing the scripts to silently
skip critical setup steps. This results in a broken installation for profiling features,
as the SeaweedFS `profiles` bucket is not created and directory permissions are not set
correctly.
Also affects:
install/bootstrap-s3-profiles.sh:13install/ensure-correct-permissions-profiles-dir.sh:6install/wrap-up.sh:36

Chartcuterie has been a part of Sentry for a long time, and it's never a part of self-hosted package due to... no interest I guess?
I can see some (very little, tbh) self-hosted users are using Slack, so it's a perfect thing to add.