Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Autogenerated. Do not edit this by hand, use `copier update`.
---
_commit: 0.7.3
_commit: 0.7.4
_src_path: https://github.com/lkubb/salt-extension-copier
author: EITR Technologies, LLC
author_email: devops@eitr.tech
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ jobs:
steps:
- name: Download Exit Status Files
if: always()
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
path: exitstatus
pattern: exitstatus-*
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-docs-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:

steps:
- name: Download built docs
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: ${{ inputs.artifact-name }}
path: html-docs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-package-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:

steps:
- name: Download Python Package Artifacts
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: salt-extension-${{ inputs.version }}-packages
path: dist
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docs-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
fetch-depth: 0

- name: Set up Python 3.10 For Nox
uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: "3.10"

Expand All @@ -25,7 +25,7 @@ jobs:
pip install "nox==$NOX_VERSION" "uv==$UV_VERSION"
env:
NOX_VERSION: '2025.2.9'
UV_VERSION: '0.6.10'
UV_VERSION: '0.6.15'

- name: Install Doc Requirements
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/package-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
fetch-depth: 0

- name: Set up Python 3.10
uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: "3.10"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pre-commit-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
name: Pre-Commit
runs-on: ubuntu-24.04
container:
image: 'docker.io/library/python:3.10.16-slim-bookworm@sha256:06f6d69d229bb55fab83dded514e54eede977e33e92d855ba3f97ce0e3234abc'
image: 'docker.io/library/python:3.10.17-slim-bookworm@sha256:57038683f4a259e17fcff1ccef7ba30b1065f4b3317dabb5bd7c82640a5ed64f'

steps:
- name: Install System Deps
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prepare-release-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Set up Python 3.10
uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: '3.10'

Expand Down
36 changes: 18 additions & 18 deletions .github/workflows/test-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
fetch-depth: 2 # coverage: Issue detecting commit SHA

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -35,7 +35,7 @@ jobs:
pip install "nox==$NOX_VERSION" "uv==$UV_VERSION"
env:
NOX_VERSION: '2025.2.9'
UV_VERSION: '0.6.10'
UV_VERSION: '0.6.15'

- name: Install Test Requirements
env:
Expand All @@ -57,26 +57,26 @@ 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@e96185f4044c2f0cedf0f022454acf9811cf8057 # v5.4.0
uses: codecov/codecov-action@1f60566a86da84c4b4b64c17662a90de97fbb8d7 # v5.4.2
with:
files: artifacts/coverage-project.xml
disable_search: true
fail_ci_if_error: false
flags: ${{ steps.codecov-flags.outputs.flags }},project
name: ${{ runner.os }}-Py${{ matrix.python-version }}-Salt${{ matrix.salt-version }}-project
use_oidc: true
version: v10.3.0
version: v10.4.0

- name: Upload Tests Code Coverage
uses: codecov/codecov-action@e96185f4044c2f0cedf0f022454acf9811cf8057 # v5.4.0
uses: codecov/codecov-action@1f60566a86da84c4b4b64c17662a90de97fbb8d7 # v5.4.2
with:
files: artifacts/coverage-tests.xml
disable_search: true
fail_ci_if_error: false
flags: ${{ steps.codecov-flags.outputs.flags }},tests
name: ${{ runner.os }}-Py${{ matrix.python-version }}-Salt${{ matrix.salt-version }}-tests
use_oidc: true
version: v10.3.0
version: v10.4.0

- name: Upload Logs
if: always()
Expand Down Expand Up @@ -117,7 +117,7 @@ jobs:
fetch-depth: 2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -127,7 +127,7 @@ jobs:
pip install "nox==$env:NOX_VERSION" "uv==$env:UV_VERSION"
env:
NOX_VERSION: '2025.2.9'
UV_VERSION: '0.6.10'
UV_VERSION: '0.6.15'

- name: Install Test Requirements
shell: bash
Expand All @@ -154,26 +154,26 @@ 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@e96185f4044c2f0cedf0f022454acf9811cf8057 # v5.4.0
uses: codecov/codecov-action@1f60566a86da84c4b4b64c17662a90de97fbb8d7 # v5.4.2
with:
files: artifacts/coverage-project.xml
disable_search: true
fail_ci_if_error: false
flags: ${{ steps.codecov-flags.outputs.flags }},project
name: ${{ runner.os }}-Py${{ matrix.python-version }}-Salt${{ matrix.salt-version }}-project
use_oidc: true
version: v10.3.0
version: v10.4.0

- name: Upload Tests Code Coverage
uses: codecov/codecov-action@e96185f4044c2f0cedf0f022454acf9811cf8057 # v5.4.0
uses: codecov/codecov-action@1f60566a86da84c4b4b64c17662a90de97fbb8d7 # v5.4.2
with:
files: artifacts/coverage-tests.xml
disable_search: true
fail_ci_if_error: false
flags: ${{ steps.codecov-flags.outputs.flags }},tests
name: ${{ runner.os }}-Py${{ matrix.python-version }}-Salt${{ matrix.salt-version }}-tests
use_oidc: true
version: v10.3.0
version: v10.4.0

- name: Upload Logs
if: always()
Expand Down Expand Up @@ -214,7 +214,7 @@ jobs:
fetch-depth: 2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -224,7 +224,7 @@ jobs:
pip install "nox==$NOX_VERSION" "uv==$UV_VERSION"
env:
NOX_VERSION: '2025.2.9'
UV_VERSION: '0.6.10'
UV_VERSION: '0.6.15'

- name: Install Test Requirements
env:
Expand All @@ -246,26 +246,26 @@ 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@e96185f4044c2f0cedf0f022454acf9811cf8057 # v5.4.0
uses: codecov/codecov-action@1f60566a86da84c4b4b64c17662a90de97fbb8d7 # v5.4.2
with:
files: artifacts/coverage-project.xml
disable_search: true
fail_ci_if_error: false
flags: ${{ steps.codecov-flags.outputs.flags }},project
name: ${{ runner.os }}-Py${{ matrix.python-version }}-Salt${{ matrix.salt-version }}-project
use_oidc: true
version: v10.3.0
version: v10.4.0

- name: Upload Tests Code Coverage
uses: codecov/codecov-action@e96185f4044c2f0cedf0f022454acf9811cf8057 # v5.4.0
uses: codecov/codecov-action@1f60566a86da84c4b4b64c17662a90de97fbb8d7 # v5.4.2
with:
files: artifacts/coverage-tests.xml
disable_search: true
fail_ci_if_error: false
flags: ${{ steps.codecov-flags.outputs.flags }},tests
name: ${{ runner.os }}-Py${{ matrix.python-version }}-Salt${{ matrix.salt-version }}-tests
use_oidc: true
version: v10.3.0
version: v10.4.0

- name: Upload Logs
if: always()
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ repos:
require_serial: true
additional_dependencies:
- nox==2025.2.9
- uv==0.6.10 # Makes this hook much faster
- uv==0.6.15 # Makes this hook much faster

- id: nox
alias: lint-tests
Expand All @@ -135,7 +135,7 @@ repos:
require_serial: true
additional_dependencies:
- nox==2025.2.9
- uv==0.6.10 # Makes this hook much faster
- uv==0.6.15 # Makes this hook much faster

- repo: https://github.com/Mateusz-Grzelinski/actionlint-py
rev: a185be0fd5b45112845b700d91b81050c75579e2 # v1.7.7.23
Expand Down
17 changes: 15 additions & 2 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.7.1"
COVERAGE_REQUIREMENT = os.environ.get("COVERAGE_REQUIREMENT") or "coverage==7.8.0"
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"
Expand Down Expand Up @@ -98,7 +98,20 @@ def _install_requirements(
session.install(no_progress, COVERAGE_REQUIREMENT, silent=PIP_INSTALL_SILENT)

if install_salt:
session.install(no_progress, SALT_REQUIREMENT, silent=PIP_INSTALL_SILENT)
# Salt does not publish wheels and setuptools 75.6.0+ breaks requirements inclusion during builds,
# so we need to constrain setuptools in the build environment. uv reads this from
# pyproject.toml, but pip has no equivalent behavior.
# We need delete=False for Windows. delete_on_close would work, but is Python 3.12+ only.
with tempfile.NamedTemporaryFile(delete=False) as constraints_file:
setuptools_constraint = "setuptools<75.6.0"
constraints_file.write(setuptools_constraint.encode())
env = {
"PIP_CONSTRAINT": constraints_file.name,
}
try:
session.install(no_progress, SALT_REQUIREMENT, silent=PIP_INSTALL_SILENT, env=env)
finally:
os.unlink(constraints_file.name)

if install_test_requirements:
install_extras.append("tests")
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Tracker = "https://github.com/salt-extensions/saltext-github/issues"
[project.optional-dependencies]
changelog = ["towncrier==24.8.0"]
dev = [
"nox[uv]>=2024.3",
"nox[uv]>=2024.3,!=2025.05.01",
"pre-commit>=2.21.0",
]
# These dependencies are used in automations. It can be helpful
Expand All @@ -61,7 +61,7 @@ dev = [
dev_extra = [
"black==25.1.0",
"isort==6.0.1",
"coverage==7.7.1",
"coverage==7.8.0",
]
docs = [
"sphinx",
Expand Down
12 changes: 11 additions & 1 deletion tools/helpers/venv.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import tempfile
from pathlib import Path

from . import prompt
Expand Down Expand Up @@ -91,7 +92,16 @@ def ensure_project_venv(project_root=".", reinstall=True, install_extras=False):
# It speeds up this step a lot.
local["uv"]("pip", "install", "-e", f".[{','.join(extras)}]")
except CommandNotFound:
local["python"]("-m", "pip", "install", "-e", f".[{','.join(extras)}]")
# Salt does not build correctly with setuptools >= 75.6.0.
# uv reads this constraint from pyproject.toml, but pip needs this workaround.
with tempfile.NamedTemporaryFile(delete=False) as constraints_file:
setuptools_constraint = "setuptools<75.6.0"
constraints_file.write(setuptools_constraint.encode())
try:
with local.env(PIP_CONSTRAINT=constraints_file.name):
local["python"]("-m", "pip", "install", "-e", f".[{','.join(extras)}]")
finally:
Path(constraints_file.name).unlink()
if not exists or not (Path(project_root) / ".git" / "hooks" / "pre-commit").exists():
prompt.status("Installing pre-commit hooks")
local["python"]("-m", "pre_commit", "install", "--install-hooks")
Expand Down