Starter Brains · DevOps

DevOps, Containers & Cloud

20 lessons from merged PRs in Docker Compose, Helm, Prometheus and Caddy, summarized in our own words. Deployment and container runtime pitfalls.

20 PR lessonsdocker/compose · Apache-2.0 (8)helm/helm · Apache-2.0 (8)prometheus/prometheus · Apache-2.0 (2)caddyserver/caddy · Apache-2.0 (2)
brain_seed_starter(instance_id="<your-brain-id>", stack="devops")

20 fixes from merged PRs

Every lesson below is a short summary in our own words and links to its upstream GitHub pull request in a permissive-licensed repository. Seed them into your Brain so your coding agent can find them when a similar problem comes up.

  1. compose:pr-12014Apache-2.0docker/compose#12014 ↗
    Symptom

    With docker compose up --watch and a sync+restart rule, log output stops after the container restarts.

    Cause and fix

    Cause: On restart the attached single container briefly has no running containers so compose ended its run, and the Restarting state flag from inspect was reported as false. Fix: The watch code now checks whether the restarted container is actually running instead of relying on that flag, and the previously disabled watch e2e tests were re-enabled.

  2. compose:pr-9640Apache-2.0docker/compose#9640 ↗
    Symptom

    docker compose up fails with 'network not found' for a named network that used to be created automatically.

    Cause and fix

    Cause: The network list API with a name filter matches partial names and may return several results, so the lookup in compose misjudged whether the network existed. Fix: create.go and down.go now compare the exact network name before deciding to create or remove it.

  3. compose:pr-11824Apache-2.0docker/compose#11824 ↗
    Symptom

    Running docker compose from a subdirectory no longer merges a parent .env file the way it did before Compose 2.24.

    Cause and fix

    Cause: A change in how .env files are loaded dropped the undocumented behavior that a local .env beside the compose file could set COMPOSE_* variables and override the other .env. Fix: The loading code in cmd/compose restores that behavior, allowing the local .env to set COMPOSE_* variables and override the other .env file.

  4. compose:pr-13023Apache-2.0docker/compose#13023 ↗
    Symptom

    docker compose build with profiles does not mount build secret files into /run/secrets.

    Cause and fix

    Cause: Build resolves the enabled services after the project is loaded, but unused resources such as secrets were already stripped out earlier. Fix: cmd/compose/build.go no longer drops unused resources when loading the project for a build, and an e2e fixture with a profile and secret covers it.

  5. compose:pr-13529Apache-2.0docker/compose#13529 ↗
    Symptom

    After compose recreates a network whose config changed, the terminal UI keeps showing containers as stopped although the engine restarted them.

    Cause and fix

    Cause: Compose emitted no event for containers that came back running through a restart policy after being reconnected. Fix: Compose now inspects containers after reconnecting them and emits their real state (running, created or stopped).

  6. compose:pr-13669Apache-2.0docker/compose#13669 ↗
    Symptom

    docker compose build with a remote ssh:// build context cannot find the Dockerfile.

    Cause and fix

    Cause: filepath.Join collapsed the double slash of ssh:// into a single slash, breaking the URL. Fix: build_bake.go now returns the Dockerfile name unchanged when the context contains a URL scheme (://), as already done for git and https contexts.

  7. compose:pr-10273Apache-2.0docker/compose#10273 ↗
    Symptom

    A compose service using network_mode: service:<other> loses connectivity after the referenced service is restarted.

    Cause and fix

    Cause: The dependent container shares the network namespace of the restarted one and keeps pointing to the old namespace. Fix: docker compose restart now restarts dependent services too, with a new --no-deps flag in restart.go to get the old behavior.

  8. compose:pr-8985Apache-2.0docker/compose#8985 ↗
    Symptom

    docker --context default compose version fails with 'unknown docker command: compose compose' in Compose 2.0.1.

    Cause and fix

    Cause: Calling the plugin with docker root flags caused the word compose to be passed twice. Fix: The command setup in cmd/compose/compose.go and cmd/main.go was changed so the plugin handles those root flags without duplicating the subcommand name; vendoring of the repo was also removed.

  9. helm:pr-7751Apache-2.0helm/helm#7751 ↗
    Symptom

    A chart packaged with helm 3 on Windows unpacks into a flat structure with backslashes in file names on Linux and breaks artifactory.

    Cause and fix

    Cause: Windows archives stored paths with a backslash separator. Fix: pkg/chartutil/save.go now applies filepath.ToSlash to the entry names so archives always use forward slashes.

  10. helm:pr-8188Apache-2.0helm/helm#8188 ↗
    Symptom

    helm panics with a nil pointer dereference when saving a chart and the stat call fails with an error other than not-exist.

    Cause and fix

    Cause: The code checked only for the not-exist error and then called IsDir on a nil FileInfo. Fix: save.go now handles every other stat error and returns it instead of continuing.

  11. helm:pr-7942Apache-2.0helm/helm#7942 ↗
    Symptom

    The helm get script installs a release candidate instead of the latest stable version.

    Cause and fix

    Cause: A recent change made the scripts pick up pre-releases along with stable releases when determining the latest tag. Fix: scripts/get and scripts/get-helm-3 were changed so they select only stable releases.

  12. helm:pr-2512Apache-2.0helm/helm#2512 ↗
    Symptom

    A helm repository index built without --url holds relative chart URLs, and adding the repo works but fetching or installing charts fails.

    Cause and fix

    Cause: Relative chart URLs were not resolved against the repository base URL, a regression from around Helm 2.2.0. Fix: The chart downloader now derives the URL prefix from the repository's base URL when the index lists relative paths.

  13. helm:pr-2790Apache-2.0helm/helm#2790 ↗
    Symptom

    helm dependency update leaves the charts folder empty when downloading new versions fails.

    Cause and fix

    Cause: Old subcharts were deleted before the replacements had been downloaded. Fix: Manager.downloadAll now moves old charts to a temp directory first, restoring them if any dependency update fails and deleting the temp directory otherwise.

  14. helm:pr-12019Apache-2.0helm/helm#12019 ↗
    Symptom

    Helm with the PostgreSQL storage driver only works for the owner role and fails for users with just read-write rights.

    Cause and fix

    Cause: It always ran the create-table-if-not-exists migrations, which less privileged roles cannot execute. Fix: The SQL driver now checks whether migrations were already applied and runs them only when they are missing.

  15. helm:pr-31185Apache-2.0helm/helm#31185 ↗
    Symptom

    helm template --debug --show-only reports 'could not find template' when the selected template has a rendering error.

    Cause and fix

    Cause: With --debug the original rendering error was suppressed and the later lookup then produced a misleading error. Fix: The original rendering error is now captured and takes priority in the reported message.

  16. helm:pr-3514Apache-2.0helm/helm#3514 ↗
    Symptom

    helm upgrade fails with 'grpc: received message larger than max' for charts that embed many large files.

    Cause and fix

    Cause: The client's gRPC message size limit stayed at the default 4MB while the server side allowed more. Fix: pkg/helm/client.go now sets the gRPC max message size to match the server's limit.

  17. prometheus:pr-18020Apache-2.0prometheus/prometheus#18020 ↗
    Symptom

    PromQL queries mixing range functions, subqueries and the @ modifier at a timestamp lacking data panic in Prometheus 3.8 and 3.9 with an index-out-of-range error.

    Cause and fix

    Cause: After function signatures switched to concrete types, several functions indexed matrixVal[0] or vectorVals[0][0] without first checking whether those slices were empty. Fix: The affected range functions now check for empty input before indexing, so these queries return no data instead of panicking.

  18. prometheus:pr-18472Apache-2.0prometheus/prometheus#18472 ↗
    Symptom

    Prometheus TestFsType fails when the tests run on a file system such as a btrfs subvolume that is absent from the FsType table.

    Cause and fix

    Cause: The table of known file system magic numbers in the runtime utilities was missing newer popular file systems. Fix: The table in statfs_default.go was extended with file system types taken from the Linux magic.h header, including btrfs.

  19. caddy:pr-7238Apache-2.0caddyserver/caddy#7238 ↗
    Symptom

    Caddy still tries to create a local CA and write under /data/caddy/pki at startup, failing on permissions, though auto_https is off and skip_install_trust is set.

    Cause and fix

    Cause: automaticHTTPSPhase1() kept building TLS automation after handling disabled servers, and the skip_install_trust handling created a default CA regardless of the auto_https setting. Fix: automaticHTTPSPhase1() now returns early when all servers have auto_https disabled and no domains need certificates, and buildPKIApp() in pkiapp.go respects auto_https when handling skip_install_trust.

  20. caddy:pr-7683Apache-2.0caddyserver/caddy#7683 ↗
    Symptom

    Caddy try_files with a rewrite to the matched file breaks requests for files whose names contain a question mark or a percent sign, while plain file_server serves them fine.

    Cause and fix

    Cause: The matched file path was substituted into the rewrite target unescaped, so a literal question mark looked like a query delimiter and percent sequences were decoded a second time. Fix: The file matcher's path placeholders now stay escaped while the rewrite parses its target URI, and a test covers try_files rewriting to the relative matched path.

Explain it once. Every AI knows it. By default, no generative AI model reads or rewrites your lessons. A small ranking model in the EU only scores them. Starter lessons never overwrite your team's own project lessons.