Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@ogoulpeau-ledger
Copy link
Contributor

What I did

  • in processFile(), load the compose file selecting the profiles from project.Profiles in the loader.Options.
  • make the command fail if publishing a compose app with no service:
    • Not sure about this one:
      • Let me know if this is better to remove it
      • I thought also about enforcing all profiles by default in cmd/compose/publish.go as if --profile '*' was passed but this is not consistent with the other commands, I guess.

Related issue

(not mandatory) A picture of a cute animal, if possible in relation to what you did

@ogoulpeau-ledger ogoulpeau-ledger requested a review from a team as a code owner October 10, 2025 14:03
@ogoulpeau-ledger ogoulpeau-ledger force-pushed the fix-publish-extends-with-profiles branch from 48e3a73 to 91f7fb1 Compare October 10, 2025 14:04
@ndeloof
Copy link
Contributor

ndeloof commented Oct 10, 2025

Profiles indeed are not considered by the publish command. Once published, as the raw compose.yaml has been published, disabled profiles will be available for consumer but not the related images or other references (like extends your issue refers to)

IMHO publish command should implicitly enable all profiles, so that the published compose model is fully functional whatever profile the consumer eventually enables

@ogoulpeau-ledger ogoulpeau-ledger force-pushed the fix-publish-extends-with-profiles branch 2 times, most recently from 67b5d28 to eb7e9f0 Compare October 10, 2025 16:47
@ogoulpeau-ledger
Copy link
Contributor Author

Profiles indeed are not considered by the publish command. Once published, as the raw compose.yaml has been published, disabled profiles will be available for consumer but not the related images or other references (like extends your issue refers to)

IMHO publish command should implicitly enable all profiles, so that the published compose model is fully functional whatever profile the consumer eventually enables

Okay I rewrote the second commit that way.

@ogoulpeau-ledger ogoulpeau-ledger force-pushed the fix-publish-extends-with-profiles branch 3 times, most recently from 7f54a4c to 254d482 Compare October 14, 2025 06:02
@ndeloof ndeloof enabled auto-merge (rebase) October 14, 2025 06:03
…project.Profiles` to the `loader.Options`.

Signed-off-by: Olivier Goulpeau <[email protected]>
… publish.

This code is moved from `generateImageDigestsOverride()` as no more
needed at that point.

Signed-off-by: Olivier Goulpeau <[email protected]>
auto-merge was automatically disabled October 14, 2025 06:05

Head branch was pushed to by a user without write access

@ogoulpeau-ledger ogoulpeau-ledger force-pushed the fix-publish-extends-with-profiles branch from 254d482 to 7ece5fc Compare October 14, 2025 06:05
@ndeloof ndeloof enabled auto-merge (rebase) October 14, 2025 06:13
@ndeloof ndeloof merged commit 289faae into docker:main Oct 14, 2025
24 checks passed
@ogoulpeau-ledger
Copy link
Contributor Author

Thanks for this quick merge! I enjoy working with Compose and I enjoyed discovering and working on clean code: keep it up guys!

tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Oct 20, 2025
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [docker/compose](https://github.com/docker/compose) | patch | `v2.40.0` -> `v2.40.1` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>docker/compose (docker/compose)</summary>

### [`v2.40.1`](https://github.com/docker/compose/releases/tag/v2.40.1)

[Compare Source](docker/compose@v2.40.0...v2.40.1)

#### What's Changed

##### ✨ Improvements

##### 🐛 Fixes

- Write error to watcher error channel if Start() fails by [@&#8203;Trolldemorted](https://github.com/Trolldemorted) in [#&#8203;13263](docker/compose#13263)
- Fix: set PWD only if not set by [@&#8203;kianelbo](https://github.com/kianelbo) in [#&#8203;13268](docker/compose#13268)
- bake only interpolates ${\*} by [@&#8203;ndeloof](https://github.com/ndeloof) in [#&#8203;13270](docker/compose#13270)
- Fix: make "publish" push all compose files addressed in "extends" statements when using "profiles". by [@&#8203;ogoulpeau-ledger](https://github.com/ogoulpeau-ledger) in [#&#8203;13277](docker/compose#13277)
- Support Ctrl+Z to run compose in background by [@&#8203;ndeloof](https://github.com/ndeloof) in [#&#8203;13289](docker/compose#13289)
- Fix race-condition bug in publish command by [@&#8203;paul-kinexon](https://github.com/paul-kinexon) in [#&#8203;13291](docker/compose#13291)
- Set secret/config uid:gid to match container's USER by [@&#8203;ndeloof](https://github.com/ndeloof) in [#&#8203;13288](docker/compose#13288)
- Fix failure to delegate build with bake by [@&#8203;ndeloof](https://github.com/ndeloof) in [#&#8203;13275](docker/compose#13275)
- Make CTRL+Z a no-op operation on Windows by [@&#8203;glours](https://github.com/glours) in [#&#8203;13293](docker/compose#13293)

##### 🔧  Internal

- pkg/compose: align classic builder implementation with docker/cli by [@&#8203;thaJeztah](https://github.com/thaJeztah) in [#&#8203;13278](docker/compose#13278)
- pkg/compose: build with bake: drop support for buildx v0.16 and lower by [@&#8203;thaJeztah](https://github.com/thaJeztah) in [#&#8203;13280](docker/compose#13280)
- Use fixed version of compose bridge transformer images by [@&#8203;glours](https://github.com/glours) in [#&#8203;13284](docker/compose#13284)

##### ⚙️ Dependencies

- Build(deps): bump github.com/docker/docker from 28.5.0+incompatible to 28.5.1+incompatible by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;13274](docker/compose#13274)
- Build(deps): bump github.com/docker/cli from 28.5.0+incompatible to 28.5.1+incompatible by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;13273](docker/compose#13273)
- Build(deps): bump golang.org/x/sys from 0.36.0 to 0.37.0 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;13272](docker/compose#13272)
- Build(deps): bump docker/buildx v0.29.1, moby/buildkit v0.25.1 by [@&#8203;thaJeztah](https://github.com/thaJeztah) in [#&#8203;13279](docker/compose#13279)
- Bump golang to version 1.24.9 by [@&#8203;glours](https://github.com/glours) in [#&#8203;13285](docker/compose#13285)

#### New Contributors

- [@&#8203;Trolldemorted](https://github.com/Trolldemorted) made their first contribution in [#&#8203;13263](docker/compose#13263)
- [@&#8203;ogoulpeau-ledger](https://github.com/ogoulpeau-ledger) made their first contribution in [#&#8203;13277](docker/compose#13277)
- [@&#8203;paul-kinexon](https://github.com/paul-kinexon) made their first contribution in [#&#8203;13291](docker/compose#13291)

**Full Changelog**: <docker/compose@v2.40.0...v2.40.1>

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever MR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS4xNTEuMSIsInVwZGF0ZWRJblZlciI6IjQxLjE1MS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants