diff --git a/.copier-answers.yml b/.copier-answers.yml index cff1faf..06e03d6 100644 --- a/.copier-answers.yml +++ b/.copier-answers.yml @@ -1,6 +1,6 @@ # Autogenerated. Do not edit this by hand, use `copier update`. --- -_commit: 0.9.0 +_commit: 0.10.0 _src_path: https://github.com/salt-extensions/salt-extension-copier author: Salt Core Team author_email: saltproject@vmware.com @@ -13,7 +13,7 @@ license: apache loaders: - module - state -max_salt_version: '3007' +max_salt_version: '3008' no_saltext_namespace: false os_support: - Linux diff --git a/.github/actions/upload-exitstatus/action.yml b/.github/actions/upload-exitstatus/action.yml index 66915eb..164a40f 100644 --- a/.github/actions/upload-exitstatus/action.yml +++ b/.github/actions/upload-exitstatus/action.yml @@ -25,7 +25,7 @@ runs: - name: Upload Exit Status if: always() - uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: ${{ inputs.artifact_prefix }}${{ inputs.name == '' && github.job || inputs.name }} path: exitstatus diff --git a/.github/workflows/deploy-docs-action.yml b/.github/workflows/deploy-docs-action.yml index 861804b..56aa364 100644 --- a/.github/workflows/deploy-docs-action.yml +++ b/.github/workflows/deploy-docs-action.yml @@ -42,7 +42,7 @@ jobs: steps: - name: Download built docs - uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0 + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 with: name: ${{ inputs.artifact-name }} path: html-docs @@ -50,25 +50,25 @@ jobs: run-id: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.id || github.run_id }} - name: Upload GitHub Pages artifact - uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4.0.0 + uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0 with: name: html-docs-pages path: html-docs - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5 + uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0 with: artifact_name: html-docs-pages - name: Delete GitHub Pages artifact if: always() - uses: geekyeggo/delete-artifact@7ee91e82b4a7f3339cd8b14beace3d826a2aac39 # v5.1.0 + uses: geekyeggo/delete-artifact@176a747ab7e287e3ff4787bf8a148716375ca118 # v6.0.0 with: name: html-docs-pages failOnError: false - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - name: Upload Exit Status if: always() diff --git a/.github/workflows/deploy-package-action.yml b/.github/workflows/deploy-package-action.yml index 15f7959..78adcd9 100644 --- a/.github/workflows/deploy-package-action.yml +++ b/.github/workflows/deploy-package-action.yml @@ -21,7 +21,7 @@ jobs: steps: - name: Download expected version - uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0 + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 with: name: version.txt path: ${{ runner.temp }} @@ -29,7 +29,7 @@ jobs: run-id: ${{ github.event.workflow_run.id }} - name: Download Python Package Artifacts - uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0 + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 with: name: salt-extension-packages path: dist @@ -63,7 +63,7 @@ jobs: steps: - name: Download Python Package Artifacts - uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0 + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 with: name: salt-extension-packages path: dist @@ -92,7 +92,7 @@ jobs: steps: - name: Download Python Package Artifacts - uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0 + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 with: name: salt-extension-packages path: dist @@ -129,7 +129,7 @@ jobs: steps: - name: Download Python Package Artifacts - uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0 + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 with: name: salt-extension-packages path: dist @@ -141,7 +141,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} VERSION: ${{ needs.get_version.outputs.version }} run: | - gh release create "v${{ needs.get_version.outputs.version }}" \ + gh release create "v$VERSION" \ --repo="$GITHUB_REPOSITORY" \ --title="${GITHUB_REPOSITORY#*/} $VERSION" \ --generate-notes \ diff --git a/.github/workflows/docs-action.yml b/.github/workflows/docs-action.yml index 9df3970..88fb80c 100644 --- a/.github/workflows/docs-action.yml +++ b/.github/workflows/docs-action.yml @@ -13,22 +13,22 @@ jobs: timeout-minutes: 10 steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: fetch-depth: 0 - - name: Set up Python 3.10 For Nox - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 + - name: Set up Python 3.11 For Nox + uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 with: - python-version: "3.10" + python-version: "3.11" - name: Install Nox run: | python -m pip install --upgrade pip pip install "nox==$NOX_VERSION" "uv==$UV_VERSION" env: - NOX_VERSION: '2026.2.9' - UV_VERSION: '0.10.11' + NOX_VERSION: '2026.4.10' + UV_VERSION: '0.11.26' - name: Install Doc Requirements run: | @@ -41,7 +41,7 @@ jobs: nox --force-color -e docs - name: Upload built docs as artifact - uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: html-docs path: docs/_build/html diff --git a/.github/workflows/get-changed-files.yml b/.github/workflows/get-changed-files.yml index f19fca2..ded4e26 100644 --- a/.github/workflows/get-changed-files.yml +++ b/.github/workflows/get-changed-files.yml @@ -18,11 +18,11 @@ jobs: changed-files: ${{ toJSON(steps.changed-files.outputs) }} steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - name: Get Changed Files id: changed-files - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 + uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1 with: token: ${{ github.token }} list-files: escape diff --git a/.github/workflows/package-action.yml b/.github/workflows/package-action.yml index 150364a..054d5d2 100644 --- a/.github/workflows/package-action.yml +++ b/.github/workflows/package-action.yml @@ -13,14 +13,14 @@ jobs: runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: fetch-depth: 0 - - name: Set up Python 3.10 - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 + - name: Set up Python 3.11 + uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 with: - python-version: "3.10" + python-version: "3.11" - name: Install build tools run: >- @@ -33,7 +33,7 @@ jobs: run: python -m build --outdir dist/ - name: Upload build artifacts - uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: salt-extension-packages path: dist/* diff --git a/.github/workflows/pre-commit-action.yml b/.github/workflows/pre-commit-action.yml index 39cc242..447e598 100644 --- a/.github/workflows/pre-commit-action.yml +++ b/.github/workflows/pre-commit-action.yml @@ -17,7 +17,7 @@ jobs: name: Pre-Commit runs-on: ubuntu-24.04 container: - image: 'docker.io/library/python:3.10.20-slim-bookworm@sha256:b1f549b1c3da651d93802122ebcb0c3177702a6d549676236c859ad19e79e9da' + image: 'docker.io/library/python:3.10.20-slim-trixie@sha256:5f9928ea39771e8ddf4fb9a96ab24f65f087793635614405a1dc9384f040852e' steps: - name: Install System Deps @@ -26,7 +26,7 @@ jobs: apt-get install -y enchant-2 git gcc make zlib1g-dev libc-dev libffi-dev g++ libxml2 libxml2-dev libxslt-dev libcurl4-openssl-dev libssl-dev libgnutls28-dev git config --global --add safe.directory "$(pwd)" - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - name: Install Pre-Commit run: | diff --git a/.github/workflows/prepare-release-action.yml b/.github/workflows/prepare-release-action.yml index c63552a..2bb3838 100644 --- a/.github/workflows/prepare-release-action.yml +++ b/.github/workflows/prepare-release-action.yml @@ -38,7 +38,7 @@ jobs: fi - name: Generate autorelease token - uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 # v3.0.0 + uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0 if: steps.check-app.outputs.available == '1' id: generate-token with: @@ -46,12 +46,12 @@ jobs: private-key: ${{ secrets.AUTORELEASE_PRIV }} - name: Checkout code - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - - name: Set up Python 3.10 - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 + - name: Set up Python 3.11 + uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 with: - python-version: '3.10' + python-version: '3.11' - name: Install project run: | @@ -73,7 +73,7 @@ jobs: python -m pre_commit run --files=CHANGELOG.md || true - name: Create/update release PR - uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8.1.0 + uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1 with: token: ${{ steps.check-app.outputs.available == '1' && steps.generate-token.outputs.token || github.token }} commit-message: Release v${{ (github.event_name == 'workflow_dispatch' && inputs.version != '') && inputs.version || steps.next-version.outputs.version }} diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 5cea567..723947b 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -66,7 +66,7 @@ jobs: news-fragments-available: ${{ steps.check-available.outputs.available }} steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - name: Check if news fragments are available id: check-available diff --git a/.github/workflows/set-resolution-action.yml b/.github/workflows/set-resolution-action.yml index 67143b3..fb7004a 100644 --- a/.github/workflows/set-resolution-action.yml +++ b/.github/workflows/set-resolution-action.yml @@ -15,7 +15,7 @@ jobs: steps: - name: Download Exit Status Files if: always() - uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0 + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 with: path: exitstatus pattern: exitstatus-* @@ -23,7 +23,7 @@ jobs: - name: Delete Exit Status Artifacts if: always() - uses: geekyeggo/delete-artifact@7ee91e82b4a7f3339cd8b14beace3d826a2aac39 # v5.1.0 + uses: geekyeggo/delete-artifact@176a747ab7e287e3ff4787bf8a148716375ca118 # v6.0.0 with: name: exitstatus-* useGlob: true diff --git a/.github/workflows/tag-auto.yml b/.github/workflows/tag-auto.yml index 3d47110..f02d193 100644 --- a/.github/workflows/tag-auto.yml +++ b/.github/workflows/tag-auto.yml @@ -55,7 +55,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: fetch-tags: true @@ -78,7 +78,7 @@ jobs: run: if git rev-parse "refs/tags/v$VERSION" 2>/dev/null; then exit 1; fi - name: Create tag for release - uses: mathieudutour/github-tag-action@d28fa2ccfbd16e871a4bdf35e11b3ad1bd56c0c1 # v6.2 + uses: mathieudutour/github-tag-action@a22cf08638b34d5badda920f9daf6e72c477b07b # v6.2 with: github_token: ${{ github.token }} custom_tag: ${{ steps.get_version_pr.outputs.version }} @@ -90,7 +90,7 @@ jobs: run: echo -n "$VERSION" > "$RUNNER_TEMP/version.txt" - name: Upload version - uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: archive: false path: ${{ runner.temp }}/version.txt diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml index b67ade7..7a1735e 100644 --- a/.github/workflows/tag.yml +++ b/.github/workflows/tag.yml @@ -21,7 +21,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - name: Extract version from tag name id: get_version_tag @@ -40,7 +40,7 @@ jobs: run: echo -n "$VERSION" > "$RUNNER_TEMP/version.txt" - name: Upload version - uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: archive: false path: ${{ runner.temp }}/version.txt @@ -53,7 +53,7 @@ jobs: steps: - name: Find Pull Request - uses: juliangruber/find-pull-request-action@2956f830b67a9c78c392f00c69404edc4e497d30 # v1.11.0 + uses: juliangruber/find-pull-request-action@92b38d91ef26fd0f47374257f50e78432359a45f # v1.11.1 id: find-pull-request with: branch: release/auto diff --git a/.github/workflows/test-action.yml b/.github/workflows/test-action.yml index 05eb0ad..0c32c10 100644 --- a/.github/workflows/test-action.yml +++ b/.github/workflows/test-action.yml @@ -12,19 +12,20 @@ jobs: strategy: fail-fast: false - max-parallel: 2 + max-parallel: 3 matrix: include: - - {salt-version: "3006.23", python-version: "3.10"} - - {salt-version: "3007.13", python-version: "3.10"} + - {salt-version: "3006.27", python-version: "3.10"} + - {salt-version: "3006.27", python-version: "3.11"} + - {salt-version: "3008.2", python-version: "3.14"} steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: fetch-depth: 2 # coverage: Issue detecting commit SHA - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 + uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 with: python-version: ${{ matrix.python-version }} @@ -33,8 +34,8 @@ jobs: python -m pip install --upgrade pip pip install "nox==$NOX_VERSION" "uv==$UV_VERSION" env: - NOX_VERSION: '2026.2.9' - UV_VERSION: '0.10.11' + NOX_VERSION: '2026.4.10' + UV_VERSION: '0.11.26' - name: Install Test Requirements env: @@ -56,7 +57,7 @@ jobs: echo "flags=$(python -c "import sys; print('{},{},salt_{}'.format('${{ runner.os }}'.replace('-latest', ''), 'py{}{}'.format(*sys.version_info), '_'.join(str(v) for v in '${{ matrix.salt-version }}'.replace('==', '_').split('.'))))")" >> "$GITHUB_OUTPUT" - name: Upload Project Code Coverage - uses: codecov/codecov-action@0561704f0f02c16a585d4c7555e57fa2e44cf909 # v5.5.2 + uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0 with: files: artifacts/coverage-project.xml disable_search: true @@ -64,10 +65,10 @@ jobs: flags: ${{ steps.codecov-flags.outputs.flags }},project name: ${{ runner.os }}-Py${{ matrix.python-version }}-Salt${{ matrix.salt-version }}-project use_oidc: true - version: v11.2.6 + version: v11.2.8 - name: Upload Tests Code Coverage - uses: codecov/codecov-action@0561704f0f02c16a585d4c7555e57fa2e44cf909 # v5.5.2 + uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0 with: files: artifacts/coverage-tests.xml disable_search: true @@ -75,11 +76,11 @@ jobs: flags: ${{ steps.codecov-flags.outputs.flags }},tests name: ${{ runner.os }}-Py${{ matrix.python-version }}-Salt${{ matrix.salt-version }}-tests use_oidc: true - version: v11.2.6 + version: v11.2.8 - name: Upload Logs if: always() - uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: runtests-${{ runner.os }}-py${{ matrix.python-version }}-Salt${{ matrix.salt-version }}.log path: artifacts/runtests-*.log @@ -99,16 +100,16 @@ jobs: max-parallel: 2 matrix: include: - - {salt-version: "3006.23", python-version: "3.10"} - - {salt-version: "3007.13", python-version: "3.10"} + - {salt-version: "3006.27", python-version: "3.11"} + - {salt-version: "3008.2", python-version: "3.14"} steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: fetch-depth: 2 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 + uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 with: python-version: ${{ matrix.python-version }} @@ -117,8 +118,8 @@ jobs: python -m pip install --upgrade pip pip install "nox==$env:NOX_VERSION" "uv==$env:UV_VERSION" env: - NOX_VERSION: '2026.2.9' - UV_VERSION: '0.10.11' + NOX_VERSION: '2026.4.10' + UV_VERSION: '0.11.26' - name: Install Test Requirements shell: bash @@ -145,7 +146,7 @@ jobs: echo "flags=$(python -c "import sys; print('{},{},salt_{}'.format('${{ runner.os }}'.replace('-latest', ''), 'py{}{}'.format(*sys.version_info), '_'.join(str(v) for v in '${{ matrix.salt-version }}'.replace('==', '_').split('.'))))")" >> "$GITHUB_OUTPUT" - name: Upload Project Code Coverage - uses: codecov/codecov-action@0561704f0f02c16a585d4c7555e57fa2e44cf909 # v5.5.2 + uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0 with: files: artifacts/coverage-project.xml disable_search: true @@ -153,10 +154,10 @@ jobs: flags: ${{ steps.codecov-flags.outputs.flags }},project name: ${{ runner.os }}-Py${{ matrix.python-version }}-Salt${{ matrix.salt-version }}-project use_oidc: true - version: v11.2.6 + version: v11.2.8 - name: Upload Tests Code Coverage - uses: codecov/codecov-action@0561704f0f02c16a585d4c7555e57fa2e44cf909 # v5.5.2 + uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0 with: files: artifacts/coverage-tests.xml disable_search: true @@ -164,11 +165,11 @@ jobs: flags: ${{ steps.codecov-flags.outputs.flags }},tests name: ${{ runner.os }}-Py${{ matrix.python-version }}-Salt${{ matrix.salt-version }}-tests use_oidc: true - version: v11.2.6 + version: v11.2.8 - name: Upload Logs if: always() - uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: runtests-${{ runner.os }}-py${{ matrix.python-version }}-Salt${{ matrix.salt-version }}.log path: artifacts/runtests-*.log @@ -188,16 +189,16 @@ jobs: max-parallel: 2 matrix: include: - - {salt-version: "3006.23", python-version: "3.10"} - - {salt-version: "3007.13", python-version: "3.10"} + - {salt-version: "3006.27", python-version: "3.11"} + - {salt-version: "3008.2", python-version: "3.14"} steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: fetch-depth: 2 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 + uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 with: python-version: ${{ matrix.python-version }} @@ -206,8 +207,8 @@ jobs: python -m pip install --upgrade pip pip install "nox==$NOX_VERSION" "uv==$UV_VERSION" env: - NOX_VERSION: '2026.2.9' - UV_VERSION: '0.10.11' + NOX_VERSION: '2026.4.10' + UV_VERSION: '0.11.26' - name: Install Test Requirements env: @@ -229,7 +230,7 @@ jobs: echo "flags=$(python -c "import sys; print('{},{},salt_{}'.format('${{ runner.os }}'.replace('-latest', ''), 'py{}{}'.format(*sys.version_info), '_'.join(str(v) for v in '${{ matrix.salt-version }}'.replace('==', '_').split('.'))))")" >> "$GITHUB_OUTPUT" - name: Upload Project Code Coverage - uses: codecov/codecov-action@0561704f0f02c16a585d4c7555e57fa2e44cf909 # v5.5.2 + uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0 with: files: artifacts/coverage-project.xml disable_search: true @@ -237,10 +238,10 @@ jobs: flags: ${{ steps.codecov-flags.outputs.flags }},project name: ${{ runner.os }}-Py${{ matrix.python-version }}-Salt${{ matrix.salt-version }}-project use_oidc: true - version: v11.2.6 + version: v11.2.8 - name: Upload Tests Code Coverage - uses: codecov/codecov-action@0561704f0f02c16a585d4c7555e57fa2e44cf909 # v5.5.2 + uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0 with: files: artifacts/coverage-tests.xml disable_search: true @@ -248,11 +249,11 @@ jobs: flags: ${{ steps.codecov-flags.outputs.flags }},tests name: ${{ runner.os }}-Py${{ matrix.python-version }}-Salt${{ matrix.salt-version }}-tests use_oidc: true - version: v11.2.6 + version: v11.2.8 - name: Upload Logs if: always() - uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: runtests-${{ runner.os }}-py${{ matrix.python-version }}-Salt${{ matrix.salt-version }}.log path: artifacts/runtests-*.log diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9095bb6..124703f 100755 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -15,7 +15,7 @@ repos: # ----- Formatting ----------------------------------------------------------------------------> - repo: https://github.com/saltstack/pre-commit-remove-import-headers - rev: 209beff8e11fed83f3f0863ccfd95aa663fffaf6 # 1.1.0 + rev: e79f595c0df31b8cb152c53993ce7c3c64f07cd4 # 1.1.0 hooks: - id: remove-import-headers @@ -37,7 +37,7 @@ repos: - repo: https://github.com/saltstack/salt-rewrite # Automatically rewrite code with known rules - rev: 8079cfb7f601e5dbad58b8449d85bb24f1e52082 # 2.5.2 + rev: 2401c0faef69b6b846c719d611bcfe358234d5d1 # 2.5.2 hooks: - id: salt-rewrite alias: rewrite-docstrings @@ -47,7 +47,7 @@ repos: - repo: https://github.com/saltstack/salt-rewrite # Automatically rewrite code with known rules - rev: 8079cfb7f601e5dbad58b8449d85bb24f1e52082 # 2.5.2 + rev: 2401c0faef69b6b846c719d611bcfe358234d5d1 # 2.5.2 hooks: - id: salt-rewrite alias: rewrite-tests @@ -75,20 +75,20 @@ repos: exclude: src/saltext/apache/(__init__|version).py - repo: https://github.com/psf/black - rev: c6755bb741b6481d6b3d3bb563c83fa060db96c9 # 26.3.1 + rev: 87928e6d6761a4a6d22250e1fee5601b3998086e # 26.5.1 hooks: - id: black args: [-l 100] exclude: src/saltext/apache/version.py - repo: https://github.com/adamchainz/blacken-docs - rev: dda8db18cfc68df532abf33b185ecd12d5b7b326 # 1.20.0 + rev: fda77690955e9b63c6687d8806bafd56a526e45f # 1.20.0 hooks: - id: blacken-docs args: [--skip-errors] files: ^(docs/.*\.rst|src/saltext/apache/.*\.py)$ additional_dependencies: - - black==26.3.1 + - black==26.5.1 # <---- Formatting ----------------------------------------------------------------------------- # ----- Security ------------------------------------------------------------------------------> @@ -123,8 +123,8 @@ repos: files: ^((setup|noxfile)|src/.*)\.py$ require_serial: true additional_dependencies: - - nox==2026.2.9 - - uv==0.10.11 # Makes this hook much faster + - nox==2026.4.10 + - uv==0.11.26 # Makes this hook much faster - id: nox alias: lint-tests @@ -134,8 +134,8 @@ repos: files: ^tests/.*\.py$ require_serial: true additional_dependencies: - - nox==2026.2.9 - - uv==0.10.11 # Makes this hook much faster + - nox==2026.4.10 + - uv==0.11.26 # Makes this hook much faster - repo: https://github.com/Mateusz-Grzelinski/actionlint-py rev: 694e2c0dfb4253d51f3c6c54b8f9fec0a16764dc # v1.7.11.24 diff --git a/.pre-commit-hooks/make-autodocs.py b/.pre-commit-hooks/make-autodocs.py index 354cdf1..93ca110 100644 --- a/.pre-commit-hooks/make-autodocs.py +++ b/.pre-commit-hooks/make-autodocs.py @@ -17,8 +17,8 @@ def _find_virtualname(path): if isinstance(node, ast.Assign): for target in node.targets: if isinstance(target, ast.Name) and target.id == "__virtualname__": - if isinstance(node.value, ast.Str): - virtualname = node.value.s + if isinstance(node.value, ast.Constant) and isinstance(node.value.value, str): + virtualname = node.value.value break else: continue diff --git a/.pylintrc b/.pylintrc index f38bee7..aa5fb63 100755 --- a/.pylintrc +++ b/.pylintrc @@ -649,7 +649,9 @@ additional-builtins=__opts__, __serializers__, __reg__, __executors__, - __events__ + __events__, + __resource__, + __resource_funcs__ # Tells whether unused global variables should be treated as a violation. allow-global-unused-variables=yes diff --git a/Makefile b/Makefile index da02357..c590dbd 100644 --- a/Makefile +++ b/Makefile @@ -43,12 +43,12 @@ changelog: dev ## Render changelog. Requires VERSION parameter. .PHONY: docs docs: dev ## Build docs @source .venv/bin/activate; \ - nox -e docs --extra-pythons=3.10 --python=3.10 + nox -e docs --extra-pythons=3.14 --python=3.14 .PHONY: docs-dev docs-dev: dev ## Build docs, serve them and refresh on changes @source .venv/bin/activate; \ - nox -e docs-dev --extra-pythons=3.10 --python=3.10 + nox -e docs-dev --extra-pythons=3.14 --python=3.14 ## Tests diff --git a/noxfile.py b/noxfile.py index 992f78a..860cba0 100755 --- a/noxfile.py +++ b/noxfile.py @@ -22,7 +22,7 @@ nox.options.default_venv_backend = "uv|virtualenv" # Python versions to test against -PYTHON_VERSIONS = ("3", "3.10") +PYTHON_VERSIONS = ("3", "3.10", "3.11", "3.12", "3.13", "3.14") # Be verbose when running under a CI context CI_RUN = ( os.environ.get("JENKINS_URL") or os.environ.get("CI") or os.environ.get("DRONE") is not None @@ -31,7 +31,7 @@ SKIP_REQUIREMENTS_INSTALL = os.environ.get("SKIP_REQUIREMENTS_INSTALL", "0") == "1" EXTRA_REQUIREMENTS_INSTALL = os.environ.get("EXTRA_REQUIREMENTS_INSTALL") -COVERAGE_REQUIREMENT = os.environ.get("COVERAGE_REQUIREMENT") or "coverage==7.13.4" +COVERAGE_REQUIREMENT = os.environ.get("COVERAGE_REQUIREMENT") or "coverage==7.14.3" SALT_REQUIREMENT = os.environ.get("SALT_REQUIREMENT") or "salt>=3006" if SALT_REQUIREMENT == "salt==master": SALT_REQUIREMENT = "git+https://github.com/saltstack/salt.git@master" diff --git a/pyproject.toml b/pyproject.toml index b267028..84b3f52 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,6 +26,10 @@ classifiers = [ "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", @@ -57,9 +61,9 @@ dev = [ # When initializing the dev env using the included automation, pass # `--extras` to install them automatically. dev_extra = [ - "black==26.3.1", + "black==26.5.1", "isort==8.0.1", - "coverage==7.13.4", + "coverage==7.14.3", ] docs = [ "sphinx", diff --git a/tools/helpers/cmd.py b/tools/helpers/cmd.py index 31cee6a..25257df 100644 --- a/tools/helpers/cmd.py +++ b/tools/helpers/cmd.py @@ -8,12 +8,10 @@ import shlex import shutil import subprocess -import sys from contextlib import contextmanager from dataclasses import dataclass from dataclasses import field from pathlib import Path -from typing import Union class CommandNotFound(RuntimeError): @@ -124,6 +122,15 @@ def path(self): """ return self._env.get("PATH", "").split(os.pathsep) + def which(self, cmd): + """ + Find `cmd` in $PATH. + """ + res = shutil.which(cmd) + if not res: + raise CommandNotFound(cmd) + return Path(res) + @contextmanager def cwd(self, path): """ diff --git a/tools/helpers/venv.py b/tools/helpers/venv.py index fc01818..2434ff7 100644 --- a/tools/helpers/venv.py +++ b/tools/helpers/venv.py @@ -1,5 +1,6 @@ import tempfile from pathlib import Path +from shutil import rmtree from . import prompt from .cmd import CommandNotFound @@ -8,7 +9,7 @@ # Should follow the version used for relenv packages, see # https://github.com/saltstack/salt/blob/master/cicd/shared-gh-workflows-context.yml -RECOMMENDED_PYVER = "3.10" +RECOMMENDED_PYVER = "3.14" # For discovery of existing virtual environment, descending priority. VENV_DIRS = ( ".venv", @@ -18,10 +19,11 @@ ) -try: - uv = local["uv"] -except CommandNotFound: - uv = None +def discover_uv(): + try: + return local["uv"] + except CommandNotFound: + pass def is_venv(path): @@ -38,12 +40,20 @@ def discover_venv(project_root="."): raise RuntimeError(f"No venv found in {base}") +def venv_pyver(venv): + for line in (venv / "pyvenv.cfg").read_text().splitlines(): + if line.startswith("version =") or line.startswith("version_info ="): + pyver = line.split(" = ")[1].split(".") + return f"{pyver[0]}.{pyver[1]}" + + def create_venv(project_root=".", directory=None): base = Path(project_root).resolve() venv = (base / (directory or VENV_DIRS[0])).resolve() if is_venv(venv): raise RuntimeError(f"Venv at {venv} already exists") prompt.status(f"Creating virtual environment at {venv}") + uv = discover_uv() if uv is not None: prompt.status("Found `uv`. Creating venv") uv( @@ -74,6 +84,15 @@ def ensure_project_venv(project_root=".", reinstall=True, install_extras=False): try: venv = discover_venv(project_root) prompt.status(f"Found existing virtual environment at {venv}") + + pyver = venv_pyver(venv) + if pyver != RECOMMENDED_PYVER: + prompt.status( + f"Existing venv has Python {pyver}, but recommended is {RECOMMENDED_PYVER}. Recreating." + ) + rmtree(venv) + raise RuntimeError("Existing venv does not use recommended Python version") + exists = True except RuntimeError: venv = create_venv(project_root) @@ -84,6 +103,7 @@ def ensure_project_venv(project_root=".", reinstall=True, install_extras=False): extras.append("dev_extra") prompt.status(("Reinstalling" if exists else "Installing") + " project and dependencies") with local.venv(venv): + uv = discover_uv() if uv is not None: uv("pip", "install", "-e", f".[{','.join(extras)}]") else: