Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker SDK for Python 7+: make sure that ssl_version is not passed, and error out if it was explicitly set #715

Merged
merged 4 commits into from
Dec 9, 2023

Conversation

felixfontein
Copy link
Collaborator

SUMMARY

Also updates the documentation to warn against its usage.

ISSUE TYPE
  • Bugfix Pull Request
  • Docs Pull Request
COMPONENT NAME

common module utils

Copy link

github-actions bot commented Dec 9, 2023

Docs Build 📝

Thank you for contribution!✨

The docs for this PR have been published here:
https://ansible-collections.github.io/community.docker/pr/715

You can compare to the docs for the main branch here:
https://ansible-collections.github.io/community.docker/branch/main

The docsite for this PR is also available for download as an artifact from this run:
https://github.com/ansible-collections/community.docker/actions/runs/7152383938

File changes:

Click to see the diff comparison.

NOTE: only file modifications are shown here. New and deleted files are excluded.
See the file list and check the published docs to see those files.

diff --git a/home/runner/work/community.docker/community.docker/docsbuild/base/docker_compose_module.html b/home/runner/work/community.docker/community.docker/docsbuild/head/docker_compose_module.html
index a2e6720..d07c422 100644
--- a/home/runner/work/community.docker/community.docker/docsbuild/base/docker_compose_module.html
+++ b/home/runner/work/community.docker/community.docker/docsbuild/head/docker_compose_module.html
@@ -487,6 +487,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
 </div></td>
 <td><div class="ansible-option-cell"><p>Provide a valid SSL version number. Default value determined by <a class="reference external" href="https://docs.python.org/3/library/ssl.html">SSL Python module</a>.</p>
 <p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_SSL_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code></a> will be used instead.</p>
+<p><strong>Note:</strong> this option is no longer supported for Docker SDK for Python 7.0.0+. Specifying it with Docker SDK for Python 7.0.0 or newer will lead to an error.</p>
 </div></td>
 </tr>
 <tr class="row-odd"><td><div class="ansible-option-cell">
diff --git a/home/runner/work/community.docker/community.docker/docsbuild/base/docker_config_module.html b/home/runner/work/community.docker/community.docker/docsbuild/head/docker_config_module.html
index d08166f..e7934ec 100644
--- a/home/runner/work/community.docker/community.docker/docsbuild/base/docker_config_module.html
+++ b/home/runner/work/community.docker/community.docker/docsbuild/head/docker_config_module.html
@@ -356,6 +356,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
 </div></td>
 <td><div class="ansible-option-cell"><p>Provide a valid SSL version number. Default value determined by <a class="reference external" href="https://docs.python.org/3/library/ssl.html">SSL Python module</a>.</p>
 <p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_SSL_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code></a> will be used instead.</p>
+<p><strong>Note:</strong> this option is no longer supported for Docker SDK for Python 7.0.0+. Specifying it with Docker SDK for Python 7.0.0 or newer will lead to an error.</p>
 </div></td>
 </tr>
 <tr class="row-even"><td><div class="ansible-option-cell">
diff --git a/home/runner/work/community.docker/community.docker/docsbuild/base/docker_node_info_module.html b/home/runner/work/community.docker/community.docker/docsbuild/head/docker_node_info_module.html
index 354e232..e4756fe 100644
--- a/home/runner/work/community.docker/community.docker/docsbuild/base/docker_node_info_module.html
+++ b/home/runner/work/community.docker/community.docker/docsbuild/head/docker_node_info_module.html
@@ -308,6 +308,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
 </div></td>
 <td><div class="ansible-option-cell"><p>Provide a valid SSL version number. Default value determined by <a class="reference external" href="https://docs.python.org/3/library/ssl.html">SSL Python module</a>.</p>
 <p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_SSL_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code></a> will be used instead.</p>
+<p><strong>Note:</strong> this option is no longer supported for Docker SDK for Python 7.0.0+. Specifying it with Docker SDK for Python 7.0.0 or newer will lead to an error.</p>
 </div></td>
 </tr>
 <tr class="row-odd"><td><div class="ansible-option-cell">
diff --git a/home/runner/work/community.docker/community.docker/docsbuild/base/docker_node_module.html b/home/runner/work/community.docker/community.docker/docsbuild/head/docker_node_module.html
index 9402abd..86472e2 100644
--- a/home/runner/work/community.docker/community.docker/docsbuild/base/docker_node_module.html
+++ b/home/runner/work/community.docker/community.docker/docsbuild/head/docker_node_module.html
@@ -348,6 +348,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
 </div></td>
 <td><div class="ansible-option-cell"><p>Provide a valid SSL version number. Default value determined by <a class="reference external" href="https://docs.python.org/3/library/ssl.html">SSL Python module</a>.</p>
 <p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_SSL_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code></a> will be used instead.</p>
+<p><strong>Note:</strong> this option is no longer supported for Docker SDK for Python 7.0.0+. Specifying it with Docker SDK for Python 7.0.0 or newer will lead to an error.</p>
 </div></td>
 </tr>
 <tr class="row-odd"><td><div class="ansible-option-cell">
diff --git a/home/runner/work/community.docker/community.docker/docsbuild/base/docker_secret_module.html b/home/runner/work/community.docker/community.docker/docsbuild/head/docker_secret_module.html
index d6c8364..43f9277 100644
--- a/home/runner/work/community.docker/community.docker/docsbuild/base/docker_secret_module.html
+++ b/home/runner/work/community.docker/community.docker/docsbuild/head/docker_secret_module.html
@@ -356,6 +356,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
 </div></td>
 <td><div class="ansible-option-cell"><p>Provide a valid SSL version number. Default value determined by <a class="reference external" href="https://docs.python.org/3/library/ssl.html">SSL Python module</a>.</p>
 <p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_SSL_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code></a> will be used instead.</p>
+<p><strong>Note:</strong> this option is no longer supported for Docker SDK for Python 7.0.0+. Specifying it with Docker SDK for Python 7.0.0 or newer will lead to an error.</p>
 </div></td>
 </tr>
 <tr class="row-even"><td><div class="ansible-option-cell">
diff --git a/home/runner/work/community.docker/community.docker/docsbuild/base/docker_swarm_info_module.html b/home/runner/work/community.docker/community.docker/docsbuild/head/docker_swarm_info_module.html
index 3839ced..c5e158c 100644
--- a/home/runner/work/community.docker/community.docker/docsbuild/base/docker_swarm_info_module.html
+++ b/home/runner/work/community.docker/community.docker/docsbuild/head/docker_swarm_info_module.html
@@ -326,6 +326,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
 </div></td>
 <td><div class="ansible-option-cell"><p>Provide a valid SSL version number. Default value determined by <a class="reference external" href="https://docs.python.org/3/library/ssl.html">SSL Python module</a>.</p>
 <p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_SSL_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code></a> will be used instead.</p>
+<p><strong>Note:</strong> this option is no longer supported for Docker SDK for Python 7.0.0+. Specifying it with Docker SDK for Python 7.0.0 or newer will lead to an error.</p>
 </div></td>
 </tr>
 <tr class="row-odd"><td><div class="ansible-option-cell">
diff --git a/home/runner/work/community.docker/community.docker/docsbuild/base/docker_swarm_module.html b/home/runner/work/community.docker/community.docker/docsbuild/head/docker_swarm_module.html
index 45d36d6..bbfcae7 100644
--- a/home/runner/work/community.docker/community.docker/docsbuild/base/docker_swarm_module.html
+++ b/home/runner/work/community.docker/community.docker/docsbuild/head/docker_swarm_module.html
@@ -509,6 +509,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
 </div></td>
 <td><div class="ansible-option-cell"><p>Provide a valid SSL version number. Default value determined by <a class="reference external" href="https://docs.python.org/3/library/ssl.html">SSL Python module</a>.</p>
 <p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_SSL_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code></a> will be used instead.</p>
+<p><strong>Note:</strong> this option is no longer supported for Docker SDK for Python 7.0.0+. Specifying it with Docker SDK for Python 7.0.0 or newer will lead to an error.</p>
 </div></td>
 </tr>
 <tr class="row-odd"><td><div class="ansible-option-cell">
diff --git a/home/runner/work/community.docker/community.docker/docsbuild/base/docker_swarm_service_info_module.html b/home/runner/work/community.docker/community.docker/docsbuild/head/docker_swarm_service_info_module.html
index 581a827..3c1558f 100644
--- a/home/runner/work/community.docker/community.docker/docsbuild/base/docker_swarm_service_info_module.html
+++ b/home/runner/work/community.docker/community.docker/docsbuild/head/docker_swarm_service_info_module.html
@@ -290,6 +290,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
 </div></td>
 <td><div class="ansible-option-cell"><p>Provide a valid SSL version number. Default value determined by <a class="reference external" href="https://docs.python.org/3/library/ssl.html">SSL Python module</a>.</p>
 <p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_SSL_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code></a> will be used instead.</p>
+<p><strong>Note:</strong> this option is no longer supported for Docker SDK for Python 7.0.0+. Specifying it with Docker SDK for Python 7.0.0 or newer will lead to an error.</p>
 </div></td>
 </tr>
 <tr class="row-even"><td><div class="ansible-option-cell">
diff --git a/home/runner/work/community.docker/community.docker/docsbuild/base/docker_swarm_service_module.html b/home/runner/work/community.docker/community.docker/docsbuild/head/docker_swarm_service_module.html
index 95759d2..5f3a914 100644
--- a/home/runner/work/community.docker/community.docker/docsbuild/base/docker_swarm_service_module.html
+++ b/home/runner/work/community.docker/community.docker/docsbuild/head/docker_swarm_service_module.html
@@ -1058,6 +1058,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
 </div></td>
 <td><div class="ansible-option-cell"><p>Provide a valid SSL version number. Default value determined by <a class="reference external" href="https://docs.python.org/3/library/ssl.html">SSL Python module</a>.</p>
 <p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_SSL_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code></a> will be used instead.</p>
+<p><strong>Note:</strong> this option is no longer supported for Docker SDK for Python 7.0.0+. Specifying it with Docker SDK for Python 7.0.0 or newer will lead to an error.</p>
 </div></td>
 </tr>
 <tr class="row-even"><td><div class="ansible-option-cell">

@felixfontein
Copy link
Collaborator Author

CI will fail until the docker_compose tests have been fixed. That will happen in another PR.

@felixfontein
Copy link
Collaborator Author

(Note that all Swarm tests run in groups 1-3, so the tests related to the modules affected by these changes passed.)

@felixfontein felixfontein merged commit 3aa1ddc into ansible-collections:main Dec 9, 2023
121 checks passed
Copy link
Contributor

patchback bot commented Dec 9, 2023

Backport to stable-2: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-2/3aa1ddcca06647b7bd6d34ab35320118f58781de/pr-715

Backported as #720

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request Dec 9, 2023
…nd error out if it was explicitly set (#715)

* Do not accept ssl_version for Docker SDK for Python 7.0.0+.

* Add changelog fragment.

* Generally avoid sending None values to TLSConfig. Potentially prevents similar errors in the future, assuming the users do not pass values in.

* Python 2.6 compatibility.

(cherry picked from commit 3aa1ddc)
@felixfontein felixfontein deleted the docker-7-error branch December 9, 2023 17:59
felixfontein added a commit that referenced this pull request Dec 9, 2023
…nd error out if it was explicitly set (#715) (#720)

* Do not accept ssl_version for Docker SDK for Python 7.0.0+.

* Add changelog fragment.

* Generally avoid sending None values to TLSConfig. Potentially prevents similar errors in the future, assuming the users do not pass values in.

* Python 2.6 compatibility.

(cherry picked from commit 3aa1ddc)

Co-authored-by: Felix Fontein <[email protected]>
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.

1 participant