Skip to content

(More) complete support for depends_on#35

Merged
Mcrich23 merged 8 commits intoMcrich23:feat/depends-on-supportfrom
rtoohil:feature/depends-on-support
Feb 4, 2026
Merged

(More) complete support for depends_on#35
Mcrich23 merged 8 commits intoMcrich23:feat/depends-on-supportfrom
rtoohil:feature/depends-on-support

Conversation

@rtoohil
Copy link
Contributor

@rtoohil rtoohil commented Dec 1, 2025

My compose file has a more complex use of the depends_on functionality than Container-Compose used.

I will admit that Swift isn't my best language, so I worked with Claude Code to build this PR. This adds support for various depends_on syntaxes such as:

1. Simple string (no colon after service name):

  depends_on: mysql

  2. Simple array:

  depends_on:
    - mysql
    - redis

  3. Dictionary without conditions (empty/null values):

  depends_on:
    mysql:
    redis:

  4. Dictionary with conditions (full format):

  depends_on:
    mysql:
      condition: service_healthy
    redis:
      condition: service_started

It doesn't handle the health check well yet, but we can expand upon that. This handled my more complex depends_on case.

@Mcrich23
Copy link
Owner

Mcrich23 commented Dec 1, 2025

Thank you. I'm curious about your thoughts on this general idea given the lack of support for the features described in your compose file.

@rtoohil
Copy link
Contributor Author

rtoohil commented Dec 1, 2025

Honestly, part of the idea was simply to reduce the friction for someone getting started, i.e. I have a working compose file that I use with docker compose. Rather than forcing users to rewrite, can handle the array/dictionary case to allow someone's existing file to get things going. If desired, for things like condition, could log that those are not yet implemented/supported.

I can see the argument for not supporting the condition case at all, but I still think the friction reduction is worth it (one singular opinion here)

@Mcrich23
Copy link
Owner

Mcrich23 commented Dec 1, 2025

This is true. I will do a manual review of your PR when I have a chance. One way that would be incredibly helpful to contribute if you would like would be to document the current status of compose yaml feature support.

Feel free not to if you don't want to or don't have the capacity to.

@rtoohil
Copy link
Contributor Author

rtoohil commented Dec 1, 2025 via email

@Mcrich23
Copy link
Owner

Mcrich23 commented Dec 1, 2025

Thank you. Can you please add tests for this? I want to ensure in the future that this kind of compose file will continue to build.

@rtoohil
Copy link
Contributor Author

rtoohil commented Dec 3, 2025 via email

@Mcrich23
Copy link
Owner

Mcrich23 commented Dec 3, 2025

Thank you. It appears all of the tests are passing on main which would mean that it is an issue in your pr.

@rtoohil
Copy link
Contributor Author

rtoohil commented Dec 3, 2025 via email

@Mcrich23 Mcrich23 self-assigned this Dec 3, 2025
Mcrich23 and others added 7 commits February 3, 2026 15:23
* update to container 0.8

* test fixes

* network ip passthrough fixes

* warning fixes
Updated contribution guidelines to reflect new branch naming and testing requirements.
Added guidelines for contributing to the project.
@rtoohil
Copy link
Contributor Author

rtoohil commented Feb 3, 2026

Sorry for the long delay (real life). This has the same tests passing as on main (the Real World tests fail on main on my machine), but I reverted the change that broke the other test. That test is now passing.

I do think that there's some command handling that may need to change to get these other tests working, but that can be a separate PR.

@Mcrich23
Copy link
Owner

Mcrich23 commented Feb 4, 2026

No problem! Let me create a new branch for this feature when I'm back at my computer and we can merge this into there instead. Then we can make a new pr for tests.

@Mcrich23 Mcrich23 changed the base branch from main to feat/depends-on-support February 4, 2026 04:02
Copy link
Owner

@Mcrich23 Mcrich23 left a comment

Choose a reason for hiding this comment

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

Havent tried it, but it lgtm. Lets get this merged into the new feature branch i made and then do more testing before merging to main.

@Mcrich23 Mcrich23 merged commit 5e8daaf into Mcrich23:feat/depends-on-support Feb 4, 2026
1 check passed
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