Repository navigation
Add missing docker files - #8
Merged
Merged
Conversation
Updated message when return False if compose library is not installed.
And more Boron deprecation warnings to Carbon
sphinx build fixes doc additions for new modules including thorium
Docker events depends on docker api >= 1.22 but current AWS ECS Docker version is 1.9.1
Fixes #34630
This does the following: - Splits states for container/volume/image/network management into four separate state modules. - Preserves backward compatibility by making ``docker.image_present`` invoke ``docker_image.present``, etc. - Changes how Salt detects that a container needs to be replaced. Instead of comparing each passed argument to the named container's configuration, it creates a temporary container, and compares that container to the named container. If the two differ, then the older container is removed, and the new one is renamed and started, becoming the named container. - Removes the unit tests for container management and replaces them with integration tests. - Adds unit tests for the new salt.utils.docker
… releases Also fix an issue with the result was not set to None when running the state in test mode.
With the merging of #39996, salt/modules/docker.py now imports salt.utils.docker. However, our loader appends the module dir (in this case salt/modules/) to sys.path temporarily for the length of the loading process. So, as the docker execution module tries to import salt.utils.docker, when salt.utils.docker attempts to do an "import docker", and docker-py is *not* installed, this results in salt/modules/docker.py (the docker execution module) being loaded in its place, which results in tracebacks in the minion log. Renaming the docker execution module keeps this import shadowing from occurring. Note that we don't need to do this for the placeholder salt/states/docker.py as it does not import salt.utils.docker.
* Check only ssh-rsa encyption for set_known_host * Windows test fix * Fix pre-commit * add CentOS Stream to _OS_FAMILY_MAP, fix #59161 * added changelog and test * fix syntax * Use centosstream 8 for testing * Use ? for matching spaces Technically this isn't *quite* right as 'CentOSyStream' would also match, but it's pretty reasonable: - OS grains shouldn't ever be that kind of close - This test is only swapping out spaces, and only for the os grain. That would mean there would have to be two OSes with grains that only differ by one having a space where another one has any other character. - This test really isn't even about matching grains, we're just using compound matching and that's a reasonable one to use. * Add centos stream when detecting package manager name * Fix pre-commit * Remove tests for fedora 32/33 EOL * Remove tests for fedora 32/33 EOL * Remove tests for fedora 33 EOL * Use centosstream 8 for testing * Use ? for matching spaces Technically this isn't *quite* right as 'CentOSyStream' would also match, but it's pretty reasonable: - OS grains shouldn't ever be that kind of close - This test is only swapping out spaces, and only for the os grain. That would mean there would have to be two OSes with grains that only differ by one having a space where another one has any other character. - This test really isn't even about matching grains, we're just using compound matching and that's a reasonable one to use. * 3002.9: Fix pre-commit * 3003.5 Fix pre-commit * [3002.9] Replace use of 'sl' with 'paper' for Arch tests, due to 'sl' having key issues * Remove mojave testing * Remove mojave and high sierra testing * Remove mojave testing * [3002.9] Fix cloud vultr size issue * Update package name to aspnetcore-runtime-6.0 for redhat 8 pkg tests * Update package name to aspnetcore-runtime-6.0 for redhat 8 pkg tests * change amazon linux AMI * Migrate `unit.modules.test_gpg` to PyTest * Don't leave any `gpg-agent`'s running behind Signed-off-by: Pedro Algarvio <[email protected]> * Start a background process to generate entropy. Some tests have failed because of not enough entropy which then makes the test timeout. Signed-off-by: Pedro Algarvio <[email protected]> * A different approach at generating entropy Signed-off-by: Pedro Algarvio <[email protected]> * Turn entropy generation into a helper Signed-off-by: Pedro Algarvio <[email protected]> * change amazon linux AMI * change amazon linux AMI * [3004.2] Fix cloud vultr size issue * Fix cloud requirements * Skip pam tests on windows * Update ami to try to get the tests running * Update amis to try to get the tests running * Fixing test_publish_to_pubserv_ipc_tcp, moving the call to socket.socket into the while loop. * Add static requirements for 3.8 and 3.9 on Windows * Fix requirements Signed-off-by: Pedro Algarvio <[email protected]> * The whole CI process is already slower than GH Actions, no caches. * Pre-commit must not run with ``PIP_EXTRA_INDEX_URL`` set. * Lint fixes Signed-off-by: Pedro Algarvio <[email protected]> * Compile cloud requirements * Run add requirements files for 3.8 and 3.9 * Fix docs and cloud requirements * [3003.5] Fix cloud vultr size issue * Windows test fix * Skip test if docker not running * [3003.5] Fix pre-commit * Update Markup and contextfunction imports for jinja versions >=3.1. * update bootstrap to 2022.03.15 * update bootstrap to 2022.03.15 * skipping tests/pytests/integration/modules/test_virt.py on 3002.x and 3003.x branches. * Windows test fix * Skip PAM tests on Windows Windows has no ctypes with the PAM bits, so we should go ahead and skip on Windows. * Skip PAM auth tests on Windows Windows lacks the correct bits, so... * Fix pre-commit * Skipping tests since they're also skipped on the master branch Fixes #403 Signed-off-by: Pedro Algarvio <[email protected]> * Skip test that only runs because the patch binary is now available. The feature though, was only added in 3004. Fixes #404 Signed-off-by: Pedro Algarvio <[email protected]> * Skip test which is only supposed to run in Linux Fixes https://github.com/saltstack/salt-priv/issues/405 Signed-off-by: Pedro Algarvio <[email protected]> * GPG tests do not work on windows yet * Fix tests * Fix pre-commit * skip tests.integration.modules.test_mac_brew_pkg.BrewModuleTest.test_list_upgrades and tests.integration.modules.test_state.StateModuleTest.test_get_file_from_env_in_top_match on Mac OS. * skip tests.integration.modules.test_mac_brew_pkg.BrewModuleTest.test_list_upgrades and tests.integration.modules.test_state.StateModuleTest.test_get_file_from_env_in_top_match on Mac OS. * Removing skip, moving it to different PR. * Skipping tests on 3002.9. * test fix * Do not run patch tests on 3003.5. Feature not added till 3004 * skipping tests/pytests/integration/modules/test_virt.py on 3002.x and 3003.x branches. * Fix pre-commit * [3004.2] Update freebsd ami * Bump the git version for freebsd CI tests * removing versions that are no longer available from the tests.pytests.scenarios.compat.test_with_versions tests. * Skip tests on windows when NOT using static requirements Signed-off-by: Pedro Algarvio <[email protected]> * removing versions that are no longer available from the tests.pytests.scenarios.compat.test_with_versions tests. * test_issue_36469_tcp causes a fatal python error when run on Mac OS, so skipping. * Fix tests * Fix pre-commit * Do not run patch tests on 3003.5. Feature not added till 3004 * Skip archive tar tests on windows * [3002.9] Skip archive tar tests on windows * GPG tests do not work on windows yet * Skip test which is only supposed to run in Linux Fixes https://github.com/saltstack/salt-priv/issues/405 Signed-off-by: Pedro Algarvio <[email protected]> * Skip test that only runs because the patch binary is now available. The feature though, was only added in 3004. Fixes #404 Signed-off-by: Pedro Algarvio <[email protected]> * Skipping tests since they're also skipped on the master branch Fixes #403 Signed-off-by: Pedro Algarvio <[email protected]> * Fix pre-commit * Fix pre-commit * Fix pre-commit * Fix pre-commit * retry sdb.get if it returns None None is an entirely valid return - see EtcdClient.get in salt/utils/etcd_util.py * drop py2/six * fix etcd sdb.set as well * Fix etdcd-sdb test failure If docker container is up and running, but etcd isn't responding yet it's possible that we get some failing tests. This should wait a reasonable amount of time for things to come up. Or just skip the test. * Fix etdcd-sdb test failure If docker container is up and running, but etcd isn't responding yet it's possible that we get some failing tests. This should wait a reasonable amount of time for things to come up. Or just skip the test. * Skip the tests from unit/transport/test_zero.py that are hanging on Mac. * skip tests in tests/pytests/unit/states/test_archive.py for 3002.9 * 3002.9 Skipping CA permissions tests on Windows, similar to 3003.5 and 3004.2 * change skipif to skip * Rollback Windows AMIs to use Python 3.7 * Rollback AMI's to Python 3.7... fix tests * Fix failing test_archive tests * Build using pyenv * Add symlinks to openssl and rpath * Add shasum for zeromq 4.3.4 * Fix docs on scripts * Build zeromq earlier, fix symlinks * Bring 61446 to 3004.1 branch * Add changelog and tests * Fix schedule test flakiness * Retry with new port if in use * fixing failing tests, ensuring that the correct path is used. * fixing failing tests, ensuring that the correct path is used. * fixing failing tests, ensuring that the correct path is used. * Re-enable tiamat-pip on windows Signed-off-by: Pedro Algarvio <[email protected]> * Bump duration time for windwos for test_retry_option_success * Skip test cauing hangs * go go pylint disable * more pre-commit * oh lint * so many weird hook failures * Add unit tests for PAM auth CVE We could add functional tests if it's important enough, but this is the narrowest place to test. * Fix PAM auth CVE Credit to @ysf Previously we weren't checking the result of PAM_ACCT_MGMT. * pylint disable * rewrite hook changes * Skip PAM auth tests on Windows Since Windows ends out lacking the correct bits, no need to run tests there. * pre-commit fixes * docs 3004.2 release * Fix bug in tcp transport * Fix the test_zeromq_filtering test * skip test_npm_install_url_referenced_package on centos 7 and 8. * Swapping CentOS Linux-8 for CentOS Stream-8 * Update build scripts to use pyenv * Fix tests on MacOS * Fix bug in tcp transport * Fix test failures * Update release notes and man pages for 3003.5 * Add 3002.9 changelog, release notes, man pages * Update doc/topics/releases/3002.9.rst Co-authored-by: Megan Wilhite <[email protected]> * Fix requirements * Fix imports * Test fixup * Fix merge warts * fix merge wart in changelog * Fix merge warts in tests Co-authored-by: krionbsd <[email protected]> Co-authored-by: Megan Wilhite <[email protected]> Co-authored-by: Alexander Kriventsov <[email protected]> Co-authored-by: Megan Wilhite <[email protected]> Co-authored-by: Wayne Werner <[email protected]> Co-authored-by: Gareth J. Greenaway <[email protected]> Co-authored-by: David Murphy < [email protected]> Co-authored-by: Twangboy <[email protected]> Co-authored-by: MKLeb <[email protected]> Co-authored-by: Pedro Algarvio <[email protected]> Co-authored-by: Pedro Algarvio <[email protected]> Co-authored-by: Thomas Phipps <[email protected]> Co-authored-by: Frode Gundersen <[email protected]> Co-authored-by: Alyssa Rock <[email protected]> Co-authored-by: Alyssa Rock <[email protected]>
Signed-off-by: Pedro Algarvio <[email protected]>
Signed-off-by: Pedro Algarvio <[email protected]>
Docker 29 added an empty-string ``IPRange`` field to every IPAM ``Config`` entry returned by ``docker inspect``. Salt's network comparison was strict on dict keys, so the existing network (with the new placeholder field) no longer matched the Salt-built desired config (which omits the field) and ``docker_network.present`` would report ``Network would be recreated with new config`` on every state run. Drop empty/None placeholder values from IPAM ``Config`` entries before comparing them in ``docker.compare_networks``, and apply the same normalisation to the default-pool short-circuit in ``docker_network.present`` so a network created without an explicit IPAM configuration is still recognised as default. Fixes #68518
* Rewrite dockercompose module to use python-on-whales Replace docker-compose v1 (EOL) with python-on-whales as the backend. Squashed from PR #63051 (author: ITJamie). Refs #62743 * Gate python_on_whales backend behind opt-in config for LTS Add a `dockercompose:use_python_on_whales` minion config flag that selects the `python_on_whales` (docker compose v2) backend. On 3006.x/3007.x/3008.x the legacy `compose` library remains the default so existing users are not broken by the new dependency or by any behavioural differences between the two implementations. If the flag is set but `python_on_whales` is not installed, log a warning and fall back to the legacy backend rather than failing. The default flips to `python_on_whales` in 3009, at which point the flag becomes a deprecated no-op. Also swap `project.ps(all=True)` for `project.compose.ps(all=True)` in the v2 branch of the lifecycle helpers so the container listing is compose- scoped rather than host-scoped. Consolidate the two changelog entries (62743, 63051) into a single 63051 entry describing the opt-in behaviour. --------- Co-authored-by: Daniel A. Wozniak <[email protected]>
- docker_network.present passed its own explicit `ignore=` list to docker.compare_networks(), which shadowed the previous "ignore Status" default-value fix and never took effect. Update the actual call site so the live IPAM-usage `Status` field is ignored there too. - tests/support/pytest/mysql.py: saltfactories' Container.start() reuses the same (once-randomized) container name across its own internal retry attempts, and doesn't catch docker.errors.APIError from containers.run(). On Ubuntu 26.04 a failed force-remove between attempts (likely a docker/containerd removal race) leaves the old container around, so the next internal attempt 409s and crashes the fixture. Retry container creation with a freshly-randomized name on that specific error instead of propagating it.
m-czernek
force-pushed
the
fix-add-files
branch
from
September 16, 2026 07:33
0741d8c to
ea9ad78
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #8 +/- ##
===========================================
+ Coverage 26.18% 42.21% +16.02%
===========================================
Files 15 25 +10
Lines 3979 6360 +2381
Branches 717 1092 +375
===========================================
+ Hits 1042 2685 +1643
- Misses 2853 3458 +605
- Partials 84 217 +133
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
m-czernek
force-pushed
the
fix-add-files
branch
from
September 16, 2026 09:33
7ac243e to
222115d
Compare
3 tasks
vzhestkov
approved these changes
Sep 17, 2026
This was referenced Sep 17, 2026
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This PR adds the following missing files:
And accompanying tests.
Preserving commit history as with all Salt extensions, which is why the PR has ~200 commits.
What issues does this PR fix or reference?
Fixes: #6
Previous Behavior
Files were missing
New Behavior
Files are added
Merge requirements satisfied?
[NOTICE] Bug fixes or new features require tests.
Commits signed with GPG?
Yes/No
Please review Salt's Contributing Guide for best practices.
See GitHub's page on GPG signing for more information about signing commits with GPG.