- New `[global] job-exec-label-scope` option makes label-defined `job-exec` job naming collision-safe when one central Ofelia daemon watches several independent Compose projects. Since [#300](https://github.com/netresearch/ofelia/issues/300)/[#597](https://github.com/netresearch/ofelia/pull/597) switched the prefix from the container name to the Compose **service** name (to power cross-container `depends-on` references like `database.backup`), two stacks deployed from the same template — e.g. `acme-web` and `globex-web`, both Compose service `web` with an identical `ofelia.job-exec.sync-news` label — silently collapsed to the single key `web.sync-news`: only the first container (running → newest → name order) won and the other stack's job never ran, with no error. This unnoticed regression reopened the exact collision that [#86](https://github.com/netresearch/ofelia/issues/86)/[#114](https://github.com/netresearch/ofelia/pull/114) had closed. The new option selects the prefix scheme: `service` (default — `{service}.{job}`, unchanged, required for cross-container references), `container` (`{container}.{job}` — collision-safe per Docker daemon), or `container-service` (`{container}.{service}.{job}` — descriptive and collision-safe, falling back to `{container}.{job}` for non-Compose containers). It is a daemon-wide INI-only setting (not exposed via container labels, so a single container cannot redefine how every other container's jobs are named) and defaults to `service`, preserving the pre-fix behavior. When switching away from `service`, update cross-container `depends-on`/`on-success`/`on-failure` references to the new scoped names. Independently of the chosen scope, Ofelia now also **logs a loud warning** whenever a job-exec name collision is detected — naming both containers, the dropped job, and the `job-exec-label-scope` remedy — so a collapsed job is never dropped in silence again (the worst part of this bug was the *absence* of any signal). An unrecognized `job-exec-label-scope` value is likewise reported with a warning before falling back to `service`, rather than silently degrading. Closes [#734](https://github.com/netresearch/ofelia/issues/734).
0 commit comments