Skip to content

Conversation

@porterdarby
Copy link

Docker Compose version 3 does not support the condition field for depends_on objects (see https://docs.docker.com/compose/compose-file/compose-file-v3/#depends_on). The current use of condition can be confusing (I was confused by it at first).

This change removes the condition fields and makes the depends_on a list.

This should present no problems with the current state of the application as it simply fixes a yaml file structure.

@boring-cyborg
Copy link

boring-cyborg bot commented Apr 23, 2021

Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst)
Here are some useful points:

  • Pay attention to the quality of your code (flake8, pylint and type annotations). Our pre-commits will help you with that.
  • In case of a new feature add useful documentation (in docstrings or in docs/ directory). Adding a new operator? Check this short guide Consider adding an example DAG that shows how users should use it.
  • Consider using Breeze environment for testing locally, it’s a heavy docker but it ships with a working Airflow and a lot of integrations.
  • Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
  • Please follow ASF Code of Conduct for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
  • Be sure to read the Airflow Coding style.
    Apache Airflow is a community-driven project and together we are making it better 🚀.
    In case of doubts contact the developers at:
    Mailing List: dev@airflow.apache.org
    Slack: https://s.apache.org/airflow-slack

@kaxil kaxil requested a review from mik-laj April 23, 2021 22:44
@mik-laj
Copy link
Member

mik-laj commented Apr 24, 2021

Docker Compose supports condition field. This prevents the container from running until the service reports that it is healthy.
https://github.com/docker/compose/blob/c81046aac0ce1360f1bab64368f9a318c593d82a/compose/config/compose_spec.json#L184-L195
https://github.com/docker/compose/blob/0bea52b18dda3de8c28fcfb0c80cc08b8950645e/compose/service.py#L756-L757
It is also supported by compose spec:
https://github.com/compose-spec/compose-spec/blob/b7fb5b65fff19651ecdb2d4d3232b01fb6866f70/schema/compose-spec.json#L184-L196
To me, it looks like an issue in the docker documentation.

See also: #13446

@porterdarby
Copy link
Author

Thanks for correcting me here. I'll see if there are some tests or something over on the Docker side and attempt to clarify that documentation. I made a quick little test locally, and the "depender" service timed out while waiting for the "dependee" service to become healthy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants