Skip to content

Conversation

ndeloof
Copy link
Contributor

@ndeloof ndeloof commented Jun 6, 2025

What I did
refactored run so that all the container management logic is owned by backend
added support for use_api_socket as a syntaxic sugar, adding bind/config resources to compose model, the same way it is implemented as experimental by docker/cli#5858 (waiting for actual support by Docker Engine)

Related issue

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

@ndeloof ndeloof requested a review from a team as a code owner June 6, 2025 07:49
@ndeloof ndeloof requested a review from glours June 6, 2025 07:49
Copy link

codecov bot commented Jun 6, 2025

Codecov Report

Attention: Patch coverage is 38.38384% with 61 lines in your changes missing coverage. Please review.

Project coverage is 53.20%. Comparing base (60256a8) to head (3dcbec7).
Report is 17 commits behind head on main.

Files with missing lines Patch % Lines
pkg/compose/apiSocket.go 11.53% 45 Missing and 1 partial ⚠️
pkg/compose/run.go 66.66% 8 Missing and 4 partials ⚠️
pkg/compose/create.go 25.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #12908      +/-   ##
==========================================
- Coverage   53.39%   53.20%   -0.20%     
==========================================
  Files         160      161       +1     
  Lines       16542    16696     +154     
==========================================
+ Hits         8833     8883      +50     
- Misses       6800     6898      +98     
- Partials      909      915       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ndeloof ndeloof force-pushed the use-api-socket branch 2 times, most recently from 7af6eb8 to 3b848c3 Compare June 12, 2025 15:51
Copy link
Contributor

@glours glours left a comment

Choose a reason for hiding this comment

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

LGTM

ndeloof added 2 commits June 13, 2025 14:31
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
@ndeloof ndeloof enabled auto-merge (rebase) June 13, 2025 12:32
@ndeloof ndeloof merged commit 9a5fa05 into docker:main Jun 13, 2025
25 checks passed
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Jun 23, 2025
This MR contains the following updates:

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

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.37.2`](https://github.com/docker/compose/releases/tag/v2.37.2)

[Compare Source](docker/compose@v2.37.1...v2.37.2)

#### What's Changed

##### ✨ Improvements

- introduce `use_api_socket` by [@&#8203;ndeloof](https://github.com/ndeloof) in docker/compose#12908

##### 🐛 Fixes

- restore ContainerName in images --json by [@&#8203;ndeloof](https://github.com/ndeloof) in docker/compose#12943
- fix panic using w shortcut on project without watch support by [@&#8203;ndeloof](https://github.com/ndeloof) in docker/compose#12944

##### 🔧  Internal

- move `run` logic inside backend by [@&#8203;ndeloof](https://github.com/ndeloof) in docker/compose#12908

##### ⚙️ Dependencies

- bump compose-go to v2.6.5 by [@&#8203;ndeloof](https://github.com/ndeloof) in docker/compose#12958
- build(deps): bump github.com/containerd/containerd/v2 from 2.1.1 to 2.1.2 by [@&#8203;dependabot](https://github.com/dependabot) in docker/compose#12939

**Full Changelog**: docker/compose@v2.37.1...v2.37.2

</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:eyJjcmVhdGVkSW5WZXIiOiI0MC42Mi4xIiwidXBkYXRlZEluVmVyIjoiNDAuNjIuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90Il19-->
@max-wittig
Copy link

Apparently now docker compose run does no longer consume environment variable so this broke our setup.

We normally inject proxy variables into a build process and docker compose used to automatically used those. Now they are not even consumed, if explicitly supplied via docker compose run -e

@max-wittig
Copy link

Downgrading to 2.37.1 made it work again.

@ndeloof ndeloof deleted the use-api-socket branch June 23, 2025 19:51
@ndeloof ndeloof mentioned this pull request Jun 23, 2025
@ndeloof
Copy link
Contributor Author

ndeloof commented Jun 23, 2025

@max-wittig I added an e2e test to check docker compose run -e works as expected and didn't detected any regression. Can you please give more details ?
(#12967)

@max-wittig
Copy link

Thank you for your quick response!

Maybe its relevant that we need to set DOCKER_BUILDKIT: 0 and that we use this command to maintain Sentry?

See: https://github.com/getsentry/self-hosted/blob/494051b8df0c6e18badb701daf85b3818c170888/install/set-up-and-migrate-database.sh#L14

docker compose --profile feature-complete run --rm web upgrade --noinput --create-kafka-topics

And maybe its actually another change in 2.37.2 that causes this, but I'm not sure. I was really thinking that this could be the cause.

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.

3 participants