Skip to content

Fix CI build failures by updating requirement file references#69177

Open
dwoz wants to merge 20 commits into
saltstack:masterfrom
dwoz:fix-ci-builds
Open

Fix CI build failures by updating requirement file references#69177
dwoz wants to merge 20 commits into
saltstack:masterfrom
dwoz:fix-ci-builds

Conversation

@dwoz
Copy link
Copy Markdown
Contributor

@dwoz dwoz commented May 16, 2026

  • Update tools/init.py to use .lock for tools-virustotal.
  • Update GitHub Actions to use correct file extensions in hash-files.py and hashFiles().
  • Fix paths-filter filters in workflows to match .in and .lock files.
  • Update noxfile.py and platform-specific scripts to use .lock extensions.
  • Fix hardcoded .txt references in tests and build backend.

- Update tools/__init__.py to use .lock for tools-virustotal.
- Update GitHub Actions to use correct file extensions in hash-files.py and hashFiles().
- Fix paths-filter filters in workflows to match .in and .lock files.
- Update noxfile.py and platform-specific scripts to use .lock extensions.
- Fix hardcoded .txt references in tests and build backend.
@dwoz dwoz requested a review from a team as a code owner May 16, 2026 00:15
@dwoz dwoz added the test:full Run the full test suite label May 16, 2026
Daniel A. Wozniak added 17 commits May 15, 2026 23:15
Ensure that Windows, Darwin, and FreeBSD sessions correctly target .lock
files for static requirements and .in files for source requirements.
- Update .github/workflows/templates/layout.yml.jinja to use correct .in and .lock extensions.
- Regenerate CI, nightly, staging, and scheduled workflows.
- Update setup.py and tools/pkg/salt_build_backend.py to correctly reference .lock files for macOS and Windows locked requirements.
- Fix obsolete paths-filter regexes in depcheck.yml.
- Update pkg/macos/install_salt.sh to correctly reference darwin.lock.
- Update pkg/windows/install_salt.ps1 to correctly reference windows.lock.
- Remove hidden stdout/stderr redirects in macOS install script for better CI visibility.
- Fix remaining .in references in agent documentation.
- Add double quotes around $GITHUB_PATH to prevent globbing and word splitting, resolving SC2086.
…ests

- Fix 'deactivate' command not found in pkg/macos/build_python.sh and pkg/windows/build_python.ps1 to resolve macOS/Windows 'Build Source Packages' failures.
- Update tools changelog commands in ci.yml template to explicitly use salt-version so that deb and rpm packages are built with the correct expected version for 'Test Package' jobs.
- Fix flaky test_log_sanitize[ls] in tests/pytests/unit/utils/test_vt.py by draining child output.
- Change --salt-version to positional argument for tools changelog update-deb and update-rpm.
- Make setup.py respect the SALT_VERSION environment variable if it's set.
- Pass SALT_VERSION explicitly to 'Build Deb', 'Build RPM', 'Build MacOS Package', and 'Build Windows Packages' jobs in build-packages.yml. This ensures pip isolation does not fall back to 'git describe' and stamp the package with the wrong global tag (e.g. 3008.0rc4 instead of 3008.0rc2...).
- Add SALT_VERSION environment variable to 'Create Source Tarball' step so that 'setup.py sdist' generates the correct salt/_version.txt inside the tarball.
- Simplify deactivate logic in macOS and Windows build_python scripts to aggressively unset virtualenv variables, bypassing shell function execution issues in CI.
… salt/version.py

- Add a check in __get_version() to respect the SALT_VERSION environment variable if it's set.
- This ensures that when pip install is run (e.g. during a Debian or RPM build) and the _version.txt file is missing from the isolated build environment, the build process won't fall back to running 'git describe' and pulling the newest (incorrect) global tag.
- Always write salt/_version.txt to the build library during 'setup.py build', bypassing the previous conditional check for 'build_wheel'.
- Because pip uses isolated PEP 517 builds (which delegates to 'setuptools.build_meta' instead of invoking the custom 'bdist_wheel' command), the 'build_wheel' flag was never set. This caused the version file to be dropped from all packages, resulting in 'salt-master --version' falling back to the hardcoded Argon version and failing CI upgrade tests.
- Pass SALT_VERSION environment variable down to debuild and rpmbuild in tools/pkg/build.py so the packages are built with the correct version.
- Add double quotes around $GITHUB_PATH in dependabot-sync.yml to prevent globbing and word splitting, resolving SC2086.
- Add SALT_VERSION environment variable to 'Install Salt Into Onedir' step in build-onedir-salt action so that 'pip install' correctly picks it up.
- Directly write _version.txt in setup.py during the build step, bypassing the WriteSaltVersion command which was silently skipping the write if the sdist version file already existed.
…ce checkout

- During 'Test Packages', nox runs inside a Docker container where the repo root is bind-mounted and added to PYTHONPATH by the testing framework.
- This causes the installed 'salt-master' inside the container to import the 'salt' module from the source checkout instead of the installed package in site-packages.
- Since the source checkout was a fresh git clone, 'salt/_version.txt' was missing. This caused 'salt/version.py' to fall back to 'git describe', which erroneously found the newest global tag ('3008.0rc4') and caused the upgrade tests to fail.
- Adding a simple 'echo > salt/_version.txt' immediately after checkout ensures that even when the source module is imported, it reports the correct version.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:full Run the full test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant