Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,11 @@ x-snuba-defaults: &snuba_defaults
# If you have statsd server, you can utilize that to monitor self-hosted Snuba containers.
# To start, state these environment variables below on your `.env.` file and adjust the options as needed.
SNUBA_STATSD_ADDR: "${STATSD_ADDR:-}"

# Prevent podman from placing the compose stack and ad-hoc containers into pods
x-podman:
in_pod: false

services:
smtp:
<<: *restart_policy
Expand Down
5 changes: 1 addition & 4 deletions install/dc-detect-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,7 @@ proxy_args="--build-arg HTTP_PROXY=${HTTP_PROXY:-} --build-arg HTTPS_PROXY=${HTT
exec_proxy_args="-e HTTP_PROXY=${HTTP_PROXY:-} -e HTTPS_PROXY=${HTTPS_PROXY:-} -e NO_PROXY=${NO_PROXY:-} -e http_proxy=${http_proxy:-} -e https_proxy=${https_proxy:-} -e no_proxy=${no_proxy:-}"
if [[ "$CONTAINER_ENGINE" == "podman" ]]; then
proxy_args_dc="--podman-build-args HTTP_PROXY=${HTTP_PROXY:-},HTTPS_PROXY=${HTTPS_PROXY:-},NO_PROXY=${NO_PROXY:-},http_proxy=${http_proxy:-},https_proxy=${https_proxy:-},no_proxy=${no_proxy:-}"
# Disable pod creation as these are one-off commands and creating a pod
# prints its pod id to stdout which is messing with the output that we
# rely on various places such as configuration generation
dcr="$dc --profile=feature-complete --in-pod=false run --rm"
dcr="$dc --profile=feature-complete run --rm"
Comment thread
MarkTwoFive marked this conversation as resolved.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Removing the --in-pod=false flag from the dcr alias risks corrupting script output, as the replacement global x-podman setting may not apply to podman-compose run commands.
Severity: HIGH

Suggested Fix

Restore the --in-pod=false command-line flag to the dcr variable definition in install/dc-detect-version.sh. This explicitly prevents podman-compose from printing pod IDs to stdout, ensuring that scripts capturing the command's output are not broken, rather than relying on an unverified global setting.

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: install/dc-detect-version.sh#L54

Potential issue: The `--in-pod=false` flag was removed from the `dcr` command alias,
relying instead on a global `x-podman: in_pod: false` setting in the compose file. There
is uncertainty whether `podman-compose run` commands respect this global setting. If
they do not, `podman-compose` will create a pod and print its ID to standard output.
This will corrupt the output captured by various installation scripts, such as
`install/setup-js-sdk-assets.sh`, which expect clean JSON data. This would lead to
failures during the installation process.

Also affects:

  • docker-compose.yml:123~123

else
proxy_args_dc=$proxy_args
dcr="$dc run --pull=never --rm"
Expand Down