Versions follow Semantic Versioning (<major>.<minor>.<patch>).
Backward incompatible (breaking) changes will only be introduced in major versions with advance notice in the Deprecations section of releases.
Previous Changelog Entries
Before the 1.0.0 release, due to the fast evolving pace and breakage introduced while developing the library, no changelog was kept. Please refer to the git history for details.
.. towncrier-draft-entries::
- Properly configure the SSHD server when FIPS is enabled/enforced on a system (#179)
- The SSHD daemon implementation now has a get_host_keys method which returns the host keys that can then be written to a
known_hostsfile. (#176)
- CI pipeline changes:
- Stop testing against Pytest 8.0.0rc2 and instead test against 8.0.x
- Stop testing against Salt 3005.x
- Add Salt 3007.x to the versions to test
- Stop testing against Pytest 7.3.x and add 8.1.x to the list of versions to test (#177)
- Add
--sys-info-and-exitwhich basically prints the system information and exit. Doesn't run any tests. (#173)
- Switch pipelines to use Python 3.11 and start testing Pytest 8.0.0rc2 (#173)
- Added a containarized salt master class implementation,
SaltMaster(#169)
- Switch to testing against Salt 3006.x instead of 3005.x (#169)
- The
Container._pull_containercallback now properly registers on theSaltMinionand theSaltMasterclasses whenpull_before_startis True (#168)
- Fix the readthedocs builds due to https://blog.readthedocs.com/migrate-configuration-v2/ (#169)
- Allow the Salt engine to run on Python 3.6 (#167)
- Check if path exists before running additional checks on the temp_directory context manager. (#160)
- The
containerimplementation is now sensible to theexitedstate when starting containers. (#165)
- Updated documentation for SaltEnv temp_file and added an example usage (#163)
- Remove pytest-tempdir package dependency (#154)
- Stop using deprecated @pytest.mark.trylast (#155)
- Simplify and reduce the amount of patching required to unit test loader modules (#156)
- Some internal processes improvements:
- Publish packages to PyPi with trusted publishers
- Enable dependabot to update the GH Actions versions on a weekly basis (#151)
- Start using actionlint and shellcheck to validate GH Actions workflows (#153)
- Improve code coverage by either removing code not getting used anymore or marking sections of the code which are not expected to be covered (#157)
- Several improvements to reduce failure points:
- Log the exception instead of raising it.
- Always populate the *_dirs config settings, regardless of how salt-factories is being used
- Improved the connect/disconnect behavior of the event listener client
- The minimum supported Salt version is now 3005.0
- The minimum supported Pytest version is now 7.0.0 (#149)
- Do not blindly overwrite the retuner_address configuration key (#146)
- Start checking the code base with ruff (#149)
- Fixed Salt's deferred imports to allow onedir builds while not breaking non-onedir builds:
- Additionally, stopped relying on salt.utils.files and salt.utils.yaml
- Stopped using zmq to forward events(this was where the breakage was showing) for a plain TCP implementation.
- The event_listener fixture is now started/stopped like a regular pytest fixture
- The event_listener server now restarts in case something goes wrong to the point where it crashes. (#146)
- Drop support for Python 3.5 and 3.6 (#123)
- Defer all salt imports so that we can use pytest-salt-factories to test onedir builds (#144)
- A few improvements to functional testing support:
- Allow StateReturn to be accessed by key instead of just attribute
- Add warning for when more than a state function is used under the same state key
- Return an instance of MatchString for StateResult.comment (#145)
- Update the github actions versions to avoid deprecation errors (#145)
- Several improvements to the state module wrappers:
- Allow getting the state chunk by __id__ on MultiStateResult
- Wrap a few more functions from salt.modules.state (#140)
- Pipeline and requirements fixes:
- Test against 3005.* and not 3005rc2 since it's now released.
- Install importlib-metadata<5.0.0 since only Salt>=3006 will be able to handle it (#140)
- The spm CLI now properly lays down the configuration files required (#137)
- In saltfactories.utils.cli_scipts.generate_script():
- For coverage tracking, both coverate_db_path and coverage_rc_path must be passed. They will not be infered by root_dir.
- inject_coverage was removed. (#135)
- The minimum Salt version in now 3004 (#136)
- CI and internal changes:
- Start testing Salt 3005.x (rc2 for now)
- Skip testing 3005rc2 on windows and macOS for now.
- Lock system tests to a version of nox that still works
- Bump python version to 3.9 for lint workflow
- Bumped pylint requirement to 2.14.5 and cleaned up issues
- Don't build the salt minion container during test runs, pull an existing container. (#136)
- Renamed the
system_installconfiguration flag, markers and behaviours when set tosystem_serviceto better reflect what it's actually used for. (#96)
- Allow passing
--python-executableto teak which python get's used to prefix CLI commands, when needed. (#129) - Allow passing
--scripts-dirto tell salt-factories where to look for the Salt daemon and CLI scripts. The several scripts to the Salt daemons and CLI's must exist. Also, passing this option will additionally make salt-factories NOT generate said scripts and setpython_executabletoNone(#130) - Added CLI support(
--system-service) to change salt-factories to use Salt previously installed from the platform's package manager. (#131) - Inject
engines_dirsandlog_handlers_dirswhensystem_service=Trueorscripts_pathis notNoneThese flags suggest that the salt being imported and used by salt-factories might not be the same as the one being tested. So, in this case, make sure events and logging from started daemons still get forwarded to salt-factories. (#133)
- Bump deprecations targeted for 2.0.0 to 3.0.0 (#122)
- Try to pass
loaded_base_nameto each of Salt's loaders used in ourLoadersclass, if not supported, patch it at runtime. (#126) saltfactories.utils.warn_until()is now aware of Pytest's rewrite calls and properly reports the offending code. (#127)
Switch to internal start check
callables.Additionally, significant container improvements, like:
- Get host ports to check from the container port bindings.
- Always terminate the containers.
- Support randomly assigned host port bindings
skip_on_salt_system_installis now also a marker provided bypytest-salt-factories. (#120)
- Now that the new logging changes are merged into Salt's master branch, adjust detection of those changes on
SaltKey. (#118)
--timeoutis now correctly passed for CLI factories when eithertimeoutis defined on the configuration or whentimeoutis passed to the CLI factory constructor. (#117)
- Test PyTest 7.0.x and 7.1.x & Fix tests requirements
- Don't allow
pytest-subteststo upgrade pytest - Test under PyTest 7.0.x and 7.1.x
- Force Jinja2 to be < 3.1 on Salt 3003.x
- Fix the requirements of the example
echo-extension - Explicitly pass a timeout to Salt CLI's on spawning platforms.
- Windows builds were not getting passed the
PYTEST_VERSION_REQUIREMENTenv var. (#116)
- Don't allow
- Fixed container tests not passing on macOS (#114)
- Pin click on the black pre-commit hooks (#115)
- Handle docker client initialization error on macOS. (#113)
- Catch
APIErrorwhen removing containers (#112)
- Provide a
SECURITY.mdfile for the project (#67) - It's no longer necessary to pass a docker client instance as
docker_clientwhen using containers. (#111)
- The docker container daemon now pulls the image by default prior to starting it. (#109)
- Provide backwards compatibility imports for the old factory exceptions, now in pytest-shell-utilities (#108)
- Base classes for the
SaltDaemoncontainers order is now fixed. (#110)
- Use old-style Salt entrypoints for improved backwards compatibility. (#98)
- Instead of just removing saltfactories.utils.ports and saltfactories.utils.processes, redirect the imports to the right library and show a deprecation warning. (#106)
- The containers factory does not accept the
stats_processeskeyword. (#105)
- Include the started daemons in the
stats_processesdictionary (#104)
- Wipe the
cachedirfor on eachsaltfactories.utils.functional.Loadersreset (#103)
- Properly handle missing keys in the configuration for the pytest salt logging handler. (#101)
- Fix passing
--timeoutto Salt's CLI's (#102)
- Fix
pathlib.pathtypo (#99) - Fixed issue with
sdistrecompression for reproducible packages not iterating though subdirectories contents. (#100)
- Improve documentation (#92)
- Fix issue where, on system installations, the minion ID on the configuration, if not explicitly passed on
overridesordefaults, would default to the master ID used to create the salt minion factory. (#93) - Allow configuring
root_dirinsetup_salt_factoriesfixture (#95)
- Use salt's entry-points instead of relying on loader
*_dirsconfigs (#98)
- Set lower required python version to 3.5.2 (#97)
- Switch to the extracted pytest plugins
- Switch to pytest-system-statistics
- Switch to pytest-shell-utilities (#90)
- Name things once. (#50)
get_unused_localhost_portno longer cached returned port by default (#51)- Rename the
SaltMaster.get_salt_clitoSaltMaster.salt_cli, forgotten on PR #50 (#70)
- Temporary state tree management
- Add
temp_fileandtemp_directorysupport as pytest helpers - Add
SaltStateTreeandSaltPillarTreefor easier temp files support (#38)
- Add
- Added skip markers for AArch64 platform,
skip_on_aarch64andskip_unless_on_aarch64(#40) - Added a
VirtualEnvhelper class to create and interact with a virtual environment (#43) - Add
skip_on_spawning_platformandskip_unless_on_spawning_platformmarkers (#81)
- Switch project to an
src/based layout (#41) - Start using towncrier to maintain the changelog (#42)
- Forwarding logs, file and pillar roots fixes
- Salt allows minions and proxy minions to also have file and pillar roots configured
- All factories will now send logs of level
debugor higher to the log server (#49)
- Log the test outcome (#52)
- Take into account that
SystemExit.codemight not be an integer on the generated CLI scripts (#62) - Catch unhandled exceptions and write their traceback to
sys.stderrin the generated CLI scripts (#63) - Several fixes/improvements to the
ZMQHandlerlog forwarding handler (#64) - ZMQ needs to reconnect on forked processes or else Salt's own multiprocessing log forwarding log records won't be logged by the
ZMQHandler(#69) - Some more additional changes to the ZMQHandler to make sure it's resources are cleaned when terminating (#74)
- The
sshdserver no longer generatesdsakeys if the system has FIPS enabled (#80) - Add
to_salt_configmethod toSaltEnvandSaltEnvs. This will simplify augmenting the salt configuration dictionary. (#82) - Rename
SaltEnv.to_salt_config()toSaltEnv.as_dict()(#83) - Switch to pytest-skip-markers. (#84)
- Adjust to the upcoming salt loader changes (#77)
- CI pileline adjustements
- Bump salt testing requirement to 3002.6
- Drop testing of FreeBSD since it's too unreliable on Github Actions
- Full clone when testing so that codecov does not complain (#39)
- Upgrade to black 21.4b2 (#56)
- Drop Pytest requirement to 6.0.0 (#57)
- Increase and match CI system tests timeout-minutes to Linux tests timeout-minutes (#64)
- Switch to the new codecov uploader (#72)
- Fix codecov flags, report name, and coverage (#73)
- Update to latest versions on some pre-commit hooks
pyupgrade: 2.23.3reorder_python_imports: 2.6.0black: 21.b7blacken-docs: 1.10.0 (#79)
- Remove
transportkeyword argument from the call tosalt.utils.event.get_event(#87) - Add
buildandreleasenox targets (#89)