You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/03/13 07:04:49 UTC

[GitHub] [airflow] Bowrna opened a new pull request #22217: added docs about detailed network and constraints information

Bowrna opened a new pull request #22217:
URL: https://github.com/apache/airflow/pull/22217


   related: #15974
   Added more docs information about adding network and constraints in Docker swarm option.
   <!--
   Thank you for contributing! Please make sure that your code changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   Feel free to ping committers for the review!
   
   In case of existing issue, reference it using one of the following:
   
   closes: #ISSUE
   related: #ISSUE
   
   How to write a good git commit message:
   http://chris.beams.io/posts/git-commit/
   -->
   
   ---
   **^ Add meaningful description above**
   
   Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst#pull-request-guidelines)** for more information.
   In case of fundamental code change, Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+Proposals)) is needed.
   In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
   In case of backwards incompatible changes please leave a note in [UPDATING.md](https://github.com/apache/airflow/blob/main/UPDATING.md).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] Bowrna commented on a change in pull request #22217: added docs about detailed network and constraints information

Posted by GitBox <gi...@apache.org>.
Bowrna commented on a change in pull request #22217:
URL: https://github.com/apache/airflow/pull/22217#discussion_r825412477



##########
File path: airflow/providers/docker/operators/docker_swarm.py
##########
@@ -86,8 +86,16 @@ class DockerSwarmOperator(DockerOperator):
     :param mode: Indicate whether a service should be deployed as a replicated or global service,
         and associated parameters
     :param networks: List of network names or IDs or NetworkAttachmentConfig to attach the service to.
-    :param placement: Placement instructions for the scheduler. If a list is passed instead,
-        it is assumed to be a list of constraints as part of a Placement object.
+        NetworkAttachmentConfig object accepts following params:
+        :param target: (str) - The target network for attachment. Can be a network name or ID.
+        :param aliases: (list) - A list of discoverable alternate names for the service.
+        :param options: (dict) - Driver attachment options for the network target.

Review comment:
       I see. I will update it @uranusjr 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] Bowrna closed pull request #22217: added docs about detailed network and constraints information

Posted by GitBox <gi...@apache.org>.
Bowrna closed pull request #22217:
URL: https://github.com/apache/airflow/pull/22217


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] mik-laj commented on a change in pull request #22217: added docs about detailed network and constraints information

Posted by GitBox <gi...@apache.org>.
mik-laj commented on a change in pull request #22217:
URL: https://github.com/apache/airflow/pull/22217#discussion_r825457299



##########
File path: airflow/providers/docker/operators/docker_swarm.py
##########
@@ -86,8 +86,19 @@ class DockerSwarmOperator(DockerOperator):
     :param mode: Indicate whether a service should be deployed as a replicated or global service,
         and associated parameters
     :param networks: List of network names or IDs or NetworkAttachmentConfig to attach the service to.
-    :param placement: Placement instructions for the scheduler. If a list is passed instead,
-        it is assumed to be a list of constraints as part of a Placement object.
+        NetworkAttachmentConfig object accepts following params:

Review comment:
       We already have a link to Docker API reference.
   <img width="932" alt="Screenshot 2022-03-13 at 15 29 50" src="https://user-images.githubusercontent.com/12058428/158064360-0a96c238-527d-4a15-a54f-d66cd705d4d8.png">
   I am not sure if we need to duplicate this documentation as it can be maintenance burden




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] Bowrna commented on a change in pull request #22217: added docs about detailed network and constraints information

Posted by GitBox <gi...@apache.org>.
Bowrna commented on a change in pull request #22217:
URL: https://github.com/apache/airflow/pull/22217#discussion_r826552566



##########
File path: airflow/providers/docker/operators/docker_swarm.py
##########
@@ -86,8 +86,19 @@ class DockerSwarmOperator(DockerOperator):
     :param mode: Indicate whether a service should be deployed as a replicated or global service,
         and associated parameters
     :param networks: List of network names or IDs or NetworkAttachmentConfig to attach the service to.
-    :param placement: Placement instructions for the scheduler. If a list is passed instead,
-        it is assumed to be a list of constraints as part of a Placement object.
+        NetworkAttachmentConfig object accepts following params:

Review comment:
       hmm ok @mik-laj. That makes sense. 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] mik-laj commented on a change in pull request #22217: added docs about detailed network and constraints information

Posted by GitBox <gi...@apache.org>.
mik-laj commented on a change in pull request #22217:
URL: https://github.com/apache/airflow/pull/22217#discussion_r826089680



##########
File path: airflow/providers/docker/operators/docker_swarm.py
##########
@@ -86,8 +86,19 @@ class DockerSwarmOperator(DockerOperator):
     :param mode: Indicate whether a service should be deployed as a replicated or global service,
         and associated parameters
     :param networks: List of network names or IDs or NetworkAttachmentConfig to attach the service to.
-    :param placement: Placement instructions for the scheduler. If a list is passed instead,
-        it is assumed to be a list of constraints as part of a Placement object.
+        NetworkAttachmentConfig object accepts following params:

Review comment:
       I guess we can close the ticket with the comment that we can't reproduce the problem because we have the documentation, and it's only natural for someone to miss it sometimes.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] Bowrna commented on a change in pull request #22217: added docs about detailed network and constraints information

Posted by GitBox <gi...@apache.org>.
Bowrna commented on a change in pull request #22217:
URL: https://github.com/apache/airflow/pull/22217#discussion_r825570397



##########
File path: airflow/providers/docker/operators/docker_swarm.py
##########
@@ -86,8 +86,19 @@ class DockerSwarmOperator(DockerOperator):
     :param mode: Indicate whether a service should be deployed as a replicated or global service,
         and associated parameters
     :param networks: List of network names or IDs or NetworkAttachmentConfig to attach the service to.
-    :param placement: Placement instructions for the scheduler. If a list is passed instead,
-        it is assumed to be a list of constraints as part of a Placement object.
+        NetworkAttachmentConfig object accepts following params:

Review comment:
       yes, it makes sense. I have raised this PR in response to this issue #15974
   It looked like the constraints and network option is overlooked. therefore I have added this to the documentation. What do you suggest wrt this issue? @mik-laj 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] uranusjr commented on a change in pull request #22217: added docs about detailed network and constraints information

Posted by GitBox <gi...@apache.org>.
uranusjr commented on a change in pull request #22217:
URL: https://github.com/apache/airflow/pull/22217#discussion_r825399461



##########
File path: airflow/providers/docker/operators/docker_swarm.py
##########
@@ -86,8 +86,16 @@ class DockerSwarmOperator(DockerOperator):
     :param mode: Indicate whether a service should be deployed as a replicated or global service,
         and associated parameters
     :param networks: List of network names or IDs or NetworkAttachmentConfig to attach the service to.
-    :param placement: Placement instructions for the scheduler. If a list is passed instead,
-        it is assumed to be a list of constraints as part of a Placement object.
+        NetworkAttachmentConfig object accepts following params:
+        :param target: (str) - The target network for attachment. Can be a network name or ID.
+        :param aliases: (list) - A list of discoverable alternate names for the service.
+        :param options: (dict) - Driver attachment options for the network target.

Review comment:
       These can’t use `:param` since it does not support nesting (as far as I know). You need to use simple bullet points.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org