Merge branch 'master' into fix-pip.list-local-packages

This commit is contained in:
Nicholas Hughes 2023-01-19 14:29:34 -05:00 committed by GitHub
commit 011871264b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
120 changed files with 3530 additions and 1927 deletions

View file

@ -0,0 +1,17 @@
---
name: setup-python-tools-scripts
description: Setup 'python-tools-scripts'
runs:
using: composite
steps:
- name: Install 'python-tools-scripts'
shell: bash
env:
PIP_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/
PIP_EXTRA_INDEX_URL: https://pypi.org/simple
run: |
PY_VERSION=$(python3 -c "import sys; sys.stdout.write('{}.{}'.format(*sys.version_info))")
python3 -m pip install -r requirements/static/ci/py${PY_VERSION}/tools.txt

View file

@ -0,0 +1,26 @@
---
name: setup-salt-version
description: Setup Salt Version
inputs:
salt-version:
type: string
default: ""
description: >
The Salt version to set prior to running tests or building packages.
If not set, it is discover at run time, like, for example, capturing
the output of running `python3 salt/version.py`
outputs:
salt-version:
value: ${{ steps.setup-salt-version.outputs.salt-version }}
description: The Salt version written to `salt/_version.txt`
runs:
using: composite
steps:
- name: Setup Salt Version
id: setup-salt-version
shell: bash
run: |
tools pkg set-salt-version ${{ inputs.salt-version }}

View file

@ -8,6 +8,13 @@ on:
- cron: '0 */8 * * *' # Run every 8 hours
workflow_dispatch:
inputs:
salt-version:
type: string
default: ""
description: >
The Salt version to set prior to running tests or building packages.
If not set, it is discover at run time, like, for example, capturing
the output of running `python3 salt/version.py`
testrun-type:
description: Type of test run
required: true
@ -19,9 +26,11 @@ on:
env:
COLUMNS: 160
CACHE_SEED: SEED-0 # Bump the number to invalidate all caches
permissions:
contents: read
contents: read # for dorny/paths-filter to fetch a list of changed files
pull-requests: read # for dorny/paths-filter to read pull requests
concurrency:
# Concurrency is defined in a way that concurrent builds against branches do
@ -35,15 +44,16 @@ jobs:
prepare-ci:
name: Prepare CI
runs-on: ubuntu-latest
permissions:
contents: read # for dorny/paths-filter to fetch a list of changed files
pull-requests: read # for dorny/paths-filter to read pull requests
outputs:
jobs: ${{ steps.process-changed-files.outputs.jobs }}
changed-files: ${{ steps.process-changed-files.outputs.changed-files }}
testrun: ${{ steps.define-testrun.outputs.testrun }}
salt-version: ${{ steps.setup-salt-version.outputs.salt-version }}
cache-seed: ${{ steps.set-cache-seed.outputs.cache-seed }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Full clone to also get the tags to get the right salt version
- name: Get Changed Files
id: changed-files
uses: dorny/paths-filter@v2
@ -60,6 +70,12 @@ jobs:
lint-requirements:
- added|modified: &lint_requirements
- requirements/static/ci/py3.*/lint.txt
pkg_requirements:
- added|modified: &pkg_requirements
- requirements/static/pkg/py3.*/darwin.txt
- requirements/static/pkg/py3.*/linux.txt
- requirements/static/pkg/py3.*/freebsd.txt
- requirements/static/pkg/py3.*/windows.txt
test_requirements:
- added|modified: &test_requirements
- requirements/static/ci/py3.*/darwin.txt
@ -91,11 +107,28 @@ jobs:
- added|modified:
- .pylintrc
- *lint_requirements
golden_images:
- added|modified:
- cicd/golden-images.json
testrun:
- added|modified:
- *salt_added_modified
- *tests_added_modified
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Setup Python Tools Scripts
uses: ./.github/actions/setup-python-tools-scripts
- name: Setup Salt Version
id: setup-salt-version
uses: ./.github/actions/setup-salt-version
with:
salt-version: "${{ inputs.salt-version }}"
- name: Write Changed Files To A Local File
run:
echo '${{ toJSON(steps.changed-files.outputs) }}' > changed-files.json
@ -104,18 +137,6 @@ jobs:
run:
cat changed-files.json
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install Python Tools Scripts
env:
PIP_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/
PIP_EXTRA_INDEX_URL: https://pypi.org/simple
run: |
python3 -m pip install -r requirements/static/ci/py3.10/tools.txt
- name: Process Changed Files
id: process-changed-files
run:
@ -126,6 +147,7 @@ jobs:
echo '${{ steps.process-changed-files.outputs.jobs }}' | jq -C '.'
- name: Check Collected Changed Files
if: ${{ github.event_name != 'schedule' }}
run:
echo '${{ steps.process-changed-files.outputs.changed-files }}' | jq -C '.'
@ -150,6 +172,11 @@ jobs:
name: testrun-changed-files.txt
path: testrun-changed-files.txt
- name: Set Cache Seed Output
id: set-cache-seed
run: |
echo "cache-seed=${{ env.CACHE_SEED }}" >> "$GITHUB_OUTPUT"
- name: Set Exit Status
if: always()
run: |
@ -191,7 +218,14 @@ jobs:
with:
changed-files: ${{ needs.prepare-ci.outputs.changed-files }}
twine-check:
name: Twine Check
if: ${{ fromJSON(needs.prepare-ci.outputs.jobs)['github-hosted-runners'] }}
uses: ./.github/workflows/twine-check-action.yml
needs:
- prepare-ci
with:
changed-files: ${{ needs.prepare-ci.outputs.changed-files }}
windows-2016:
name: Windows 2016
@ -203,6 +237,8 @@ jobs:
distro-slug: windows-2016
nox-session: ci-test
testrun: ${{ needs.prepare-ci.outputs.testrun }}
salt-version: "${{ needs.prepare-ci.outputs.salt-version }}"
cache-seed: ${{ needs.prepare-ci.outputs.cache-seed }}
windows-2019:
name: Windows 2019
@ -214,6 +250,8 @@ jobs:
distro-slug: windows-2019
nox-session: ci-test
testrun: ${{ needs.prepare-ci.outputs.testrun }}
salt-version: "${{ needs.prepare-ci.outputs.salt-version }}"
cache-seed: ${{ needs.prepare-ci.outputs.cache-seed }}
windows-2022:
name: Windows 2022
@ -225,6 +263,8 @@ jobs:
distro-slug: windows-2022
nox-session: ci-test
testrun: ${{ needs.prepare-ci.outputs.testrun }}
salt-version: "${{ needs.prepare-ci.outputs.salt-version }}"
cache-seed: ${{ needs.prepare-ci.outputs.cache-seed }}
macos-12:
name: MacOS 12
@ -236,6 +276,8 @@ jobs:
distro-slug: macos-12
nox-session: ci-test
testrun: ${{ needs.prepare-ci.outputs.testrun }}
salt-version: "${{ needs.prepare-ci.outputs.salt-version }}"
cache-seed: ${{ needs.prepare-ci.outputs.cache-seed }}
almalinux-8:
name: Alma Linux 8
@ -247,6 +289,8 @@ jobs:
distro-slug: almalinux-8
nox-session: ci-test
testrun: ${{ needs.prepare-ci.outputs.testrun }}
salt-version: "${{ needs.prepare-ci.outputs.salt-version }}"
cache-seed: ${{ needs.prepare-ci.outputs.cache-seed }}
almalinux-9:
name: Alma Linux 9
@ -258,6 +302,8 @@ jobs:
distro-slug: almalinux-9
nox-session: ci-test
testrun: ${{ needs.prepare-ci.outputs.testrun }}
salt-version: "${{ needs.prepare-ci.outputs.salt-version }}"
cache-seed: ${{ needs.prepare-ci.outputs.cache-seed }}
amazonlinux-2:
name: Amazon Linux 2
@ -269,6 +315,8 @@ jobs:
distro-slug: amazonlinux-2
nox-session: ci-test
testrun: ${{ needs.prepare-ci.outputs.testrun }}
salt-version: "${{ needs.prepare-ci.outputs.salt-version }}"
cache-seed: ${{ needs.prepare-ci.outputs.cache-seed }}
archlinux-lts:
name: Arch Linux LTS
@ -280,6 +328,8 @@ jobs:
distro-slug: archlinux-lts
nox-session: ci-test
testrun: ${{ needs.prepare-ci.outputs.testrun }}
salt-version: "${{ needs.prepare-ci.outputs.salt-version }}"
cache-seed: ${{ needs.prepare-ci.outputs.cache-seed }}
centos-7:
name: CentOS 7
@ -291,6 +341,8 @@ jobs:
distro-slug: centos-7
nox-session: ci-test
testrun: ${{ needs.prepare-ci.outputs.testrun }}
salt-version: "${{ needs.prepare-ci.outputs.salt-version }}"
cache-seed: ${{ needs.prepare-ci.outputs.cache-seed }}
centosstream-8:
name: CentOS Stream 8
@ -302,6 +354,8 @@ jobs:
distro-slug: centosstream-8
nox-session: ci-test
testrun: ${{ needs.prepare-ci.outputs.testrun }}
salt-version: "${{ needs.prepare-ci.outputs.salt-version }}"
cache-seed: ${{ needs.prepare-ci.outputs.cache-seed }}
centosstream-9:
name: CentOS Stream 9
@ -313,6 +367,8 @@ jobs:
distro-slug: centosstream-9
nox-session: ci-test
testrun: ${{ needs.prepare-ci.outputs.testrun }}
salt-version: "${{ needs.prepare-ci.outputs.salt-version }}"
cache-seed: ${{ needs.prepare-ci.outputs.cache-seed }}
debian-10:
name: Debian 10
@ -324,6 +380,8 @@ jobs:
distro-slug: debian-10
nox-session: ci-test
testrun: ${{ needs.prepare-ci.outputs.testrun }}
salt-version: "${{ needs.prepare-ci.outputs.salt-version }}"
cache-seed: ${{ needs.prepare-ci.outputs.cache-seed }}
debian-11:
name: Debian 11
@ -335,6 +393,8 @@ jobs:
distro-slug: debian-11
nox-session: ci-test
testrun: ${{ needs.prepare-ci.outputs.testrun }}
salt-version: "${{ needs.prepare-ci.outputs.salt-version }}"
cache-seed: ${{ needs.prepare-ci.outputs.cache-seed }}
debian-11-arm64:
name: Debian 11 ARM64
@ -346,6 +406,8 @@ jobs:
distro-slug: debian-11-arm64
nox-session: ci-test
testrun: ${{ needs.prepare-ci.outputs.testrun }}
salt-version: "${{ needs.prepare-ci.outputs.salt-version }}"
cache-seed: ${{ needs.prepare-ci.outputs.cache-seed }}
fedora-36:
name: Fedora 36
@ -357,6 +419,8 @@ jobs:
distro-slug: fedora-36
nox-session: ci-test
testrun: ${{ needs.prepare-ci.outputs.testrun }}
salt-version: "${{ needs.prepare-ci.outputs.salt-version }}"
cache-seed: ${{ needs.prepare-ci.outputs.cache-seed }}
opensuse-15:
name: Opensuse 15
@ -368,6 +432,8 @@ jobs:
distro-slug: opensuse-15
nox-session: ci-test
testrun: ${{ needs.prepare-ci.outputs.testrun }}
salt-version: "${{ needs.prepare-ci.outputs.salt-version }}"
cache-seed: ${{ needs.prepare-ci.outputs.cache-seed }}
photon-3:
name: Photon OS 3
@ -379,6 +445,8 @@ jobs:
distro-slug: photonos-3
nox-session: ci-test
testrun: ${{ needs.prepare-ci.outputs.testrun }}
salt-version: "${{ needs.prepare-ci.outputs.salt-version }}"
cache-seed: ${{ needs.prepare-ci.outputs.cache-seed }}
photon-4:
name: Photon OS 4
@ -390,6 +458,8 @@ jobs:
distro-slug: photonos-4
nox-session: ci-test
testrun: ${{ needs.prepare-ci.outputs.testrun }}
salt-version: "${{ needs.prepare-ci.outputs.salt-version }}"
cache-seed: ${{ needs.prepare-ci.outputs.cache-seed }}
ubuntu-1804:
name: Ubuntu 18.04
@ -401,6 +471,8 @@ jobs:
distro-slug: ubuntu-18.04
nox-session: ci-test
testrun: ${{ needs.prepare-ci.outputs.testrun }}
salt-version: "${{ needs.prepare-ci.outputs.salt-version }}"
cache-seed: ${{ needs.prepare-ci.outputs.cache-seed }}
ubuntu-2004:
name: Ubuntu 20.04
@ -412,6 +484,8 @@ jobs:
distro-slug: ubuntu-20.04
nox-session: ci-test
testrun: ${{ needs.prepare-ci.outputs.testrun }}
salt-version: "${{ needs.prepare-ci.outputs.salt-version }}"
cache-seed: ${{ needs.prepare-ci.outputs.cache-seed }}
ubuntu-2004-arm64:
name: Ubuntu 20.04 Arm64
@ -423,6 +497,8 @@ jobs:
distro-slug: ubuntu-20.04-arm64
nox-session: ci-test
testrun: ${{ needs.prepare-ci.outputs.testrun }}
salt-version: "${{ needs.prepare-ci.outputs.salt-version }}"
cache-seed: ${{ needs.prepare-ci.outputs.cache-seed }}
ubuntu-2204:
name: Ubuntu 22.04
@ -434,6 +510,8 @@ jobs:
distro-slug: ubuntu-22.04
nox-session: ci-test
testrun: ${{ needs.prepare-ci.outputs.testrun }}
salt-version: "${{ needs.prepare-ci.outputs.salt-version }}"
cache-seed: ${{ needs.prepare-ci.outputs.cache-seed }}
ubuntu-2204-arm64:
name: Ubuntu 22.04 Arm64
@ -445,6 +523,8 @@ jobs:
distro-slug: ubuntu-22.04-arm64
nox-session: ci-test
testrun: ${{ needs.prepare-ci.outputs.testrun }}
salt-version: "${{ needs.prepare-ci.outputs.salt-version }}"
cache-seed: ${{ needs.prepare-ci.outputs.cache-seed }}
set-pipeline-exit-status:
@ -457,6 +537,7 @@ jobs:
- pre-commit
- docs
- lint
- twine-check
- almalinux-8
- almalinux-9
- amazonlinux-2
@ -490,7 +571,7 @@ jobs:
- name: Delete Exit Status Artifacts
if: always()
uses: geekyeggo/delete-artifact@v1
uses: geekyeggo/delete-artifact@v2
with:
name: exitstatus
failOnError: false

View file

@ -12,7 +12,7 @@ jobs:
Salt:
name: Build Salt Documentation
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' || fromJSON(inputs.changed-files)['docs'] || fromJSON(inputs.changed-files)['salt'] }}
if: ${{ github.event_name == 'push' || github.event_name == 'schedule' || fromJSON(inputs.changed-files)['docs'] || fromJSON(inputs.changed-files)['salt'] }}
container:
image: python:3.8-slim-buster

View file

@ -12,7 +12,7 @@ jobs:
Salt:
name: Lint Salt's Source Code
runs-on: ubuntu-latest
if: ${{ fromJSON(inputs.changed-files)['salt'] || fromJSON(inputs.changed-files)['lint'] }}
if: ${{ github.event_name == 'push' || github.event_name == 'schedule' || fromJSON(inputs.changed-files)['salt'] || fromJSON(inputs.changed-files)['lint'] }}
container:
image: python:3.8-slim-buster

View file

@ -1,67 +0,0 @@
name: PR Checks
on:
pull_request:
types: [opened, synchronize]
permissions:
contents: read
jobs:
Check-Changed-Files-Docstrings:
permissions:
contents: read
pull-requests: write
name: Check Docstrings For Changed Files On PR
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install Dependencies
env:
PIP_EXTRA_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/
run: |
python -m pip install --upgrade pip
pip install pre-commit pygithub
- name: Install Pre-Commit Hooks
run: |
pre-commit install --install-hooks
- id: changed-files
name: Get Changed Files
uses: dorny/paths-filter@v2
with:
token: ${{ github.token }}
list-files: json
filters: |
salt:
- added|modified:
- 'salt/**'
- name: Check Docstrings For Changed Files On PR
id: check-known-missing-docstrings
if: github.event_name == 'pull_request_target' && steps.changed-files.outputs.salt == 'true'
continue-on-error: true
shell: bash
run: |
set -o pipefail
pre-commit run --hook-stage manual check-known-missing-docstrings \
--show-diff-on-failure --color=never \
--files ${{ join(fromJSON(steps.changed-files.outputs.salt_files), ' ') }} | tee output.txt
- name: Comment on PR
# Comment on PRs if pre-commit triggered a failure
if: steps.check-known-missing-docstrings.outcome == 'failure'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
python .github/workflows/scripts/pr-docstring-comments.py \
--org ${{ github.repository_owner }} \
--repo ${{ github.event.repository.name }} \
--issue ${{ github.event.number }} output.txt

View file

@ -47,6 +47,7 @@ jobs:
if: github.event_name == 'pull_request' && fromJSON(inputs.changed-files)['repo']
env:
SKIP: lint-salt,lint-tests
GH_ACTIONS_ANNOTATE: "1"
run: |
pre-commit run --show-diff-on-failure --color=always --files ${{ join(fromJSON(inputs.changed-files)['repo_files'], ' ') }}

View file

@ -1,124 +0,0 @@
import argparse
import os
import pathlib
import sys
import github
from github.GithubException import GithubException
COMMENT_HEADER = "### Hi! I'm your friendly PR bot!"
COMMENT_TEMPLATE = """\
{comment_header}
You might be wondering what I'm doing commenting here on your PR.
**Yes, as a matter of fact, I am...**
I'm just here to help us improve the documentation. I can't respond to
questions or anything, but what I *can* do, I do well!
**Okay... so what do you do?**
I detect modules that are missing docstrings or "CLI Example" on existing docstrings!
When I was created we had a *lot* of these. The documentation for these
modules need some love and attention to make Salt better for our users.
**So what does that have to do with my PR?**
I noticed that in this PR there are some files changed that have some of these
issues. So I'm leaving this comment to let you know your options.
**Okay, what are they?**
Well, my favorite, is that since you were making changes here I'm hoping that
you would be the most familiar with this module and be able to add some other
examples or fix any of the reported issues.
**If I can, then what?**
Well, you can either add them to this PR or add them to another PR. Either way is fine!
**Well... what if I can't, or don't want to?**
That's also fine! We appreciate *all* contributions to the Salt Project. If you
can't add those other examples, either because you're too busy, or unfamiliar,
or you just aren't interested, we still appreciate the contributions that
you've made already.
Whatever approach you decide to take, just drop a comment here letting us know!
<details>
<summary>Detected Issues (click me)</summary>
<pre>{issues_output}</pre>
</details>
---
Thanks again!
"""
def get_previous_comments(pr):
for comment in pr.get_issue_comments():
if comment.user.login != "github-actions[bot]":
# Not a comment made by this bot
continue
if not comment.body.startswith(COMMENT_HEADER):
# This comment does not start with our header
continue
yield comment
def comment_on_pr(options, issues_output):
gh = github.Github(os.environ["GITHUB_TOKEN"])
org = gh.get_organization(options.org)
print(f"Loaded Organization: {org.login}", file=sys.stderr, flush=True)
repo = org.get_repo(options.repo)
print(f"Loaded Repository: {repo.full_name}", file=sys.stderr, flush=True)
pr = repo.get_pull(options.issue)
print(f"Loaded PR: {pr}", file=sys.stderr, flush=True)
comment = pr.create_issue_comment(
COMMENT_TEMPLATE.format(
comment_header=COMMENT_HEADER, issues_output=issues_output
)
)
new_comment_content = COMMENT_TEMPLATE.format(
comment_header=COMMENT_HEADER, issues_output=issues_output
)
for comment in get_previous_comments(pr):
if comment.body.strip() != new_comment_content.strip():
# The content has changed.
print(f"Deleting previous comment {comment}")
comment.delete()
comment = pr.create_issue_comment(new_comment_content)
print(f"Created Comment: {comment}")
def main():
parser = argparse.ArgumentParser()
parser.add_argument("--org", required=True, help="The Github Organization")
parser.add_argument("--repo", required=True, help="The Organization Repository")
parser.add_argument("--issue", required=True, type=int, help="The issue number")
parser.add_argument(
"issues_output_path", metavar="ISSUES_OUTPUT_PATH", type=pathlib.Path
)
if not os.environ.get("GITHUB_TOKEN"):
parser.exit(status=1, message="GITHUB_TOKEN environment variable not set")
options = parser.parse_args()
if not options.issues_output_path.is_file():
parser.exit(1, message=f"The path {options.issues_output_path} is not a file")
issues_output = options.issues_output_path.read_text().strip()
if not issues_output:
parser.exit(1, message=f"The file {options.issues_output_path} is empty")
try:
comment_on_pr(options, issues_output)
parser.exit(0)
except GithubException as exc:
parser.exit(1, message=str(exc))
if __name__ == "__main__":
main()

View file

@ -15,11 +15,19 @@ on:
required: true
type: string
description: JSON string containing information about what and how to run the test suite
cache-seed:
required: true
type: string
description: Seed used to invalidate caches
python-version:
required: false
type: string
description: The python version to run tests with
default: 3.9
default: "3.9"
salt-version:
type: string
required: true
description: The Salt version to set prior to running tests.
env:
@ -40,12 +48,8 @@ jobs:
- name: Checkout Source Code
uses: actions/checkout@v3
- name: Install Python Tools Scripts
env:
PIP_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/
PIP_EXTRA_INDEX_URL: https://pypi.org/simple
run: |
python3 -m pip install -r requirements/static/ci/py3.10/tools.txt
- name: Setup Python Tools Scripts
uses: ./.github/actions/setup-python-tools-scripts
- name: Generate Test Matrix
id: generate-matrix
@ -80,7 +84,7 @@ jobs:
uses: actions/cache@v3
with:
path: nox.${{ inputs.distro-slug }}.tar.*
key: testrun-deps|${{ inputs.distro-slug }}|${{ inputs.nox-session }}|${{ matrix.transport }}|${{ inputs.python-version }}|${{ hashFiles('requirements/**/*.txt') }}
key: ${{ inputs.cache-seed }}|testrun-deps|${{ inputs.distro-slug }}|${{ inputs.nox-session }}|${{ matrix.transport }}|${{ inputs.python-version }}|${{ hashFiles('requirements/**/*.txt') }}
# Skip jobs if nox.*.tar.* is already cached
- name: Set up Python ${{ inputs.python-version }}
@ -125,6 +129,11 @@ jobs:
export PKG_CONFIG_PATH="/usr/local/opt/openssl@3/lib/pkgconfig"
nox --install-only -e ${{ env.NOX_SESSION }}
- name: Cleanup .nox Directory
if: steps.nox-dependencies-cache.outputs.cache-hit != 'true'
run: |
nox -e "pre-archive-cleanup(pkg=False)"
- name: Compress .nox Directory
if: steps.nox-dependencies-cache.outputs.cache-hit != 'true'
run: |
@ -160,6 +169,10 @@ jobs:
- name: Checkout Source Code
uses: actions/checkout@v3
- name: Setup Salt Version
run: |
echo "${{ inputs.salt-version }}" > salt/_version.txt
- name: Install System Dependencies
if: steps.nox-dependencies-cache.outputs.cache-hit != 'true'
run: |
@ -169,7 +182,7 @@ jobs:
uses: actions/cache@v3
with:
path: nox.${{ inputs.distro-slug }}.tar.*
key: testrun-deps|${{ inputs.distro-slug }}|${{ inputs.nox-session }}|${{ matrix.transport }}|${{ inputs.python-version }}|${{ hashFiles('requirements/**/*.txt') }}
key: ${{ inputs.cache-seed }}|testrun-deps|${{ inputs.distro-slug }}|${{ inputs.nox-session }}|${{ matrix.transport }}|${{ inputs.python-version }}|${{ hashFiles('requirements/**/*.txt') }}
- name: Set up Python ${{ inputs.python-version }}
uses: actions/setup-python@v4
@ -284,6 +297,7 @@ jobs:
# with:
# check_name: Test Results(${{ inputs.distro-slug }} ${{ matrix.tests-chunk }})
# report_paths: 'artifacts/xml-unittests-output/*.xml'
# annotate_only: true
- name: Report Salt Code Coverage(${{ matrix.tests-chunk }})
if: always()
@ -391,6 +405,7 @@ jobs:
with:
check_name: Overall Test Results(${{ inputs.distro-slug }})
report_paths: 'artifacts/xml-unittests-output/*.xml'
annotate_only: true
- name: Set Exit Status
if: always()

View file

@ -15,6 +15,14 @@ on:
required: true
type: string
description: JSON string containing information about what and how to run the test suite
salt-version:
type: string
required: true
description: The Salt version to set prior to running tests.
cache-seed:
required: true
type: string
description: Seed used to invalidate caches
env:
@ -27,7 +35,10 @@ jobs:
generate-matrix:
name: Generate Test Matrix
runs-on: ubuntu-latest
runs-on:
- self-hosted
- linux
- x86_64
outputs:
matrix-include: ${{ steps.generate-matrix.outputs.matrix }}
transport-matrix-include: ${{ steps.generate-transport-matrix.outputs.matrix }}
@ -35,12 +46,8 @@ jobs:
- name: Checkout Source Code
uses: actions/checkout@v3
- name: Install Python Tools Scripts
env:
PIP_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/
PIP_EXTRA_INDEX_URL: https://pypi.org/simple
run: |
python3 -m pip install -r requirements/static/ci/py3.10/tools.txt
- name: Setup Python Tools Scripts
uses: ./.github/actions/setup-python-tools-scripts
- name: Generate Test Matrix
id: generate-matrix
@ -78,7 +85,7 @@ jobs:
uses: actions/cache@v3
with:
path: nox.${{ inputs.distro-slug }}.tar.*
key: testrun-deps|${{ inputs.distro-slug }}|${{ inputs.nox-session }}|${{ matrix.transport }}|${{ hashFiles('requirements/**/*.txt', 'cicd/golden-images.json') }}
key: ${{ inputs.cache-seed }}|testrun-deps|${{ inputs.distro-slug }}|${{ inputs.nox-session }}|${{ matrix.transport }}|${{ hashFiles('requirements/**/*.txt', 'cicd/golden-images.json') }}
# Skip jobs if nox.*.tar.* is already cached
- name: PyPi Proxy
@ -86,10 +93,8 @@ jobs:
run: |
sed -i '7s;^;--index-url=https://pypi-proxy.saltstack.net/root/local/+simple/ --extra-index-url=https://pypi.org/simple\n;' requirements/static/ci/*/*.txt
- name: Install Python Tools Scripts
if: steps.nox-dependencies-cache.outputs.cache-hit != 'true'
run: |
python3 -m pip install -r requirements/static/ci/py3.10/tools.txt
- name: Setup Python Tools Scripts
uses: ./.github/actions/setup-python-tools-scripts
- name: Define Nox Session
run: |
@ -119,6 +124,11 @@ jobs:
run: |
tools --timestamps vm install-dependencies --nox-session=${{ env.NOX_SESSION }} ${{ inputs.distro-slug }}
- name: Cleanup .nox Directory
if: steps.nox-dependencies-cache.outputs.cache-hit != 'true'
run: |
tools --timestamps vm pre-archive-cleanup ${{ inputs.distro-slug }}
- name: Compress .nox Directory
if: steps.nox-dependencies-cache.outputs.cache-hit != 'true'
run: |
@ -167,20 +177,22 @@ jobs:
- name: Checkout Source Code
uses: actions/checkout@v3
- name: Setup Salt Version
run: |
echo "${{ inputs.salt-version }}" > salt/_version.txt
- name: Download cached nox.${{ inputs.distro-slug }}.tar.* for session ${{ inputs.nox-session }}
uses: actions/cache@v3
with:
path: nox.${{ inputs.distro-slug }}.tar.*
key: testrun-deps|${{ inputs.distro-slug }}|${{ inputs.nox-session }}|${{ matrix.transport }}|${{ hashFiles('requirements/**/*.txt', 'cicd/golden-images.json') }}
key: ${{ inputs.cache-seed }}|testrun-deps|${{ inputs.distro-slug }}|${{ inputs.nox-session }}|${{ matrix.transport }}|${{ hashFiles('requirements/**/*.txt', 'cicd/golden-images.json') }}
- name: PyPi Proxy
run: |
sed -i '7s;^;--index-url=https://pypi-proxy.saltstack.net/root/local/+simple/ --extra-index-url=https://pypi.org/simple\n;' requirements/static/ci/*/*.txt
- name: Install Python Tools Scripts
run: |
python3 -m pip install -r requirements/static/ci/py3.10/tools.txt
python3 -m pip install 'nox==${{ env.NOX_VERSION }}'
- name: Setup Python Tools Scripts
uses: ./.github/actions/setup-python-tools-scripts
- name: Define Nox Session
run: |
@ -278,6 +290,15 @@ jobs:
# with:
# check_name: Test Results(${{ inputs.distro-slug }} ${{ matrix.tests-chunk }})
# report_paths: 'artifacts/xml-unittests-output/*.xml'
# annotate_only: true
- name: Install Nox
if: always() && steps.download-artifacts-from-vm.outcome == 'success'
env:
PIP_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/
PIP_EXTRA_INDEX_URL: https://pypi.org/simple
run: |
python3 -m pip install 'nox==${{ env.NOX_VERSION }}'
- name: Report Salt Code Coverage(${{ matrix.tests-chunk }})
if: always() && steps.download-artifacts-from-vm.outcome == 'success'
@ -313,7 +334,10 @@ jobs:
report:
name: Reports for ${{ inputs.distro-slug }}(${{ matrix.transport }})
runs-on: ubuntu-latest
runs-on:
- self-hosted
- linux
- x86_64
if: always() && needs.test.result != 'cancelled' && needs.test.result != 'skipped'
needs:
- test
@ -385,6 +409,7 @@ jobs:
with:
check_name: Overall Test Results(${{ inputs.distro-slug }})
report_paths: 'artifacts/xml-unittests-output/*.xml'
annotate_only: true
- name: Set Exit Status
if: always()

View file

@ -1,22 +1,25 @@
name: Twine Check
on: [push, pull_request]
permissions:
contents: read
on:
workflow_call:
inputs:
changed-files:
required: true
type: string
description: JSON string containing information about changed files
jobs:
Twine-Check:
name: Run 'twine check' Against Salt
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
python-version: '3.9'
- name: Install dependencies
env:

View file

@ -1299,7 +1299,7 @@ repos:
- id: nox
alias: lint-salt
name: Lint Salt
files: ^((setup|noxfile)|(salt|tasks)/.*)\.py$
files: ^((setup|noxfile)|(salt|tasks|tools)/.*)\.py$
exclude: >
(?x)^(
templates/.*|

1
changelog/42306.fixed Normal file
View file

@ -0,0 +1 @@
Fixes state pkg.purged to purge removed packages on Debian family systems

1
changelog/62618.fixed Normal file
View file

@ -0,0 +1 @@
Fixed syndic eauth. Now jobs will be published when a valid eauth user is targeting allowed minions/functions.

1
changelog/62933.fixed Normal file
View file

@ -0,0 +1 @@
Restored channel for Syndic minions to send job returns to the Salt master.

View file

@ -1,16 +1,16 @@
alma-8-x86_64: ami-08dc6b90d9bbd6c7e
amazon-2-x86_64: ami-0f971b48d99e61ddb
arch-lts-x86_64: ami-08a57abf695765a9c
centos-7-x86_64: ami-09779851f8883d694
centosstream-9-x86_64: ami-0a72742fe9a135d9a
debian-10-amd64: ami-0af09247a8e729135
debian-11-amd64: ami-066ff58ed77c064df
debian-11-arm64: ami-0aceaefd1945c9c4b
opensuse-15-x86_64: ami-0968766af9b690de3
photon-3-x86_64: ami-0a0427228278405a6
ubuntu-1804-amd64: ami-0318e8360f9820303
ubuntu-2004-amd64: ami-017bb602e57ae79a0
ubuntu-2004-arm64: ami-091042be71e49fe6a
ubuntu-2204-amd64: ami-0054855550c318db6
windows-2016-x64: ami-0a3e06083b5fb7f9f
windows-2019-x64: ami-0d10169f903fb9b1e
alma-8-x86_64: ami-09961fccef817a9ef
amazon-2-x86_64: ami-0266b2760c01d89a4
arch-lts-x86_64: ami-04ae887411feaa715
centos-7-x86_64: ami-0a45d4ae356ee2982
centosstream-9-x86_64: ami-0f9d66d2ef19344f0
debian-10-amd64: ami-0ea6eb8b5f860d8a1
debian-11-amd64: ami-0581a6058da20a17d
debian-11-arm64: ami-0c8b7dff12df47ba9
opensuse-15-x86_64: ami-014a93174618d6da7
photon-3-x86_64: ami-02e8f68f324dae0b6
ubuntu-1804-amd64: ami-00830eefa0545100c
ubuntu-2004-amd64: ami-008bd661d292c4848
ubuntu-2004-arm64: ami-04c76ca9f709e81f9
ubuntu-2204-amd64: ami-046cdaa1b73689025
windows-2016-x64: ami-0dfd4f62f34c9fdc5
windows-2019-x64: ami-07b387a9d8e5d8f85

267
cicd/env-cleanup-files.yml Normal file
View file

@ -0,0 +1,267 @@
---
common:
dir_patterns: &common_dir_patterns
- "**/__pycache__"
- "**/site-packages/test"
- "**/site-packages/tests"
- "**/site-packages/*/test"
- "**/site-packages/*/tests"
- "**/site-packages/ansible_collections/*/*/test"
- "**/site-packages/ansible_collections/*/*/tests"
# Bundled Tornado Test Suite
- "**/salt/ext/tornado/test"
file_patterns: &common_file_patterns
- "*.pyc"
- "*.pyo"
- "**/test/test_*.py*"
- "**/test/**/test_*.py*"
- "**/tests/test_*.py*"
- "**/tests/**/test_*.py*"
ci:
darwin:
dir_patterns: &ci_darwin_dir_patterns
- *common_dir_patterns
file_patterns: &ci_darwin_file_patterns
- *common_file_patterns
linux:
dir_patterns: &ci_linux_dir_patterns
- *common_dir_patterns
file_patterns: &ci_linux_file_patterns
- *common_file_patterns
windows:
dir_patterns: &ci_windows_dir_patterns
- *common_dir_patterns
- "**/artifacts/salt/configs"
- "**/site-packages/adodbapi"
- "**/site-packages/isapi"
- "**/site-packages/pythonwin"
- "**/site-packages/win32/demos"
- "**/site-packages/tempora/tests"
- "**/site-packages/win32/test"
- "**/site-packages/win32com/test"
file_patterns: &ci_windows_file_patterns
- *common_file_patterns
# Help files
- "**/*.chm"
# Non Windows execution modules
- "**/site-packages/salt/modules/aacme.py*"
- "**/site-packages/salt/modules/aix.py*"
- "**/site-packages/salt/modules/alternatives.py*"
- "**/site-packages/salt/modules/apcups.py*"
- "**/site-packages/salt/modules/apf.py*"
- "**/site-packages/salt/modules/apt.py*"
- "**/site-packages/salt/modules/arista.py*"
- "**/site-packages/salt/modules/at.py*"
- "**/site-packages/salt/modules/bcache.py*"
- "**/site-packages/salt/modules/blockdev.py*"
- "**/site-packages/salt/modules/bluez.py*"
- "**/site-packages/salt/modules/bridge.py*"
- "**/site-packages/salt/modules/bsd.py*"
- "**/site-packages/salt/modules/btrfs.py*"
- "**/site-packages/salt/modules/ceph.py*"
- "**/site-packages/salt/modules/container_resource.py*"
- "**/site-packages/salt/modules/cron.py*"
- "**/site-packages/salt/modules/csf.py*"
- "**/site-packages/salt/modules/daemontools.py*"
- "**/site-packages/salt/modules/deb*.py*"
- "**/site-packages/salt/modules/devmap.py*"
- "**/site-packages/salt/modules/dpkg.py*"
- "**/site-packages/salt/modules/ebuild.py*"
- "**/site-packages/salt/modules/eix.py*"
- "**/site-packages/salt/modules/eselect.py*"
- "**/site-packages/salt/modules/ethtool.py*"
- "**/site-packages/salt/modules/extfs.py*"
- "**/site-packages/salt/modules/firewalld.py*"
- "**/site-packages/salt/modules/freebsd.py*"
- "**/site-packages/salt/modules/genesis.py*"
- "**/site-packages/salt/modules/gentoo.py*"
- "**/site-packages/salt/modules/glusterfs.py*"
- "**/site-packages/salt/modules/gnomedesktop.py*"
- "**/site-packages/salt/modules/groupadd.py*"
- "**/site-packages/salt/modules/grub_legacy.py*"
- "**/site-packages/salt/modules/guestfs.py*"
- "**/site-packages/salt/modules/htpasswd.py*"
- "**/site-packages/salt/modules/ilo.py*"
- "**/site-packages/salt/modules/img.py*"
- "**/site-packages/salt/modules/incron.py*"
- "**/site-packages/salt/modules/inspector.py*"
- "**/site-packages/salt/modules/ipset.py*"
- "**/site-packages/salt/modules/iptables.py*"
- "**/site-packages/salt/modules/iwtools.py*"
- "**/site-packages/salt/modules/k8s.py*"
- "**/site-packages/salt/modules/kapacitor.py*"
- "**/site-packages/salt/modules/keyboard.py*"
- "**/site-packages/salt/modules/keystone.py*"
- "**/site-packages/salt/modules/kmod.py*"
- "**/site-packages/salt/modules/layman.py*"
- "**/site-packages/salt/modules/linux.py*"
- "**/site-packages/salt/modules/localemod.py*"
- "**/site-packages/salt/modules/locate.py*"
- "**/site-packages/salt/modules/logadm.py*"
- "**/site-packages/salt/modules/logrotate.py*"
- "**/site-packages/salt/modules/lvs.py*"
- "**/site-packages/salt/modules/lxc.py*"
- "**/site-packages/salt/modules/mac.py*"
- "**/site-packages/salt/modules/makeconf.py*"
- "**/site-packages/salt/modules/mdadm.py*"
- "**/site-packages/salt/modules/mdata.py*"
- "**/site-packages/salt/modules/monit.py*"
- "**/site-packages/salt/modules/moosefs.py*"
- "**/site-packages/salt/modules/mount.py*"
- "**/site-packages/salt/modules/napalm.py*"
- "**/site-packages/salt/modules/netbsd.py*"
- "**/site-packages/salt/modules/netscaler.py*"
- "**/site-packages/salt/modules/neutron.py*"
- "**/site-packages/salt/modules/nfs3.py*"
- "**/site-packages/salt/modules/nftables.py*"
- "**/site-packages/salt/modules/nova.py*"
- "**/site-packages/salt/modules/nspawn.py*"
- "**/site-packages/salt/modules/openbsd.py*"
- "**/site-packages/salt/modules/openstack.py*"
- "**/site-packages/salt/modules/openvswitch.py*"
- "**/site-packages/salt/modules/opkg.py*"
- "**/site-packages/salt/modules/pacman.py*"
- "**/site-packages/salt/modules/parallels.py*"
- "**/site-packages/salt/modules/parted.py*"
- "**/site-packages/salt/modules/pcs.py*"
- "**/site-packages/salt/modules/pkgin.py*"
- "**/site-packages/salt/modules/pkgng.py*"
- "**/site-packages/salt/modules/pkgutil.py*"
- "**/site-packages/salt/modules/portage_config.py*"
- "**/site-packages/salt/modules/postfix.py*"
- "**/site-packages/salt/modules/poudriere.py*"
- "**/site-packages/salt/modules/powerpath.py*"
- "**/site-packages/salt/modules/pw_.py*"
- "**/site-packages/salt/modules/qemu_.py*"
- "**/site-packages/salt/modules/quota.py*"
- "**/site-packages/salt/modules/redismod.py*"
- "**/site-packages/salt/modules/restartcheck.py*"
- "**/site-packages/salt/modules/rh_.py*"
- "**/site-packages/salt/modules/riak.py*"
- "**/site-packages/salt/modules/rpm.py*"
- "**/site-packages/salt/modules/runit.py*"
- "**/site-packages/salt/modules/s6.py*"
- "**/site-packages/salt/modules/scsi.py*"
- "**/site-packages/salt/modules/seed.py*"
- "**/site-packages/salt/modules/sensors.py*"
- "**/site-packages/salt/modules/service.py*"
- "**/site-packages/salt/modules/shadow.py*"
- "**/site-packages/salt/modules/smartos.py*"
- "**/site-packages/salt/modules/smf.py*"
- "**/site-packages/salt/modules/snapper.py*"
- "**/site-packages/salt/modules/solaris.py*"
- "**/site-packages/salt/modules/solr.py*"
- "**/site-packages/salt/modules/ssh_.py*"
- "**/site-packages/salt/modules/supervisord.py*"
- "**/site-packages/salt/modules/sysbench.py*"
- "**/site-packages/salt/modules/sysfs.py*"
- "**/site-packages/salt/modules/sysrc.py*"
- "**/site-packages/salt/modules/system.py*"
- "**/site-packages/salt/modules/test_virtual.py*"
- "**/site-packages/salt/modules/timezone.py*"
- "**/site-packages/salt/modules/trafficserver.py*"
- "**/site-packages/salt/modules/tuned.py*"
- "**/site-packages/salt/modules/udev.py*"
- "**/site-packages/salt/modules/upstart.py*"
- "**/site-packages/salt/modules/useradd.py*"
- "**/site-packages/salt/modules/uswgi.py*"
- "**/site-packages/salt/modules/varnish.py*"
- "**/site-packages/salt/modules/vbox.py*"
- "**/site-packages/salt/modules/virt.py*"
- "**/site-packages/salt/modules/xapi.py*"
- "**/site-packages/salt/modules/xbpspkg.py*"
- "**/site-packages/salt/modules/xfs.py*"
- "**/site-packages/salt/modules/yum*.py*"
- "**/site-packages/salt/modules/zfs.py*"
- "**/site-packages/salt/modules/znc.py*"
- "**/site-packages/salt/modules/zpool.py*"
- "**/site-packages/salt/modules/zypper.py*"
# Non Windows state modules
- "**/site-packages/salt/states/acme.py*"
- "**/site-packages/salt/states/alternatives.py*"
- "**/site-packages/salt/states/apt.py*"
- "**/site-packages/salt/states/at.py*"
- "**/site-packages/salt/states/blockdev.py*"
- "**/site-packages/salt/states/ceph.py*"
- "**/site-packages/salt/states/cron.py*"
- "**/site-packages/salt/states/csf.py*"
- "**/site-packages/salt/states/deb.py*"
- "**/site-packages/salt/states/eselect.py*"
- "**/site-packages/salt/states/ethtool.py*"
- "**/site-packages/salt/states/firewalld.py*"
- "**/site-packages/salt/states/glusterfs.py*"
- "**/site-packages/salt/states/gnome.py*"
- "**/site-packages/salt/states/htpasswd.py*"
- "**/site-packages/salt/states/incron.py*"
- "**/site-packages/salt/states/ipset.py*"
- "**/site-packages/salt/states/iptables.py*"
- "**/site-packages/salt/states/k8s.py*"
- "**/site-packages/salt/states/kapacitor.py*"
- "**/site-packages/salt/states/keyboard.py*"
- "**/site-packages/salt/states/keystone.py*"
- "**/site-packages/salt/states/kmod.py*"
- "**/site-packages/salt/states/layman.py*"
- "**/site-packages/salt/states/linux.py*"
- "**/site-packages/salt/states/lxc.py*"
- "**/site-packages/salt/states/mac.py*"
- "**/site-packages/salt/states/makeconf.py*"
- "**/site-packages/salt/states/mdadm.py*"
- "**/site-packages/salt/states/monit.py*"
- "**/site-packages/salt/states/mount.py*"
- "**/site-packages/salt/states/nftables.py*"
- "**/site-packages/salt/states/pcs.py*"
- "**/site-packages/salt/states/pkgng.py*"
- "**/site-packages/salt/states/portage.py*"
- "**/site-packages/salt/states/powerpath.py*"
- "**/site-packages/salt/states/quota.py*"
- "**/site-packages/salt/states/redismod.py*"
- "**/site-packages/salt/states/smartos.py*"
- "**/site-packages/salt/states/snapper.py*"
- "**/site-packages/salt/states/ssh.py*"
- "**/site-packages/salt/states/supervisord.py*"
- "**/site-packages/salt/states/sysrc.py*"
- "**/site-packages/salt/states/trafficserver.py*"
- "**/site-packages/salt/states/tuned.py*"
- "**/site-packages/salt/states/vbox.py*"
- "**/site-packages/salt/states/virt.py.py*"
- "**/site-packages/salt/states/zfs.py*"
- "**/site-packages/salt/states/zpool.py*"
pkg:
darwin:
dir_patterns:
- *ci_darwin_dir_patterns
- "**/pkgconfig"
- "**/share"
- "**/artifacts/salt/opt"
- "**/artifacts/salt/etc"
- "**/artifacts/salt/Lib"
file_patterns:
- *ci_darwin_file_patterns
linux:
dir_patterns:
- *ci_linux_dir_patterns
file_patterns:
- *ci_linux_file_patterns
windows:
dir_patterns:
- *ci_windows_dir_patterns
- "**/salt/share"
file_patterns:
- *ci_windows_file_patterns
- "**/Scripts/py.exe"
- "**/Scripts/pyw.exe"
- "**/Scripts/pythonw.exe"
- "**/Scripts/venvlauncher.exe"
- "**/Scripts/venvwlauncher.exe"
- "**/Scripts/wheel*"
- "**/doc"
- "**/readme"
- "**/salt/salt-api*"
- "**/salt/salt-key*"
- "**/salt/salt-run*"
- "**/salt/salt-syndic*"
- "**/salt/salt-unity*"
- "**/salt/spm*"
- "**/salt/wheel*"

View file

@ -1,8 +1,8 @@
{
"almalinux-8": {
"ami": "ami-08dc6b90d9bbd6c7e",
"ami": "ami-09961fccef817a9ef",
"ami_description": "CI Image of AlmaLinux 8 x86_64",
"ami_name": "salt-project/ci/almalinux/8/x86_64/20221216.1749",
"ami_name": "salt-project/ci/almalinux/8/x86_64/20230117.1237",
"arch": "x86_64",
"cloudwatch-agent-available": "true",
"instance_type": "t3a.large",
@ -10,9 +10,9 @@
"ssh_username": "ec2-user"
},
"almalinux-9": {
"ami": "ami-0e1b8aa27832662e8",
"ami": "ami-05810f528f7878bff",
"ami_description": "CI Image of AlmaLinux 9 x86_64",
"ami_name": "salt-project/ci/almalinux/9/x86_64/20221216.1749",
"ami_name": "salt-project/ci/almalinux/9/x86_64/20230117.1237",
"arch": "x86_64",
"cloudwatch-agent-available": "true",
"instance_type": "t3a.large",
@ -20,9 +20,9 @@
"ssh_username": "ec2-user"
},
"amazonlinux-2": {
"ami": "ami-0f971b48d99e61ddb",
"ami": "ami-0266b2760c01d89a4",
"ami_description": "CI Image of AmazonLinux 2 x86_64",
"ami_name": "salt-project/ci/amazonlinux/2/x86_64/20221216.1749",
"ami_name": "salt-project/ci/amazonlinux/2/x86_64/20230117.1236",
"arch": "x86_64",
"cloudwatch-agent-available": "true",
"instance_type": "t3a.large",
@ -30,9 +30,9 @@
"ssh_username": "ec2-user"
},
"archlinux-lts": {
"ami": "ami-08a57abf695765a9c",
"ami": "ami-04ae887411feaa715",
"ami_description": "CI Image of ArchLinux lts x86_64",
"ami_name": "salt-project/ci/archlinux/lts/x86_64/20221216.1748",
"ami_name": "salt-project/ci/archlinux/lts/x86_64/20230117.1237",
"arch": "x86_64",
"cloudwatch-agent-available": "false",
"instance_type": "t3a.large",
@ -40,9 +40,9 @@
"ssh_username": "arch"
},
"centos-7": {
"ami": "ami-09779851f8883d694",
"ami": "ami-0a45d4ae356ee2982",
"ami_description": "CI Image of CentOS 7 x86_64",
"ami_name": "salt-project/ci/centos/7/x86_64/20221216.1749",
"ami_name": "salt-project/ci/centos/7/x86_64/20230117.1237",
"arch": "x86_64",
"cloudwatch-agent-available": "true",
"instance_type": "t3a.large",
@ -50,9 +50,9 @@
"ssh_username": "centos"
},
"centosstream-8": {
"ami": "ami-04399d388dcd2d34d",
"ami": "ami-0a9864783b49581fc",
"ami_description": "CI Image of CentOSStream 8 x86_64",
"ami_name": "salt-project/ci/centosstream/8/x86_64/20221216.1749",
"ami_name": "salt-project/ci/centosstream/8/x86_64/20230117.1237",
"arch": "x86_64",
"cloudwatch-agent-available": "true",
"instance_type": "t3a.large",
@ -60,9 +60,9 @@
"ssh_username": "cloud-user"
},
"centosstream-9": {
"ami": "ami-0a72742fe9a135d9a",
"ami": "ami-0f9d66d2ef19344f0",
"ami_description": "CI Image of CentOSStream 9 x86_64",
"ami_name": "salt-project/ci/centosstream/9/x86_64/20221216.1749",
"ami_name": "salt-project/ci/centosstream/9/x86_64/20230117.1237",
"arch": "x86_64",
"cloudwatch-agent-available": "true",
"instance_type": "t3a.large",
@ -70,9 +70,9 @@
"ssh_username": "ec2-user"
},
"debian-10": {
"ami": "ami-0af09247a8e729135",
"ami": "ami-0ea6eb8b5f860d8a1",
"ami_description": "CI Image of Debian 10 x86_64",
"ami_name": "salt-project/ci/debian/10/x86_64/20221216.1749",
"ami_name": "salt-project/ci/debian/10/x86_64/20230117.1237",
"arch": "x86_64",
"cloudwatch-agent-available": "true",
"instance_type": "t3a.large",
@ -80,9 +80,9 @@
"ssh_username": "admin"
},
"debian-11-arm64": {
"ami": "ami-0aceaefd1945c9c4b",
"ami": "ami-0c8b7dff12df47ba9",
"ami_description": "CI Image of Debian 11 arm64",
"ami_name": "salt-project/ci/debian/11/arm64/20221216.1749",
"ami_name": "salt-project/ci/debian/11/arm64/20230117.1237",
"arch": "arm64",
"cloudwatch-agent-available": "false",
"instance_type": "m6g.large",
@ -90,9 +90,9 @@
"ssh_username": "admin"
},
"debian-11": {
"ami": "ami-066ff58ed77c064df",
"ami": "ami-0581a6058da20a17d",
"ami_description": "CI Image of Debian 11 x86_64",
"ami_name": "salt-project/ci/debian/11/x86_64/20221216.1749",
"ami_name": "salt-project/ci/debian/11/x86_64/20230117.1237",
"arch": "x86_64",
"cloudwatch-agent-available": "true",
"instance_type": "t3a.large",
@ -100,9 +100,9 @@
"ssh_username": "admin"
},
"fedora-36": {
"ami": "ami-0c195dbb138da45eb",
"ami": "ami-0d18d7a9c38a45715",
"ami_description": "CI Image of Fedora 36 x86_64",
"ami_name": "salt-project/ci/fedora/36/x86_64/20221216.1749",
"ami_name": "salt-project/ci/fedora/36/x86_64/20230117.1237",
"arch": "x86_64",
"cloudwatch-agent-available": "true",
"instance_type": "t3a.large",
@ -110,9 +110,9 @@
"ssh_username": "fedora"
},
"opensuse-15": {
"ami": "ami-0968766af9b690de3",
"ami": "ami-014a93174618d6da7",
"ami_description": "CI Image of Opensuse 15 x86_64",
"ami_name": "salt-project/ci/opensuse/15/x86_64/20221216.1749",
"ami_name": "salt-project/ci/opensuse/15/x86_64/20230117.1237",
"arch": "x86_64",
"cloudwatch-agent-available": "true",
"instance_type": "t3a.large",
@ -120,9 +120,9 @@
"ssh_username": "ec2-user"
},
"photonos-3": {
"ami": "ami-0a0427228278405a6",
"ami": "ami-02e8f68f324dae0b6",
"ami_description": "CI Image of PhotonOS 3 x86_64",
"ami_name": "salt-project/ci/photonos/3/x86_64/20221216.1749",
"ami_name": "salt-project/ci/photonos/3/x86_64/20230117.1237",
"arch": "x86_64",
"cloudwatch-agent-available": "true",
"instance_type": "t3a.large",
@ -130,9 +130,9 @@
"ssh_username": "root"
},
"photonos-4": {
"ami": "ami-0625b349482dde35b",
"ami": "ami-0ebdae3c2bc3a6c6c",
"ami_description": "CI Image of PhotonOS 4 x86_64",
"ami_name": "salt-project/ci/photonos/4/x86_64/20221216.1749",
"ami_name": "salt-project/ci/photonos/4/x86_64/20230117.1237",
"arch": "x86_64",
"cloudwatch-agent-available": "true",
"instance_type": "t3a.large",
@ -140,9 +140,9 @@
"ssh_username": "root"
},
"ubuntu-18.04": {
"ami": "ami-0318e8360f9820303",
"ami": "ami-00830eefa0545100c",
"ami_description": "CI Image of Ubuntu 18.04 x86_64",
"ami_name": "salt-project/ci/ubuntu/18.04/x86_64/20221216.1749",
"ami_name": "salt-project/ci/ubuntu/18.04/x86_64/20230117.1237",
"arch": "x86_64",
"cloudwatch-agent-available": "true",
"instance_type": "t3a.large",
@ -150,9 +150,9 @@
"ssh_username": "ubuntu"
},
"ubuntu-20.04-arm64": {
"ami": "ami-091042be71e49fe6a",
"ami": "ami-04c76ca9f709e81f9",
"ami_description": "CI Image of Ubuntu 20.04 arm64",
"ami_name": "salt-project/ci/ubuntu/20.04/arm64/20221216.1749",
"ami_name": "salt-project/ci/ubuntu/20.04/arm64/20230117.1237",
"arch": "arm64",
"cloudwatch-agent-available": "true",
"instance_type": "m6g.large",
@ -160,9 +160,9 @@
"ssh_username": "ubuntu"
},
"ubuntu-20.04": {
"ami": "ami-017bb602e57ae79a0",
"ami": "ami-008bd661d292c4848",
"ami_description": "CI Image of Ubuntu 20.04 x86_64",
"ami_name": "salt-project/ci/ubuntu/20.04/x86_64/20221216.1749",
"ami_name": "salt-project/ci/ubuntu/20.04/x86_64/20230117.1237",
"arch": "x86_64",
"cloudwatch-agent-available": "true",
"instance_type": "t3a.large",
@ -170,9 +170,9 @@
"ssh_username": "ubuntu"
},
"ubuntu-22.04-arm64": {
"ami": "ami-0c4d5df372250aa37",
"ami": "ami-0ec137d3046df90f7",
"ami_description": "CI Image of Ubuntu 22.04 arm64",
"ami_name": "salt-project/ci/ubuntu/22.04/arm64/20221216.1749",
"ami_name": "salt-project/ci/ubuntu/22.04/arm64/20230117.1237",
"arch": "arm64",
"cloudwatch-agent-available": "true",
"instance_type": "m6g.large",
@ -180,9 +180,9 @@
"ssh_username": "ubuntu"
},
"ubuntu-22.04": {
"ami": "ami-0054855550c318db6",
"ami": "ami-046cdaa1b73689025",
"ami_description": "CI Image of Ubuntu 22.04 x86_64",
"ami_name": "salt-project/ci/ubuntu/22.04/x86_64/20221216.1749",
"ami_name": "salt-project/ci/ubuntu/22.04/x86_64/20230117.1237",
"arch": "x86_64",
"cloudwatch-agent-available": "true",
"instance_type": "t3a.large",
@ -190,31 +190,31 @@
"ssh_username": "ubuntu"
},
"windows-2016": {
"ami": "ami-0a3e06083b5fb7f9f",
"ami": "ami-0dfd4f62f34c9fdc5",
"ami_description": "CI Image of Windows 2016 x86_64",
"ami_name": "salt-project/ci/windows/2016/x86_64/20221216.1749",
"ami_name": "salt-project/ci/windows/2016/x86_64/20230117.1237",
"arch": "x86_64",
"cloudwatch-agent-available": "false",
"cloudwatch-agent-available": "true",
"instance_type": "t3a.xlarge",
"is_windows": "true",
"ssh_username": "Administrator"
},
"windows-2019": {
"ami": "ami-0d10169f903fb9b1e",
"ami": "ami-07b387a9d8e5d8f85",
"ami_description": "CI Image of Windows 2019 x86_64",
"ami_name": "salt-project/ci/windows/2019/x86_64/20221216.1749",
"ami_name": "salt-project/ci/windows/2019/x86_64/20230117.1237",
"arch": "x86_64",
"cloudwatch-agent-available": "false",
"cloudwatch-agent-available": "true",
"instance_type": "t3a.xlarge",
"is_windows": "true",
"ssh_username": "Administrator"
},
"windows-2022": {
"ami": "ami-07fadb82cecb37c33",
"ami": "ami-0ed6abf248f8a412c",
"ami_description": "CI Image of Windows 2022 x86_64",
"ami_name": "salt-project/ci/windows/2022/x86_64/20221216.1749",
"ami_name": "salt-project/ci/windows/2022/x86_64/20230117.1237",
"arch": "x86_64",
"cloudwatch-agent-available": "false",
"cloudwatch-agent-available": "true",
"instance_type": "t3a.xlarge",
"is_windows": "true",
"ssh_username": "Administrator"

View file

@ -150,3 +150,13 @@ Run the following on the Salt minion:
.. _salt-users: https://groups.google.com/forum/#!forum/salt-users
.. _salt-announce: https://groups.google.com/forum/#!forum/salt-announce
Hardening of syndic setups
==========================
Syndics must be run as the same user as their syndic master process. The master
of master's will include publisher ACL information in jobs sent to downstream
masters via syndics. This means that any minions connected directly to a master
of masters will also receive ACL information in jobs being published. For the
most secure setup, only connect syndics directly to master of masters.

View file

@ -21,14 +21,6 @@ node and the local ``salt-master`` daemon. This gives the Master node control
over the Minion nodes attached to the ``salt-master`` daemon running on the
Syndic node.
.. warning::
Salt does not officially support Syndic and :ref:`external auth or
publisher_acl<acl-eauth>`. It's possible that it might work under certain
circumstances, but comprehensive support is lacking. See `issue #62618 on
GitHub <https://github.com/saltstack/salt/issues/62618>`_ for more
information. Currently Syndic is only expected to work when running Salt as
root, though work is scheduled to fix this in Salt 3006 (Sulfur).
Configuring the Syndic
======================
@ -71,6 +63,10 @@ The :conf_master:`order_masters` option configures the Master node to send
extra information with its publications that is needed by Syndic nodes
connected directly to it.
.. warning::
The syndic process must be run as the same user as the syndic master.
.. note::
Each Syndic must provide its own ``file_roots`` directory. Files will not

View file

@ -1166,7 +1166,119 @@ def compress_dependencies(session):
)
nox_dependencies_tarball_path.unlink()
session_run_always(session, "tar", "-caf", nox_dependencies_tarball, ".nox")
session_run_always(
session,
"tar",
"-caf",
nox_dependencies_tarball,
"--exclude=.nox/pre-archive-cleanup",
".nox",
)
@nox.session(
python="3",
name="pre-archive-cleanup",
)
@nox.parametrize("pkg", [False, True])
def pre_archive_cleanup(session, pkg):
"""
Call `tools pkg pre-archive-cleanup <path>`
"""
if session.posargs:
session.error("No additional arguments can be passed to 'pre-archive-cleanup'")
version_info = _get_session_python_version_info(session)
if version_info >= (3, 9):
if _upgrade_pip_setuptools_and_wheel(session):
requirements_file = os.path.join(
"requirements", "static", "ci", _get_pydir(session), "tools.txt"
)
install_command = ["--progress-bar=off", "-r", requirements_file]
session.install(*install_command, silent=PIP_INSTALL_SILENT)
cmdline = [
"tools",
"pkg",
"pre-archive-cleanup",
]
if pkg:
cmdline.append("--pkg")
cmdline.append(".nox")
session_run_always(session, *cmdline)
return
# On windows, we still run Py3.9
# Let's do the cleanup here, for now.
# This is a copy of the pre_archive_cleanup function in tools/pkg.py
import fnmatch
import shutil
try:
import yaml
except ImportError:
session.error("Please install 'pyyaml'.")
return
with open(str(REPO_ROOT / "cicd" / "env-cleanup-files.yml")) as rfh:
patterns = yaml.safe_load(rfh.read())
if pkg:
patterns = patterns["pkg"]
else:
patterns = patterns["ci"]
if IS_WINDOWS:
patterns = patterns["windows"]
elif IS_DARWIN:
patterns = patterns["darwin"]
else:
patterns = patterns["linux"]
dir_patterns = set()
for pattern in patterns["dir_patterns"]:
if isinstance(pattern, list):
dir_patterns.update(set(pattern))
continue
dir_patterns.add(pattern)
file_patterns = set()
for pattern in patterns["file_patterns"]:
if isinstance(pattern, list):
file_patterns.update(set(pattern))
continue
file_patterns.add(pattern)
for root, dirs, files in os.walk(
str(REPO_ROOT / ".nox"), topdown=True, followlinks=False
):
for dirname in dirs:
path = pathlib.Path(root, dirname).resolve()
if not path.exists():
continue
match_path = path.as_posix()
for pattern in dir_patterns:
if fnmatch.fnmatch(str(match_path), pattern):
session.log(
f"Deleting directory: {match_path}; Matching pattern: {pattern!r}"
)
shutil.rmtree(str(path))
break
for filename in files:
path = pathlib.Path(root, filename).resolve()
if not path.exists():
continue
match_path = path.as_posix()
for pattern in file_patterns:
if fnmatch.fnmatch(str(match_path), pattern):
session.log(
f"Deleting file: {match_path}; Matching pattern: {pattern!r}"
)
try:
os.remove(str(path))
except FileNotFoundError:
pass
break
@nox.session(python="3", name="combine-coverage")

View file

@ -15,8 +15,7 @@ pycparser>=2.21
pyopenssl>=19.0.0
python-dateutil>=2.8.0
python-gnupg>=0.4.4
setproctitle>=1.1.10 ; python_version < '3.10'
setproctitle>=1.2.3 ; python_version >= '3.10'
setproctitle>=1.2.3
timelib>=0.2.5
vultr>=1.0.1

View file

@ -8,7 +8,7 @@ click==7.1.2
# via towncrier
incremental==17.5.0
# via towncrier
jinja2==3.0.3
jinja2==3.1.2
# via towncrier
markupsafe==2.0.1
# via jinja2

View file

@ -335,13 +335,13 @@ bcrypt==3.2.0
# via
# paramiko
# passlib
boto3==1.18.46 ; python_version >= "3.6"
boto3==1.21.46 ; python_version >= "3.6"
# via
# -r requirements/static/ci/common.in
# moto
boto==2.49.0
# via -r requirements/static/ci/common.in
botocore==1.21.46
botocore==1.24.46
# via
# boto3
# moto
@ -460,7 +460,7 @@ jaraco.functools==3.3.0
# tempora
jaraco.text==3.5.1
# via jaraco.collections
jinja2==3.0.3
jinja2==3.1.2
# via
# -r requirements/base.txt
# junos-eznc
@ -799,7 +799,7 @@ scp==0.14.1
# via junos-eznc
semantic-version==2.9.0
# via etcd3-py
setproctitle==1.2.3 ; python_version >= "3.10"
setproctitle==1.3.2
# via -r requirements/static/pkg/linux.in
six==1.16.0
# via

View file

@ -335,13 +335,13 @@ bcrypt==3.1.6
# via
# paramiko
# passlib
boto3==1.17.67 ; python_version >= "3.6"
boto3==1.21.46 ; python_version >= "3.6"
# via
# -r requirements/static/ci/common.in
# moto
boto==2.49.0
# via -r requirements/static/ci/common.in
botocore==1.20.67
botocore==1.24.46
# via
# boto3
# moto
@ -463,12 +463,12 @@ jaraco.functools==2.0
# tempora
jaraco.text==3.5.1
# via jaraco.collections
jinja2==3.1.0
jinja2==3.1.2
# via
# -r requirements/base.txt
# junos-eznc
# moto
jmespath==0.9.4
jmespath==1.0.1
# via
# -r requirements/base.txt
# -r requirements/static/ci/common.in
@ -784,13 +784,13 @@ rfc3987==1.3.8
# via -r requirements/static/ci/common.in
rsa==4.7.2
# via google-auth
s3transfer==0.4.2
s3transfer==0.5.2
# via boto3
scp==0.13.2
# via junos-eznc
semantic-version==2.9.0
# via etcd3-py
setproctitle==1.3.2 ; python_version >= "3.10"
setproctitle==1.3.2
# via -r requirements/darwin.txt
six==1.16.0
# via

View file

@ -338,13 +338,13 @@ bcrypt==3.2.0
# via
# paramiko
# passlib
boto3==1.18.27 ; python_version >= "3.6"
boto3==1.21.46 ; python_version >= "3.6"
# via
# -r requirements/static/ci/common.in
# moto
boto==2.49.0
# via -r requirements/static/ci/common.in
botocore==1.21.27
botocore==1.24.46
# via
# boto3
# moto
@ -770,7 +770,7 @@ scp==0.13.6
# via junos-eznc
semantic-version==2.9.0
# via etcd3-py
setproctitle==1.2.3 ; python_version >= "3.10"
setproctitle==1.3.2
# via -r requirements/static/pkg/linux.in
six==1.16.0
# via

View file

@ -333,13 +333,13 @@ bcrypt==3.1.6
# via
# paramiko
# passlib
boto3==1.17.67 ; python_version >= "3.6"
boto3==1.21.46 ; python_version >= "3.6"
# via
# -r requirements/static/ci/common.in
# moto
boto==2.49.0
# via -r requirements/static/ci/common.in
botocore==1.20.67
botocore==1.24.46
# via
# boto3
# moto
@ -458,12 +458,12 @@ jaraco.functools==2.0
# tempora
jaraco.text==3.5.1
# via jaraco.collections
jinja2==3.1.0
jinja2==3.1.2
# via
# -r requirements/base.txt
# junos-eznc
# moto
jmespath==0.9.4
jmespath==1.0.1
# via
# -r requirements/base.txt
# -r requirements/static/ci/common.in
@ -780,13 +780,13 @@ rfc3987==1.3.8
# via -r requirements/static/ci/common.in
rsa==4.7.2
# via google-auth
s3transfer==0.4.2
s3transfer==0.5.2
# via boto3
scp==0.13.2
# via junos-eznc
semantic-version==2.9.0
# via etcd3-py
setproctitle==1.2.3 ; python_version >= "3.10"
setproctitle==1.3.2
# via -r requirements/static/pkg/freebsd.in
six==1.16.0
# via

View file

@ -336,13 +336,13 @@ bcrypt==3.2.0
# via
# paramiko
# passlib
boto3==1.18.27 ; python_version >= "3.6"
boto3==1.21.46 ; python_version >= "3.6"
# via
# -r requirements/static/ci/common.in
# moto
boto==2.49.0
# via -r requirements/static/ci/common.in
botocore==1.21.27
botocore==1.24.46
# via
# boto3
# moto
@ -458,7 +458,7 @@ jaraco.functools==3.3.0
# tempora
jaraco.text==3.5.1
# via jaraco.collections
jinja2==3.0.3
jinja2==3.1.2
# via
# -r requirements/base.txt
# ansible-core
@ -771,7 +771,7 @@ scp==0.13.6
# via junos-eznc
semantic-version==2.9.0
# via etcd3-py
setproctitle==1.2.3 ; python_version >= "3.10"
setproctitle==1.3.2
# via -r requirements/static/pkg/linux.in
six==1.16.0
# via

View file

@ -344,13 +344,13 @@ bcrypt==3.1.6
# via
# paramiko
# passlib
boto3==1.17.67 ; python_version >= "3.6"
boto3==1.21.46 ; python_version >= "3.6"
# via
# -r requirements/static/ci/common.in
# moto
boto==2.49.0
# via -r requirements/static/ci/common.in
botocore==1.20.67
botocore==1.24.46
# via
# boto3
# moto
@ -474,13 +474,13 @@ jaraco.functools==2.0
# tempora
jaraco.text==3.5.1
# via jaraco.collections
jinja2==3.1.0
jinja2==3.1.2
# via
# -r requirements/base.txt
# ansible-core
# junos-eznc
# moto
jmespath==0.9.4
jmespath==1.0.1
# via
# -r requirements/base.txt
# -r requirements/static/ci/common.in
@ -631,7 +631,7 @@ oauthlib==3.2.1
# via requests-oauthlib
oscrypto==1.2.0
# via certvalidator
packaging==21.3
packaging==22.0
# via
# -r requirements/base.txt
# ansible-core
@ -692,9 +692,7 @@ pyopenssl==19.1.0
# -r requirements/static/pkg/linux.in
# etcd3-py
pyparsing==3.0.9
# via
# junos-eznc
# packaging
# via junos-eznc
pyrsistent==0.17.3
# via jsonschema
pyserial==3.4
@ -820,13 +818,13 @@ rpm-vercmp==0.1.2
# via -r requirements/static/pkg/linux.in
rsa==4.7.2
# via google-auth
s3transfer==0.4.2
s3transfer==0.5.2
# via boto3
scp==0.13.2
# via junos-eznc
semantic-version==2.9.0
# via etcd3-py
setproctitle==1.2.3 ; python_version >= "3.10"
setproctitle==1.3.2
# via -r requirements/static/pkg/linux.in
six==1.16.0
# via
@ -920,7 +918,7 @@ yarl==1.7.2
# via aiohttp
zc.lockfile==1.4
# via cherrypy
zipp==3.4.0
zipp==3.6.0
# via importlib-metadata
# The following packages are considered to be unsafe in a requirements file:

View file

@ -8,9 +8,9 @@ attrs==22.1.0
# via
# -r requirements/static/ci/tools.in
# python-tools-scripts
boto3==1.24.80
boto3==1.21.46
# via -r requirements/static/ci/tools.in
botocore==1.27.80
botocore==1.24.46
# via
# boto3
# s3transfer
@ -26,9 +26,11 @@ python-dateutil==2.8.2
# via botocore
python-tools-scripts==0.9.3
# via -r requirements/static/ci/tools.in
pyyaml==6.0
# via -r requirements/static/ci/tools.in
rich==12.5.1
# via python-tools-scripts
s3transfer==0.6.0
s3transfer==0.5.2
# via boto3
six==1.16.0
# via python-dateutil

View file

@ -21,13 +21,13 @@ attrs==20.3.0
# pytest-system-statistics
bcrypt==4.0.1
# via passlib
boto3==1.26.21 ; python_version >= "3.6"
boto3==1.21.46 ; python_version >= "3.6"
# via
# -r requirements/static/ci/common.in
# moto
boto==2.49.0
# via -r requirements/static/ci/common.in
botocore==1.29.21
botocore==1.24.46
# via
# boto3
# moto
@ -142,11 +142,11 @@ jaraco.functools==2.0
# tempora
jaraco.text==3.5.0
# via jaraco.collections
jinja2==3.0.3
jinja2==3.1.2
# via
# -r requirements/base.txt
# moto
jmespath==0.9.4
jmespath==1.0.1
# via
# -r requirements/base.txt
# -r requirements/static/ci/common.in
@ -341,13 +341,13 @@ rfc3987==1.3.8
# via -r requirements/static/ci/common.in
rsa==4.7.2
# via google-auth
s3transfer==0.6.0
s3transfer==0.5.2
# via boto3
sed==0.3.1
# via -r requirements/static/ci/windows.in
semantic-version==2.10.0
# via etcd3-py
setproctitle==1.2.3 ; python_version >= "3.10"
setproctitle==1.3.2
# via -r requirements/windows.txt
six==1.15.0
# via

View file

@ -339,13 +339,13 @@ bcrypt==3.2.0
# via
# paramiko
# passlib
boto3==1.18.46 ; python_version >= "3.6"
boto3==1.21.46 ; python_version >= "3.6"
# via
# -r requirements/static/ci/common.in
# moto
boto==2.49.0
# via -r requirements/static/ci/common.in
botocore==1.21.46
botocore==1.24.46
# via
# boto3
# moto
@ -428,7 +428,7 @@ frozenlist==1.2.0
# via
# aiohttp
# aiosignal
future==0.18.2
future==0.18.3
# via textfsm
genshi==0.7.5
# via -r requirements/static/ci/common.in
@ -817,7 +817,7 @@ scp==0.14.1
# via junos-eznc
semantic-version==2.9.0
# via etcd3-py
setproctitle==1.2.2 ; python_version < "3.10"
setproctitle==1.2.3
# via -r requirements/static/pkg/linux.in
six==1.16.0
# via

View file

@ -344,13 +344,13 @@ bcrypt==3.2.0
# via
# paramiko
# passlib
boto3==1.18.27 ; python_version >= "3.6"
boto3==1.21.46 ; python_version >= "3.6"
# via
# -r requirements/static/ci/common.in
# moto
boto==2.49.0
# via -r requirements/static/ci/common.in
botocore==1.21.27
botocore==1.24.46
# via
# boto3
# moto
@ -432,7 +432,7 @@ frozenlist==1.2.0
# via
# aiohttp
# aiosignal
future==0.18.2
future==0.18.3
# via textfsm
genshi==0.7.5
# via -r requirements/static/ci/common.in
@ -788,7 +788,7 @@ scp==0.13.6
# via junos-eznc
semantic-version==2.9.0
# via etcd3-py
setproctitle==1.1.10 ; python_version < "3.10"
setproctitle==1.2.3
# via -r requirements/static/pkg/linux.in
six==1.16.0
# via

View file

@ -342,13 +342,13 @@ bcrypt==3.2.0
# via
# paramiko
# passlib
boto3==1.18.27 ; python_version >= "3.6"
boto3==1.21.46 ; python_version >= "3.6"
# via
# -r requirements/static/ci/common.in
# moto
boto==2.49.0
# via -r requirements/static/ci/common.in
botocore==1.21.27
botocore==1.24.46
# via
# boto3
# moto
@ -428,7 +428,7 @@ frozenlist==1.2.0
# via
# aiohttp
# aiosignal
future==0.18.2
future==0.18.3
# via textfsm
genshi==0.7.5
# via -r requirements/static/ci/common.in
@ -791,7 +791,7 @@ scp==0.13.6
# via junos-eznc
semantic-version==2.9.0
# via etcd3-py
setproctitle==1.2.2 ; python_version < "3.10"
setproctitle==1.2.3
# via -r requirements/static/pkg/linux.in
six==1.16.0
# via

View file

@ -348,13 +348,13 @@ bcrypt==3.1.6
# via
# paramiko
# passlib
boto3==1.17.67 ; python_version >= "3.6"
boto3==1.21.46 ; python_version >= "3.6"
# via
# -r requirements/static/ci/common.in
# moto
boto==2.49.0
# via -r requirements/static/ci/common.in
botocore==1.20.67
botocore==1.24.46
# via
# boto3
# moto
@ -440,7 +440,7 @@ frozenlist==1.2.0
# via
# aiohttp
# aiosignal
future==0.17.1
future==0.18.3
# via textfsm
genshi==0.7.5
# via -r requirements/static/ci/common.in
@ -497,7 +497,7 @@ jinja2==3.0.3
# ansible-core
# junos-eznc
# moto
jmespath==0.9.4
jmespath==0.10.0
# via
# -r requirements/base.txt
# -r requirements/static/ci/common.in
@ -838,13 +838,13 @@ rpm-vercmp==0.1.2
# via -r requirements/static/pkg/linux.in
rsa==4.7.2
# via google-auth
s3transfer==0.4.2
s3transfer==0.5.2
# via boto3
scp==0.13.2
# via junos-eznc
semantic-version==2.9.0
# via etcd3-py
setproctitle==1.1.10 ; python_version < "3.10"
setproctitle==1.2.3
# via -r requirements/static/pkg/linux.in
six==1.16.0
# via

View file

@ -8,7 +8,7 @@ click==7.1.1
# via towncrier
incremental==17.5.0
# via towncrier
jinja2==3.0.3
jinja2==3.1.2
# via towncrier
markupsafe==2.0.1
# via jinja2

View file

@ -337,13 +337,13 @@ bcrypt==3.2.0
# via
# paramiko
# passlib
boto3==1.18.46 ; python_version >= "3.6"
boto3==1.21.46 ; python_version >= "3.6"
# via
# -r requirements/static/ci/common.in
# moto
boto==2.49.0
# via -r requirements/static/ci/common.in
botocore==1.21.46
botocore==1.24.46
# via
# boto3
# moto
@ -432,7 +432,7 @@ frozenlist==1.3.0
# via
# aiohttp
# aiosignal
future==0.18.2
future==0.18.3
# via
# napalm
# textfsm
@ -481,7 +481,7 @@ jaraco.functools==3.3.0
# tempora
jaraco.text==3.5.1
# via jaraco.collections
jinja2==3.0.3
jinja2==3.1.2
# via
# -r requirements/base.txt
# junos-eznc
@ -848,7 +848,7 @@ scp==0.14.1
# netmiko
semantic-version==2.9.0
# via etcd3-py
setproctitle==1.2.2 ; python_version < "3.10"
setproctitle==1.3.2
# via -r requirements/static/pkg/linux.in
six==1.16.0
# via

View file

@ -342,13 +342,13 @@ bcrypt==3.2.0
# via
# paramiko
# passlib
boto3==1.18.27 ; python_version >= "3.6"
boto3==1.21.46 ; python_version >= "3.6"
# via
# -r requirements/static/ci/common.in
# moto
boto==2.49.0
# via -r requirements/static/ci/common.in
botocore==1.21.27
botocore==1.24.46
# via
# boto3
# moto
@ -434,7 +434,7 @@ frozenlist==1.3.0
# via
# aiohttp
# aiosignal
future==0.18.2
future==0.18.3
# via
# napalm
# textfsm
@ -818,7 +818,7 @@ scp==0.13.6
# netmiko
semantic-version==2.9.0
# via etcd3-py
setproctitle==1.1.10 ; python_version < "3.10"
setproctitle==1.3.2
# via -r requirements/static/pkg/linux.in
six==1.16.0
# via

View file

@ -335,13 +335,13 @@ bcrypt==3.1.6
# via
# paramiko
# passlib
boto3==1.17.67 ; python_version >= "3.6"
boto3==1.21.46 ; python_version >= "3.6"
# via
# -r requirements/static/ci/common.in
# moto
boto==2.49.0
# via -r requirements/static/ci/common.in
botocore==1.20.67
botocore==1.24.46
# via
# boto3
# moto
@ -430,7 +430,7 @@ frozenlist==1.3.0
# via
# aiohttp
# aiosignal
future==0.17.1
future==0.18.3
# via
# napalm
# textfsm
@ -480,13 +480,13 @@ jaraco.functools==2.0
# tempora
jaraco.text==3.5.1
# via jaraco.collections
jinja2==3.1.0
jinja2==3.1.2
# via
# -r requirements/base.txt
# junos-eznc
# moto
# napalm
jmespath==0.9.4
jmespath==1.0.1
# via
# -r requirements/base.txt
# -r requirements/static/ci/common.in
@ -822,7 +822,7 @@ rfc3987==1.3.8
# via -r requirements/static/ci/common.in
rsa==4.7.2
# via google-auth
s3transfer==0.4.2
s3transfer==0.5.2
# via boto3
scp==0.13.2
# via
@ -831,7 +831,7 @@ scp==0.13.2
# netmiko
semantic-version==2.9.0
# via etcd3-py
setproctitle==1.1.10 ; python_version < "3.10"
setproctitle==1.3.2
# via -r requirements/static/pkg/freebsd.in
six==1.16.0
# via

View file

@ -340,13 +340,13 @@ bcrypt==3.2.0
# via
# paramiko
# passlib
boto3==1.18.27 ; python_version >= "3.6"
boto3==1.21.46 ; python_version >= "3.6"
# via
# -r requirements/static/ci/common.in
# moto
boto==2.49.0
# via -r requirements/static/ci/common.in
botocore==1.21.27
botocore==1.24.46
# via
# boto3
# moto
@ -430,7 +430,7 @@ frozenlist==1.3.0
# via
# aiohttp
# aiosignal
future==0.18.2
future==0.18.3
# via
# napalm
# textfsm
@ -479,7 +479,7 @@ jaraco.functools==3.3.0
# tempora
jaraco.text==3.5.1
# via jaraco.collections
jinja2==3.0.3
jinja2==3.1.2
# via
# -r requirements/base.txt
# ansible-core
@ -821,7 +821,7 @@ scp==0.13.6
# netmiko
semantic-version==2.9.0
# via etcd3-py
setproctitle==1.2.2 ; python_version < "3.10"
setproctitle==1.3.2
# via -r requirements/static/pkg/linux.in
six==1.16.0
# via

View file

@ -346,13 +346,13 @@ bcrypt==3.1.6
# via
# paramiko
# passlib
boto3==1.17.67 ; python_version >= "3.6"
boto3==1.21.46 ; python_version >= "3.6"
# via
# -r requirements/static/ci/common.in
# moto
boto==2.49.0
# via -r requirements/static/ci/common.in
botocore==1.20.67
botocore==1.24.46
# via
# boto3
# moto
@ -444,7 +444,7 @@ frozenlist==1.3.0
# via
# aiohttp
# aiosignal
future==0.17.1
future==0.18.3
# via
# napalm
# textfsm
@ -494,14 +494,14 @@ jaraco.functools==2.0
# tempora
jaraco.text==3.5.1
# via jaraco.collections
jinja2==3.1.0
jinja2==3.1.2
# via
# -r requirements/base.txt
# ansible-core
# junos-eznc
# moto
# napalm
jmespath==0.9.4
jmespath==1.0.1
# via
# -r requirements/base.txt
# -r requirements/static/ci/common.in
@ -860,7 +860,7 @@ rpm-vercmp==0.1.2
# via -r requirements/static/pkg/linux.in
rsa==4.7.2
# via google-auth
s3transfer==0.4.2
s3transfer==0.5.2
# via boto3
scp==0.13.2
# via
@ -869,7 +869,7 @@ scp==0.13.2
# netmiko
semantic-version==2.9.0
# via etcd3-py
setproctitle==1.1.10 ; python_version < "3.10"
setproctitle==1.3.2
# via -r requirements/static/pkg/linux.in
six==1.16.0
# via

View file

@ -25,13 +25,13 @@ backports.entry-points-selectable==1.1.0
# via virtualenv
bcrypt==4.0.1
# via passlib
boto3==1.17.80 ; python_version >= "3.6"
boto3==1.21.46 ; python_version >= "3.6"
# via
# -r requirements/static/ci/common.in
# moto
boto==2.49.0
# via -r requirements/static/ci/common.in
botocore==1.20.80
botocore==1.24.46
# via
# boto3
# moto
@ -158,11 +158,11 @@ jaraco.functools==2.0
# tempora
jaraco.text==3.5.0
# via jaraco.collections
jinja2==3.1.0
jinja2==3.1.2
# via
# -r requirements/base.txt
# moto
jmespath==0.9.4
jmespath==1.0.1
# via
# -r requirements/base.txt
# -r requirements/static/ci/common.in
@ -356,13 +356,13 @@ rfc3987==1.3.8
# via -r requirements/static/ci/common.in
rsa==4.7.2
# via google-auth
s3transfer==0.4.2
s3transfer==0.5.2
# via boto3
sed==0.3.1
# via -r requirements/static/ci/windows.in
semantic-version==2.9.0
# via etcd3-py
setproctitle==1.1.10 ; python_version < "3.10"
setproctitle==1.3.2
# via -r requirements/windows.txt
six==1.15.0
# via

View file

@ -8,7 +8,7 @@ click==7.1.2
# via towncrier
incremental==17.5.0
# via towncrier
jinja2==3.0.3
jinja2==3.1.2
# via towncrier
markupsafe==2.0.1
# via jinja2

View file

@ -335,13 +335,13 @@ bcrypt==3.2.0
# via
# paramiko
# passlib
boto3==1.18.46 ; python_version >= "3.6"
boto3==1.21.46 ; python_version >= "3.6"
# via
# -r requirements/static/ci/common.in
# moto
boto==2.49.0
# via -r requirements/static/ci/common.in
botocore==1.21.46
botocore==1.24.46
# via
# boto3
# moto
@ -430,7 +430,7 @@ frozenlist==1.3.0
# via
# aiohttp
# aiosignal
future==0.18.2
future==0.18.3
# via
# napalm
# textfsm
@ -470,7 +470,7 @@ jaraco.functools==3.3.0
# tempora
jaraco.text==3.5.1
# via jaraco.collections
jinja2==3.0.3
jinja2==3.1.2
# via
# -r requirements/base.txt
# junos-eznc
@ -837,7 +837,7 @@ scp==0.14.1
# netmiko
semantic-version==2.9.0
# via etcd3-py
setproctitle==1.2.2 ; python_version < "3.10"
setproctitle==1.3.2
# via -r requirements/static/pkg/linux.in
six==1.16.0
# via

View file

@ -340,13 +340,13 @@ bcrypt==3.2.0
# via
# paramiko
# passlib
boto3==1.18.27 ; python_version >= "3.6"
boto3==1.21.46 ; python_version >= "3.6"
# via
# -r requirements/static/ci/common.in
# moto
boto==2.49.0
# via -r requirements/static/ci/common.in
botocore==1.21.27
botocore==1.24.46
# via
# boto3
# moto
@ -432,7 +432,7 @@ frozenlist==1.3.0
# via
# aiohttp
# aiosignal
future==0.18.2
future==0.18.3
# via
# napalm
# textfsm
@ -809,7 +809,7 @@ scp==0.13.6
# netmiko
semantic-version==2.9.0
# via etcd3-py
setproctitle==1.1.10 ; python_version < "3.10"
setproctitle==1.3.2
# via -r requirements/static/pkg/linux.in
six==1.16.0
# via

View file

@ -333,13 +333,13 @@ bcrypt==3.1.6
# via
# paramiko
# passlib
boto3==1.17.67 ; python_version >= "3.6"
boto3==1.21.46 ; python_version >= "3.6"
# via
# -r requirements/static/ci/common.in
# moto
boto==2.49.0
# via -r requirements/static/ci/common.in
botocore==1.20.67
botocore==1.24.46
# via
# boto3
# moto
@ -428,7 +428,7 @@ frozenlist==1.3.0
# via
# aiohttp
# aiosignal
future==0.17.1
future==0.18.3
# via
# napalm
# textfsm
@ -470,13 +470,13 @@ jaraco.functools==2.0
# tempora
jaraco.text==3.5.1
# via jaraco.collections
jinja2==3.1.0
jinja2==3.1.2
# via
# -r requirements/base.txt
# junos-eznc
# moto
# napalm
jmespath==0.9.4
jmespath==1.0.1
# via
# -r requirements/base.txt
# -r requirements/static/ci/common.in
@ -812,7 +812,7 @@ rfc3987==1.3.8
# via -r requirements/static/ci/common.in
rsa==4.7.2
# via google-auth
s3transfer==0.4.2
s3transfer==0.5.2
# via boto3
scp==0.13.2
# via
@ -821,7 +821,7 @@ scp==0.13.2
# netmiko
semantic-version==2.9.0
# via etcd3-py
setproctitle==1.1.10 ; python_version < "3.10"
setproctitle==1.3.2
# via -r requirements/static/pkg/freebsd.in
six==1.16.0
# via

View file

@ -338,13 +338,13 @@ bcrypt==3.2.0
# via
# paramiko
# passlib
boto3==1.18.27 ; python_version >= "3.6"
boto3==1.21.46 ; python_version >= "3.6"
# via
# -r requirements/static/ci/common.in
# moto
boto==2.49.0
# via -r requirements/static/ci/common.in
botocore==1.21.27
botocore==1.24.46
# via
# boto3
# moto
@ -428,7 +428,7 @@ frozenlist==1.3.0
# via
# aiohttp
# aiosignal
future==0.18.2
future==0.18.3
# via
# napalm
# textfsm
@ -470,7 +470,7 @@ jaraco.functools==3.3.0
# tempora
jaraco.text==3.5.1
# via jaraco.collections
jinja2==3.0.3
jinja2==3.1.2
# via
# -r requirements/base.txt
# ansible-core
@ -812,7 +812,7 @@ scp==0.13.6
# netmiko
semantic-version==2.9.0
# via etcd3-py
setproctitle==1.2.2 ; python_version < "3.10"
setproctitle==1.3.2
# via -r requirements/static/pkg/linux.in
six==1.16.0
# via

View file

@ -344,13 +344,13 @@ bcrypt==3.1.6
# via
# paramiko
# passlib
boto3==1.17.67 ; python_version >= "3.6"
boto3==1.21.46 ; python_version >= "3.6"
# via
# -r requirements/static/ci/common.in
# moto
boto==2.49.0
# via -r requirements/static/ci/common.in
botocore==1.20.67
botocore==1.24.46
# via
# boto3
# moto
@ -442,7 +442,7 @@ frozenlist==1.3.0
# via
# aiohttp
# aiosignal
future==0.17.1
future==0.18.3
# via
# napalm
# textfsm
@ -484,14 +484,14 @@ jaraco.functools==2.0
# tempora
jaraco.text==3.5.1
# via jaraco.collections
jinja2==3.1.0
jinja2==3.1.2
# via
# -r requirements/base.txt
# ansible-core
# junos-eznc
# moto
# napalm
jmespath==0.9.4
jmespath==1.0.1
# via
# -r requirements/base.txt
# -r requirements/static/ci/common.in
@ -654,7 +654,7 @@ oauthlib==3.2.1
# via requests-oauthlib
oscrypto==1.2.0
# via certvalidator
packaging==21.3
packaging==22.0
# via
# -r requirements/base.txt
# ansible-core
@ -718,9 +718,7 @@ pyopenssl==19.1.0
# -r requirements/static/pkg/linux.in
# etcd3-py
pyparsing==3.0.9
# via
# junos-eznc
# packaging
# via junos-eznc
pyrsistent==0.17.3
# via jsonschema
pyserial==3.4
@ -850,7 +848,7 @@ rpm-vercmp==0.1.2
# via -r requirements/static/pkg/linux.in
rsa==4.7.2
# via google-auth
s3transfer==0.4.2
s3transfer==0.5.2
# via boto3
scp==0.13.2
# via
@ -859,7 +857,7 @@ scp==0.13.2
# netmiko
semantic-version==2.9.0
# via etcd3-py
setproctitle==1.1.10 ; python_version < "3.10"
setproctitle==1.3.2
# via -r requirements/static/pkg/linux.in
six==1.16.0
# via

View file

@ -23,13 +23,13 @@ backports.entry-points-selectable==1.1.0
# via virtualenv
bcrypt==4.0.1
# via passlib
boto3==1.17.80 ; python_version >= "3.6"
boto3==1.21.46 ; python_version >= "3.6"
# via
# -r requirements/static/ci/common.in
# moto
boto==2.49.0
# via -r requirements/static/ci/common.in
botocore==1.20.80
botocore==1.24.46
# via
# boto3
# moto
@ -146,11 +146,11 @@ jaraco.functools==2.0
# tempora
jaraco.text==3.5.0
# via jaraco.collections
jinja2==3.1.0
jinja2==3.1.2
# via
# -r requirements/base.txt
# moto
jmespath==0.9.4
jmespath==1.0.1
# via
# -r requirements/base.txt
# -r requirements/static/ci/common.in
@ -344,13 +344,13 @@ rfc3987==1.3.8
# via -r requirements/static/ci/common.in
rsa==4.7.2
# via google-auth
s3transfer==0.4.2
s3transfer==0.5.2
# via boto3
sed==0.3.1
# via -r requirements/static/ci/windows.in
semantic-version==2.9.0
# via etcd3-py
setproctitle==1.1.10 ; python_version < "3.10"
setproctitle==1.3.2
# via -r requirements/windows.txt
six==1.15.0
# via

View file

@ -8,7 +8,7 @@ click==7.1.2
# via towncrier
incremental==17.5.0
# via towncrier
jinja2==3.0.3
jinja2==3.1.2
# via towncrier
markupsafe==2.0.1
# via jinja2

View file

@ -335,13 +335,13 @@ bcrypt==3.2.0
# via
# paramiko
# passlib
boto3==1.18.46 ; python_version >= "3.6"
boto3==1.21.46 ; python_version >= "3.6"
# via
# -r requirements/static/ci/common.in
# moto
boto==2.49.0
# via -r requirements/static/ci/common.in
botocore==1.21.46
botocore==1.24.46
# via
# boto3
# moto
@ -430,7 +430,7 @@ frozenlist==1.3.0
# via
# aiohttp
# aiosignal
future==0.18.2
future==0.18.3
# via
# napalm
# textfsm
@ -470,7 +470,7 @@ jaraco.functools==3.3.0
# tempora
jaraco.text==3.5.1
# via jaraco.collections
jinja2==3.0.3
jinja2==3.1.2
# via
# -r requirements/base.txt
# junos-eznc
@ -840,7 +840,7 @@ scp==0.14.1
# netmiko
semantic-version==2.9.0
# via etcd3-py
setproctitle==1.2.2 ; python_version < "3.10"
setproctitle==1.3.2
# via -r requirements/static/pkg/linux.in
six==1.16.0
# via

View file

@ -335,13 +335,13 @@ bcrypt==3.1.6
# via
# paramiko
# passlib
boto3==1.17.67 ; python_version >= "3.6"
boto3==1.21.46 ; python_version >= "3.6"
# via
# -r requirements/static/ci/common.in
# moto
boto==2.49.0
# via -r requirements/static/ci/common.in
botocore==1.20.67
botocore==1.24.46
# via
# boto3
# moto
@ -430,7 +430,7 @@ frozenlist==1.3.0
# via
# aiohttp
# aiosignal
future==0.17.1
future==0.18.3
# via
# napalm
# textfsm
@ -475,13 +475,13 @@ jaraco.functools==2.0
# tempora
jaraco.text==3.5.1
# via jaraco.collections
jinja2==3.1.0
jinja2==3.1.2
# via
# -r requirements/base.txt
# junos-eznc
# moto
# napalm
jmespath==0.9.4
jmespath==1.0.1
# via
# -r requirements/base.txt
# -r requirements/static/ci/common.in
@ -819,7 +819,7 @@ rfc3987==1.3.8
# via -r requirements/static/ci/common.in
rsa==4.7.2
# via google-auth
s3transfer==0.4.2
s3transfer==0.5.2
# via boto3
scp==0.13.2
# via
@ -828,7 +828,7 @@ scp==0.13.2
# netmiko
semantic-version==2.9.0
# via etcd3-py
setproctitle==1.1.10 ; python_version < "3.10"
setproctitle==1.3.2
# via -r requirements/darwin.txt
six==1.16.0
# via

View file

@ -338,13 +338,13 @@ bcrypt==3.2.0
# via
# paramiko
# passlib
boto3==1.18.27 ; python_version >= "3.6"
boto3==1.21.46 ; python_version >= "3.6"
# via
# -r requirements/static/ci/common.in
# moto
boto==2.49.0
# via -r requirements/static/ci/common.in
botocore==1.21.27
botocore==1.24.46
# via
# boto3
# moto
@ -430,7 +430,7 @@ frozenlist==1.3.0
# via
# aiohttp
# aiosignal
future==0.18.2
future==0.18.3
# via
# napalm
# textfsm
@ -810,7 +810,7 @@ scp==0.13.6
# netmiko
semantic-version==2.9.0
# via etcd3-py
setproctitle==1.1.10 ; python_version < "3.10"
setproctitle==1.3.2
# via -r requirements/static/pkg/linux.in
six==1.16.0
# via

View file

@ -333,13 +333,13 @@ bcrypt==3.1.6
# via
# paramiko
# passlib
boto3==1.17.67 ; python_version >= "3.6"
boto3==1.21.46 ; python_version >= "3.6"
# via
# -r requirements/static/ci/common.in
# moto
boto==2.49.0
# via -r requirements/static/ci/common.in
botocore==1.20.67
botocore==1.24.46
# via
# boto3
# moto
@ -428,7 +428,7 @@ frozenlist==1.3.0
# via
# aiohttp
# aiosignal
future==0.17.1
future==0.18.3
# via
# napalm
# textfsm
@ -470,13 +470,13 @@ jaraco.functools==2.0
# tempora
jaraco.text==3.5.1
# via jaraco.collections
jinja2==3.1.0
jinja2==3.1.2
# via
# -r requirements/base.txt
# junos-eznc
# moto
# napalm
jmespath==0.9.4
jmespath==1.0.1
# via
# -r requirements/base.txt
# -r requirements/static/ci/common.in
@ -815,7 +815,7 @@ rfc3987==1.3.8
# via -r requirements/static/ci/common.in
rsa==4.7.2
# via google-auth
s3transfer==0.4.2
s3transfer==0.5.2
# via boto3
scp==0.13.2
# via
@ -824,7 +824,7 @@ scp==0.13.2
# netmiko
semantic-version==2.9.0
# via etcd3-py
setproctitle==1.1.10 ; python_version < "3.10"
setproctitle==1.3.2
# via -r requirements/static/pkg/freebsd.in
six==1.16.0
# via

View file

@ -336,13 +336,13 @@ bcrypt==3.2.0
# via
# paramiko
# passlib
boto3==1.18.27 ; python_version >= "3.6"
boto3==1.21.46 ; python_version >= "3.6"
# via
# -r requirements/static/ci/common.in
# moto
boto==2.49.0
# via -r requirements/static/ci/common.in
botocore==1.21.27
botocore==1.24.46
# via
# boto3
# moto
@ -426,7 +426,7 @@ frozenlist==1.3.0
# via
# aiohttp
# aiosignal
future==0.18.2
future==0.18.3
# via
# napalm
# textfsm
@ -468,7 +468,7 @@ jaraco.functools==3.3.0
# tempora
jaraco.text==3.5.1
# via jaraco.collections
jinja2==3.0.3
jinja2==3.1.2
# via
# -r requirements/base.txt
# ansible-core
@ -813,7 +813,7 @@ scp==0.13.6
# netmiko
semantic-version==2.9.0
# via etcd3-py
setproctitle==1.2.2 ; python_version < "3.10"
setproctitle==1.3.2
# via -r requirements/static/pkg/linux.in
six==1.16.0
# via

View file

@ -344,13 +344,13 @@ bcrypt==3.1.6
# via
# paramiko
# passlib
boto3==1.17.67 ; python_version >= "3.6"
boto3==1.21.46 ; python_version >= "3.6"
# via
# -r requirements/static/ci/common.in
# moto
boto==2.49.0
# via -r requirements/static/ci/common.in
botocore==1.20.67
botocore==1.24.46
# via
# boto3
# moto
@ -444,7 +444,7 @@ frozenlist==1.3.0
# via
# aiohttp
# aiosignal
future==0.17.1
future==0.18.3
# via
# napalm
# textfsm
@ -486,14 +486,14 @@ jaraco.functools==2.0
# tempora
jaraco.text==3.5.1
# via jaraco.collections
jinja2==3.1.0
jinja2==3.1.2
# via
# -r requirements/base.txt
# ansible-core
# junos-eznc
# moto
# napalm
jmespath==0.9.4
jmespath==1.0.1
# via
# -r requirements/base.txt
# -r requirements/static/ci/common.in
@ -656,7 +656,7 @@ oauthlib==3.2.1
# via requests-oauthlib
oscrypto==1.2.0
# via certvalidator
packaging==21.3
packaging==22.0
# via
# -r requirements/base.txt
# ansible-core
@ -723,9 +723,7 @@ pyopenssl==19.1.0
# -r requirements/static/pkg/linux.in
# etcd3-py
pyparsing==3.0.9
# via
# junos-eznc
# packaging
# via junos-eznc
pyrsistent==0.17.3
# via jsonschema
pyserial==3.4
@ -855,7 +853,7 @@ rpm-vercmp==0.1.2
# via -r requirements/static/pkg/linux.in
rsa==4.7.2
# via google-auth
s3transfer==0.4.2
s3transfer==0.5.2
# via boto3
scp==0.13.2
# via
@ -864,7 +862,7 @@ scp==0.13.2
# netmiko
semantic-version==2.9.0
# via etcd3-py
setproctitle==1.1.10 ; python_version < "3.10"
setproctitle==1.3.2
# via -r requirements/static/pkg/linux.in
six==1.16.0
# via

View file

@ -8,9 +8,9 @@ attrs==22.1.0
# via
# -r requirements/static/ci/tools.in
# python-tools-scripts
boto3==1.24.80
boto3==1.21.46
# via -r requirements/static/ci/tools.in
botocore==1.27.80
botocore==1.24.46
# via
# boto3
# s3transfer
@ -26,9 +26,11 @@ python-dateutil==2.8.2
# via botocore
python-tools-scripts==0.9.3
# via -r requirements/static/ci/tools.in
pyyaml==6.0
# via -r requirements/static/ci/tools.in
rich==12.5.1
# via python-tools-scripts
s3transfer==0.6.0
s3transfer==0.5.2
# via boto3
six==1.16.0
# via python-dateutil

View file

@ -23,13 +23,13 @@ backports.entry-points-selectable==1.1.0
# via virtualenv
bcrypt==4.0.1
# via passlib
boto3==1.17.80 ; python_version >= "3.6"
boto3==1.21.46 ; python_version >= "3.6"
# via
# -r requirements/static/ci/common.in
# moto
boto==2.49.0
# via -r requirements/static/ci/common.in
botocore==1.20.80
botocore==1.24.46
# via
# boto3
# moto
@ -146,11 +146,11 @@ jaraco.functools==2.0
# tempora
jaraco.text==3.5.0
# via jaraco.collections
jinja2==3.1.0
jinja2==3.1.2
# via
# -r requirements/base.txt
# moto
jmespath==0.9.4
jmespath==1.0.1
# via
# -r requirements/base.txt
# -r requirements/static/ci/common.in
@ -345,13 +345,13 @@ rfc3987==1.3.8
# via -r requirements/static/ci/common.in
rsa==4.7.2
# via google-auth
s3transfer==0.4.2
s3transfer==0.5.2
# via boto3
sed==0.3.1
# via -r requirements/static/ci/windows.in
semantic-version==2.9.0
# via etcd3-py
setproctitle==1.1.10 ; python_version < "3.10"
setproctitle==1.3.2
# via -r requirements/windows.txt
six==1.15.0
# via

View file

@ -1,3 +1,4 @@
python-tools-scripts >= 0.9.3
attrs
boto3
pyyaml

View file

@ -6,8 +6,7 @@ pycparser>=2.21; python_version >= '3.9'
pyopenssl>=19.0.0
python-dateutil>=2.8.0
python-gnupg>=0.4.4
setproctitle>=1.1.10 ; python_version < '3.10'
setproctitle>=1.2.3 ; python_version >= '3.10'
setproctitle>=1.2.3
timelib>=0.2.5
distro>=1.3.0
importlib_metadata>=3.3.0; python_version >= '3.6' and python_version < '3.10'

View file

@ -7,8 +7,7 @@ pyopenssl>=19.0.0
python-dateutil>=2.8.0
python-gnupg>=0.4.4
rpm-vercmp
setproctitle>=1.1.10 ; python_version < '3.10'
setproctitle>=1.2.3 ; python_version >= '3.10'
setproctitle>=1.2.3
timelib>=0.2.5
importlib_metadata>=3.3.0; python_version >= '3.6' and python_version < '3.10'
importlib_metadata==4.6.3; python_version >= '3.10'

View file

@ -45,7 +45,7 @@ jaraco.functools==2.0
# tempora
jaraco.text==3.5.1
# via jaraco.collections
jinja2==3.1.0
jinja2==3.1.2
# via -r requirements/base.txt
jmespath==1.0.1
# via -r requirements/base.txt
@ -99,7 +99,7 @@ requests==2.25.1
# -r requirements/base.txt
# apache-libcloud
# vultr
setproctitle==1.3.2 ; python_version >= "3.10"
setproctitle==1.3.2
# via -r requirements/darwin.txt
six==1.16.0
# via

View file

@ -37,7 +37,7 @@ jaraco.functools==2.0
# tempora
jaraco.text==3.5.1
# via jaraco.collections
jinja2==3.1.0
jinja2==3.1.2
# via -r requirements/base.txt
jmespath==1.0.1
# via -r requirements/base.txt
@ -81,7 +81,7 @@ pyzmq==23.2.0 ; python_version >= "3.9"
# via -r requirements/zeromq.txt
requests==2.25.1
# via -r requirements/base.txt
setproctitle==1.3.2 ; python_version >= "3.10"
setproctitle==1.3.2
# via -r requirements/static/pkg/freebsd.in
six==1.16.0
# via

View file

@ -37,7 +37,7 @@ jaraco.functools==2.0
# tempora
jaraco.text==3.5.1
# via jaraco.collections
jinja2==3.1.0
jinja2==3.1.2
# via -r requirements/base.txt
jmespath==1.0.1
# via -r requirements/base.txt
@ -83,7 +83,7 @@ requests==2.25.1
# via -r requirements/base.txt
rpm-vercmp==0.1.2
# via -r requirements/static/pkg/linux.in
setproctitle==1.3.2 ; python_version >= "3.10"
setproctitle==1.3.2
# via -r requirements/static/pkg/linux.in
six==1.16.0
# via

View file

@ -50,7 +50,7 @@ jaraco.functools==2.0
# tempora
jaraco.text==3.5.0
# via jaraco.collections
jinja2==3.0.3
jinja2==3.1.2
# via -r requirements/base.txt
jmespath==1.0.1
# via -r requirements/base.txt
@ -113,7 +113,7 @@ requests==2.25.1
# via
# -r requirements/base.txt
# -r requirements/windows.txt
setproctitle==1.2.3 ; python_version >= "3.10"
setproctitle==1.3.2
# via -r requirements/windows.txt
six==1.15.0
# via

View file

@ -87,7 +87,7 @@ requests==2.25.1
# via -r requirements/base.txt
rpm-vercmp==0.1.2
# via -r requirements/static/pkg/linux.in
setproctitle==1.1.10 ; python_version < "3.10"
setproctitle==1.2.3
# via -r requirements/static/pkg/linux.in
six==1.16.0
# via

View file

@ -39,7 +39,7 @@ jaraco.functools==2.0
# tempora
jaraco.text==3.5.1
# via jaraco.collections
jinja2==3.1.0
jinja2==3.1.2
# via -r requirements/base.txt
jmespath==1.0.1
# via -r requirements/base.txt
@ -81,7 +81,7 @@ pyzmq==18.0.1 ; python_version < "3.9"
# via -r requirements/zeromq.txt
requests==2.25.1
# via -r requirements/base.txt
setproctitle==1.1.10 ; python_version < "3.10"
setproctitle==1.3.2
# via -r requirements/static/pkg/freebsd.in
six==1.16.0
# via

View file

@ -37,7 +37,7 @@ jaraco.functools==2.0
# tempora
jaraco.text==3.5.1
# via jaraco.collections
jinja2==3.1.0
jinja2==3.1.2
# via -r requirements/base.txt
jmespath==1.0.1
# via -r requirements/base.txt
@ -81,7 +81,7 @@ requests==2.25.1
# via -r requirements/base.txt
rpm-vercmp==0.1.2
# via -r requirements/static/pkg/linux.in
setproctitle==1.1.10 ; python_version < "3.10"
setproctitle==1.3.2
# via -r requirements/static/pkg/linux.in
six==1.16.0
# via

View file

@ -54,7 +54,7 @@ jaraco.functools==2.0
# tempora
jaraco.text==3.5.0
# via jaraco.collections
jinja2==3.1.0
jinja2==3.1.2
# via -r requirements/base.txt
jmespath==1.0.1
# via -r requirements/base.txt
@ -118,7 +118,7 @@ requests==2.25.1
# via
# -r requirements/base.txt
# -r requirements/windows.txt
setproctitle==1.1.10 ; python_version < "3.10"
setproctitle==1.3.2
# via -r requirements/windows.txt
six==1.15.0
# via

View file

@ -39,7 +39,7 @@ jaraco.functools==2.0
# tempora
jaraco.text==3.5.1
# via jaraco.collections
jinja2==3.1.0
jinja2==3.1.2
# via -r requirements/base.txt
jmespath==1.0.1
# via -r requirements/base.txt
@ -81,7 +81,7 @@ pyzmq==19.0.0 ; python_version < "3.9"
# via -r requirements/zeromq.txt
requests==2.25.1
# via -r requirements/base.txt
setproctitle==1.1.10 ; python_version < "3.10"
setproctitle==1.3.2
# via -r requirements/static/pkg/freebsd.in
six==1.16.0
# via

View file

@ -37,7 +37,7 @@ jaraco.functools==2.0
# tempora
jaraco.text==3.5.1
# via jaraco.collections
jinja2==3.1.0
jinja2==3.1.2
# via -r requirements/base.txt
jmespath==1.0.1
# via -r requirements/base.txt
@ -81,7 +81,7 @@ requests==2.25.1
# via -r requirements/base.txt
rpm-vercmp==0.1.2
# via -r requirements/static/pkg/linux.in
setproctitle==1.1.10 ; python_version < "3.10"
setproctitle==1.3.2
# via -r requirements/static/pkg/linux.in
six==1.16.0
# via

View file

@ -52,7 +52,7 @@ jaraco.functools==2.0
# tempora
jaraco.text==3.5.0
# via jaraco.collections
jinja2==3.1.0
jinja2==3.1.2
# via -r requirements/base.txt
jmespath==1.0.1
# via -r requirements/base.txt
@ -116,7 +116,7 @@ requests==2.25.1
# via
# -r requirements/base.txt
# -r requirements/windows.txt
setproctitle==1.1.10 ; python_version < "3.10"
setproctitle==1.3.2
# via -r requirements/windows.txt
six==1.15.0
# via

View file

@ -47,7 +47,7 @@ jaraco.functools==2.0
# tempora
jaraco.text==3.5.1
# via jaraco.collections
jinja2==3.1.0
jinja2==3.1.2
# via -r requirements/base.txt
jmespath==1.0.1
# via -r requirements/base.txt
@ -101,7 +101,7 @@ requests==2.25.1
# -r requirements/base.txt
# apache-libcloud
# vultr
setproctitle==1.1.10 ; python_version < "3.10"
setproctitle==1.3.2
# via -r requirements/darwin.txt
six==1.16.0
# via

View file

@ -39,7 +39,7 @@ jaraco.functools==2.0
# tempora
jaraco.text==3.5.1
# via jaraco.collections
jinja2==3.1.0
jinja2==3.1.2
# via -r requirements/base.txt
jmespath==1.0.1
# via -r requirements/base.txt
@ -83,7 +83,7 @@ pyzmq==23.2.0 ; python_version >= "3.9"
# via -r requirements/zeromq.txt
requests==2.25.1
# via -r requirements/base.txt
setproctitle==1.1.10 ; python_version < "3.10"
setproctitle==1.3.2
# via -r requirements/static/pkg/freebsd.in
six==1.16.0
# via

View file

@ -37,7 +37,7 @@ jaraco.functools==2.0
# tempora
jaraco.text==3.5.1
# via jaraco.collections
jinja2==3.1.0
jinja2==3.1.2
# via -r requirements/base.txt
jmespath==1.0.1
# via -r requirements/base.txt
@ -83,7 +83,7 @@ requests==2.25.1
# via -r requirements/base.txt
rpm-vercmp==0.1.2
# via -r requirements/static/pkg/linux.in
setproctitle==1.1.10 ; python_version < "3.10"
setproctitle==1.3.2
# via -r requirements/static/pkg/linux.in
six==1.16.0
# via

View file

@ -52,7 +52,7 @@ jaraco.functools==2.0
# tempora
jaraco.text==3.5.0
# via jaraco.collections
jinja2==3.1.0
jinja2==3.1.2
# via -r requirements/base.txt
jmespath==1.0.1
# via -r requirements/base.txt
@ -116,7 +116,7 @@ requests==2.25.1
# via
# -r requirements/base.txt
# -r requirements/windows.txt
setproctitle==1.1.10 ; python_version < "3.10"
setproctitle==1.3.2
# via -r requirements/windows.txt
six==1.15.0
# via

View file

@ -23,8 +23,7 @@ pyopenssl>=20.0.1
python-dateutil>=2.8.1
python-gnupg>=0.4.7
requests>=2.25.1
setproctitle>=1.1.10 ; python_version < '3.10'
setproctitle>=1.2.3 ; python_version >= '3.10'
setproctitle>=1.2.3
timelib>=0.2.5
urllib3>=1.26.5
# Watchdog pulls in a GPL-3 package, argh, which cannot be shipped on the

View file

@ -823,7 +823,6 @@ class LocalClient:
listen=True,
**kwargs
)
if not self.pub_data:
yield self.pub_data
else:
@ -1191,6 +1190,13 @@ class LocalClient:
# if we got None, then there were no events
if raw is None:
break
if "error" in raw.get("data", {}):
yield {
"error": {
"name": "AuthorizationError",
"message": "Authorization error occurred.",
}
}
if "minions" in raw.get("data", {}):
minions.update(raw["data"]["minions"])
if "missing" in raw.get("data", {}):
@ -1707,6 +1713,8 @@ class LocalClient:
"retcode": salt.defaults.exitcodes.EX_GENERIC,
}
}
elif "error" in min_ret:
raise AuthorizationError("Authorization error occurred")
else:
yield {id_: min_ret}
@ -1825,11 +1833,7 @@ class LocalClient:
if kwargs:
payload_kwargs["kwargs"] = kwargs
# If we have a salt user, add it to the payload
if self.opts["syndic_master"] and "user" in kwargs:
payload_kwargs["user"] = kwargs["user"]
elif self.salt_user:
payload_kwargs["user"] = self.salt_user
payload_kwargs["user"] = self.salt_user
# If we're a syndication master, pass the timeout
if self.opts["order_masters"]:

View file

@ -2167,7 +2167,8 @@ class ClearFuncs(TransportMethods):
}
# Retrieve the minions list
delimiter = clear_load.get("kwargs", {}).get("delimiter", DEFAULT_TARGET_DELIM)
delimiter = extra.get("delimiter", DEFAULT_TARGET_DELIM)
_res = self.ckminions.check_minions(
clear_load["tgt"], clear_load.get("tgt_type", "glob"), delimiter
)
@ -2175,6 +2176,8 @@ class ClearFuncs(TransportMethods):
missing = _res.get("missing", list())
ssh_minions = _res.get("ssh_minions", False)
auth_key = clear_load.get("key", None)
# Check for external auth calls and authenticate
auth_type, err_name, key, sensitive_load_keys = self._prep_auth_info(extra)
if auth_type == "user":
@ -2184,20 +2187,36 @@ class ClearFuncs(TransportMethods):
else:
auth_check = self.loadauth.check_authentication(extra, auth_type)
# Setup authorization list variable and error information
auth_list = auth_check.get("auth_list", [])
# Setup authorization list
syndic_auth_list = None
if "auth_list" in extra:
syndic_auth_list = extra.pop("auth_list", [])
# An auth_list was provided by the syndic and we're running as the same
# user as the salt master process.
if (
syndic_auth_list is not None
and auth_key == key[self.opts.get("user", "root")]
):
auth_list = syndic_auth_list
else:
auth_list = auth_check.get("auth_list", [])
err_msg = 'Authentication failure of type "{}" occurred.'.format(auth_type)
if auth_check.get("error"):
# Authentication error occurred: do not continue.
log.warning(err_msg)
return {
err = {
"error": {
"name": "AuthenticationError",
"message": "Authentication error occurred.",
}
}
if "jid" in clear_load:
self.event.fire_event(
{**clear_load, **err}, tagify([clear_load["jid"], "error"], "job")
)
return err
# All Token, Eauth, and non-root users must pass the authorization check
if auth_type != "user" or (auth_type == "user" and auth_list):
# Authorize the request
@ -2226,12 +2245,18 @@ class ClearFuncs(TransportMethods):
extra["username"],
)
log.warning(err_msg)
return {
err = {
"error": {
"name": "AuthorizationError",
"message": "Authorization error occurred.",
}
}
if "jid" in clear_load:
self.event.fire_event(
{**clear_load, **err},
tagify([clear_load["jid"], "error"], "job"),
)
return err
# Perform some specific auth_type tasks after the authorization check
if auth_type == "token":
@ -2264,6 +2289,9 @@ class ClearFuncs(TransportMethods):
return {"enc": "clear", "load": {"error": "Master failed to assign jid"}}
payload = self._prep_pub(minions, jid, clear_load, extra, missing)
if self.opts.get("order_masters"):
payload["auth_list"] = auth_list
# Send it!
self._send_ssh_pub(payload, ssh_minions=ssh_minions)
self._send_pub(payload)

View file

@ -3278,7 +3278,8 @@ class Syndic(Minion):
# Set up default tgt_type
if "tgt_type" not in data:
data["tgt_type"] = "glob"
kwargs = {}
kwargs = {"auth_list": data.pop("auth_list", [])}
# optionally add a few fields to the publish data
for field in (
@ -3306,6 +3307,32 @@ class Syndic(Minion):
**kwargs
)
def _send_req_sync(self, load, timeout):
if self.opts["minion_sign_messages"]:
log.trace("Signing event to be published onto the bus.")
minion_privkey_path = os.path.join(self.opts["pki_dir"], "minion.pem")
sig = salt.crypt.sign_message(
minion_privkey_path, salt.serializers.msgpack.serialize(load)
)
load["sig"] = sig
return self.req_channel.send(
load, timeout=timeout, tries=self.opts["return_retry_tries"]
)
@salt.ext.tornado.gen.coroutine
def _send_req_async(self, load, timeout):
if self.opts["minion_sign_messages"]:
log.trace("Signing event to be published onto the bus.")
minion_privkey_path = os.path.join(self.opts["pki_dir"], "minion.pem")
sig = salt.crypt.sign_message(
minion_privkey_path, salt.serializers.msgpack.serialize(load)
)
load["sig"] = sig
ret = yield self.async_req_channel.send(
load, timeout=timeout, tries=self.opts["return_retry_tries"]
)
return ret
def fire_master_syndic_start(self):
# Send an event to the master that the minion is live
if self.opts["enable_legacy_startup_events"]:
@ -3335,6 +3362,8 @@ class Syndic(Minion):
# add handler to subscriber
self.pub_channel.on_recv(self._process_cmd_socket)
self.req_channel = salt.channel.client.ReqChannel.factory(self.opts)
self.async_req_channel = salt.channel.client.ReqChannel.factory(self.opts)
def _process_cmd_socket(self, payload):
if payload is not None and payload["enc"] == "aes":

View file

@ -2902,16 +2902,24 @@ def _uninstall(
name, version, pkgs, normalize, ignore_epoch=ignore_epoch, **kwargs
)
if isinstance(targets, dict) and "result" in targets:
return targets
if action == "purge":
# found nothing, reset state return obj to empty list and check for removed to be purged
targets = []
else:
return targets
elif not isinstance(targets, list):
return {
"name": name,
"changes": {},
"result": False,
"comment": "An error was encountered while checking targets: {}".format(
targets
),
}
if action == "purge":
# found nothing, reset state return obj to empty list and check for removed to be purged
targets = []
else:
return {
"name": name,
"changes": {},
"result": False,
"comment": "An error was encountered while checking targets: {}".format(
targets
),
}
if action == "purge":
old_removed = __salt__["pkg.list_pkgs"](
versions_as_list=True, removed=True, **kwargs

View file

@ -39,7 +39,7 @@ try:
from markupsafe import Markup
except ImportError:
# jinja < 3.1
from jinja2 import Markup
from jinja2 import Markup # pylint: disable=no-name-in-module
log = logging.getLogger(__name__)
@ -728,12 +728,13 @@ def method_call(obj, f_name, *f_args, **f_kwargs):
try:
contextfunction = jinja2.contextfunction
pass_context = jinja2.pass_context
except AttributeError:
contextfunction = jinja2.pass_context
# Old and deprecated method
pass_context = jinja2.contextfunction
@contextfunction
@pass_context
def show_full_context(ctx):
return salt.utils.data.simple_types_filter(
{key: value for key, value in ctx.items()}

View file

@ -748,16 +748,15 @@ class CkMinions:
"""
v_minions = set(self.check_minions(valid, "compound").get("minions", []))
if not v_minions:
# There are no valid minions, so it doesn't matter what we are
# targeting - this is a fail.
return False
if minions is None:
_res = self.check_minions(expr, tgt_type)
minions = set(_res["minions"])
else:
minions = set(minions)
return minions.issubset(v_minions)
d_bool = not bool(minions.difference(v_minions))
if len(v_minions) == len(minions) and d_bool:
return True
return d_bool
def match_check(self, regex, fun):
"""

View file

@ -22,20 +22,37 @@ depending on the version of Windows this is run on. Once support for Windows
import platform
import salt.utils.win_reg
from salt._compat import ipaddress
from salt.utils.versions import Version
IS_WINDOWS = platform.system() == "Windows"
__virtualname__ = "win_network"
if IS_WINDOWS:
USE_WMI = Version(platform.version()) < Version("6.2")
# pythonnet 3.0.1 requires .NET 4.7.2 (461808). This isn't installed by
# default until Windows Server 2019 / Windows 10 1809 (10.1.17763). But, it
# can be installed on older versions of Windows. So, instead of checking
# platform here, let's check the version of .NET
net_release = salt.utils.win_reg.read_value(
hive="HKLM",
key=r"SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full",
vname="Release",
)
# If the registry key is not found, or the value is less than 461808, we
# need to use WMI
if not net_release["success"] or net_release["vdata"] < 461808:
USE_WMI = True
else:
USE_WMI = False
if USE_WMI:
# This is supported by all versions of Windows, but the database we're
# using hasn't really been optimized, so it is much slower
import wmi
import salt.utils.winapi
else:
# This uses .NET to get network settings and is faster than WMI
import clr
from System.Net import NetworkInformation

View file

@ -233,6 +233,11 @@ class WriteSaltVersion(Command):
salt_version = SaltStackVersion.parse(
self.distribution.with_salt_version
)
if os.path.exists(self.distribution.salt_version_hardcoded_path):
log.warn(
"The 'salt/_version.txt' file already exists. Not overwriting it."
)
return
with open(
self.distribution.salt_version_hardcoded_path, "w", encoding="utf-8"

View file

@ -4,10 +4,14 @@
Docstrings related tasks
"""
# pylint: disable=resource-leakage
import ast
import os
import pathlib
import re
import sys
from typing import TYPE_CHECKING
from invoke import task # pylint: disable=3rd-party-module-not-gated
@ -782,6 +786,72 @@ MISSING_EXAMPLES = {
],
}
SUMMARY = """\
### Hi! I'm your friendly PR bot!
You might be wondering what I'm doing commenting here on your PR.
**Yes, as a matter of fact, I am...**
I'm just here to help us improve the documentation. I can't respond to
questions or anything, but what I *can* do, I do well!
**Okay... so what do you do?**
I detect modules that are missing docstrings or "CLI Example" on existing docstrings!
When I was created we had a *lot* of these. The documentation for these
modules need some love and attention to make Salt better for our users.
**So what does that have to do with my PR?**
I noticed that in this PR there are some files changed that have some of these
issues. So I'm leaving this comment to let you know your options.
**Okay, what are they?**
Well, my favorite, is that since you were making changes here I'm hoping that
you would be the most familiar with this module and be able to add some other
examples or fix any of the reported issues.
**If I can, then what?**
Well, you can either add them to this PR or add them to another PR. Either way is fine!
**Well... what if I can't, or don't want to?**
That's also fine! We appreciate *all* contributions to the Salt Project. If you
can't add those other examples, either because you're too busy, or unfamiliar,
or you just aren't interested, we still appreciate the contributions that
you've made already.
Whatever approach you decide to take, just drop a comment in the PR letting us know!
"""
def annotate(kind: str, fpath: str, start_lineno: int, end_lineno: int, message: str):
if kind not in ("warning", "error"):
raise RuntimeError("The annotation kind can only be one of 'warning', 'error'.")
if os.environ.get("GH_ACTIONS_ANNOTATE") is None:
return
github_output = os.environ.get("GITHUB_OUTPUT")
if github_output is None:
utils.warn("The 'GITHUB_OUTPUT' variable is not set. Not adding annotations.")
return
if TYPE_CHECKING:
assert github_output is not None
message = (
message.rstrip().replace("%", "%25").replace("\r", "%0D").replace("\n", "%0A")
)
# Print it to stdout so that the GitHub runner pick's it up and adds the annotation
print(
f"::{kind} file={fpath},line={start_lineno},endLine={end_lineno}::{message}",
file=sys.stdout,
flush=True,
)
@task(iterable=["files"], positional=["files"])
def check(ctx, files, check_proper_formatting=False, error_on_known_failures=False):
@ -839,6 +909,13 @@ def check(ctx, files, check_proper_formatting=False, error_on_known_failures=Fal
path.relative_to(CODE_DIR),
*error,
)
annotate(
"error",
path.relative_to(CODE_DIR),
funcdef.lineno,
funcdef.body[0].lineno,
"Version {1:r!} is not valid for {0!r}".format(*error),
)
if not str(path).startswith(SALT_INTERNAL_LOADERS_PATHS):
# No further docstrings checks are needed
@ -863,6 +940,13 @@ def check(ctx, files, check_proper_formatting=False, error_on_known_failures=Fal
funcname,
relpath,
)
annotate(
"warning",
path.relative_to(CODE_DIR),
funcdef.lineno,
funcdef.body[0].lineno,
"Missing docstring",
)
continue
errors += 1
exitcode = 1
@ -871,6 +955,13 @@ def check(ctx, files, check_proper_formatting=False, error_on_known_failures=Fal
funcname,
relpath,
)
annotate(
"error",
path.relative_to(CODE_DIR),
funcdef.lineno,
funcdef.body[0].lineno,
"Missing docstring",
)
continue
elif funcname in MISSING_DOCSTRINGS.get(relpath, ()):
# This was previously a know function with a missing docstring.
@ -907,6 +998,13 @@ def check(ctx, files, check_proper_formatting=False, error_on_known_failures=Fal
funcname,
relpath,
)
annotate(
"warning",
path.relative_to(CODE_DIR),
funcdef.lineno,
funcdef.body[0].lineno,
"Missing 'CLI Example:' in docstring",
)
continue
errors += 1
exitcode = 1
@ -915,6 +1013,13 @@ def check(ctx, files, check_proper_formatting=False, error_on_known_failures=Fal
funcname,
relpath,
)
annotate(
"error",
path.relative_to(CODE_DIR),
funcdef.lineno,
funcdef.body[0].lineno,
"Missing 'CLI Example:' in docstring",
)
continue
elif funcname in MISSING_EXAMPLES.get(relpath, ()):
# This was previously a know function with a missing CLI example
@ -948,6 +1053,19 @@ def check(ctx, files, check_proper_formatting=False, error_on_known_failures=Fal
funcdef.name,
path.relative_to(CODE_DIR),
)
annotate(
"warning",
path.relative_to(CODE_DIR),
funcdef.lineno,
funcdef.body[0].lineno,
"Wrong format in 'CLI Example:' in docstring.\n"
"The proper format is:\n```"
"CLI Example:\n"
"\n"
".. code-block:: bash\n"
"\n"
" salt '*' <insert example here>\n```",
)
continue
finally:
if contents != path.read_text():
@ -957,6 +1075,11 @@ def check(ctx, files, check_proper_formatting=False, error_on_known_failures=Fal
utils.warn("Found {} warnings", warnings)
if exitcode:
utils.error("Found {} errors", errors)
if os.environ.get("GH_ACTIONS_ANNOTATE") and (warnings or errors):
github_step_summary = os.environ.get("GITHUB_STEP_SUMMARY")
if github_step_summary:
with open(github_step_summary, "w", encoding="utf-8") as wfh:
wfh.write(SUMMARY)
utils.exit_invoke(exitcode)

View file

@ -1,9 +1,11 @@
import logging
import time
import pytest
from saltfactories.utils import random_string
import salt.cache
from salt.exceptions import SaltCacheError
from tests.pytests.functional.cache.helpers import run_common_cache_tests
pytest.importorskip("redis")
@ -50,6 +52,17 @@ def cache(minion_opts, redis_container):
def test_caching(subtests, cache):
# The container seems to need some time, let's give it some
timeout = 20
start = time.time()
while time.time() < start + timeout:
try:
cache.contains("fnord")
break
except SaltCacheError:
time.sleep(1)
else:
pytest.fail("Failed to connect to redis container")
run_common_cache_tests(subtests, cache)

View file

@ -13,7 +13,6 @@ docker = pytest.importorskip("docker")
log = logging.getLogger(__name__)
pytestmark = [
pytest.mark.windows_whitelisted,
pytest.mark.skip_if_binaries_missing("docker", "dockerd", check_all=False),
]

View file

@ -11,7 +11,6 @@ docker = pytest.importorskip("docker")
log = logging.getLogger(__name__)
pytestmark = [
pytest.mark.windows_whitelisted,
pytest.mark.skip_if_binaries_missing("docker", "dockerd", check_all=False),
]

View file

@ -12,7 +12,6 @@ docker = pytest.importorskip("docker")
log = logging.getLogger(__name__)
pytestmark = [
pytest.mark.windows_whitelisted,
pytest.mark.skip_if_binaries_missing("docker", "dockerd", check_all=False),
]

View file

@ -12,7 +12,6 @@ log = logging.getLogger(__name__)
pytestmark = [
pytest.mark.slow_test,
pytest.mark.windows_whitelisted,
pytest.mark.skip_if_binaries_missing("docker", "dockerd", check_all=False),
]

View file

@ -15,7 +15,6 @@ log = logging.getLogger(__name__)
pytestmark = [
pytest.mark.slow_test,
pytest.mark.skip_on_freebsd(reason="No Docker on FreeBSD available"),
pytest.mark.skip_if_binaries_missing(
"docker", "dockerd", reason="Docker not installed"
),

View file

@ -16,7 +16,6 @@ pytest.importorskip("docker")
pytestmark = [
pytest.mark.slow_test,
pytest.mark.skip_on_freebsd(reason="No Docker on FreeBSD available"),
pytest.mark.skip_if_binaries_missing(
"docker", "dockerd", reason="Docker not installed"
),

View file

@ -16,7 +16,6 @@ pytest.importorskip("docker")
pytestmark = [
pytest.mark.slow_test,
pytest.mark.skip_on_freebsd(reason="No Docker on FreeBSD available"),
pytest.mark.skip_if_binaries_missing(
"docker", "dockerd", reason="Docker not installed"
),

View file

@ -15,7 +15,6 @@ pytest.importorskip("docker")
pytestmark = [
pytest.mark.slow_test,
pytest.mark.skip_on_freebsd(reason="No Docker on FreeBSD available"),
pytest.mark.skip_if_binaries_missing(
"docker", "dockerd", reason="Docker not installed"
),

View file

@ -15,7 +15,6 @@ pytest.importorskip("docker")
pytestmark = [
pytest.mark.slow_test,
pytest.mark.skip_on_freebsd(reason="No Docker on FreeBSD available"),
pytest.mark.skip_if_binaries_missing(
"docker", "dockerd", reason="Docker not installed"
),

View file

@ -15,7 +15,6 @@ pytest.importorskip("docker")
pytestmark = [
pytest.mark.slow_test,
pytest.mark.skip_on_freebsd(reason="No Docker on FreeBSD available"),
pytest.mark.skip_if_binaries_missing(
"docker", "dockerd", reason="Docker not installed"
),

View file

@ -12,7 +12,6 @@ docker = pytest.importorskip("docker")
log = logging.getLogger(__name__)
pytestmark = [
pytest.mark.windows_whitelisted,
pytest.mark.skip_if_binaries_missing("docker", "dockerd", check_all=False),
]

View file

@ -993,3 +993,41 @@ def test_pkg_cap_006_uptodate(PKG_CAP_TARGETS, modules, states):
finally:
ret = states.pkg.removed(name=realpkg)
assert ret.result is True
@pytest.mark.requires_salt_modules(
"pkg.version", "pkg.latest_version", "pkg.remove", "pkg.purge", "pkg.list_pkgs"
)
@pytest.mark.requires_salt_states("pkg.installed", "pkg.removed", "pkg.purged")
def test_pkg_purged_with_removed_pkg(grains, PKG_TARGETS, states, modules):
"""
This is a destructive test as it installs and then removes a package, then purges a removed package
"""
if grains["os_family"] != "Debian":
pytest.skip("Only runs on Debian.")
target = PKG_TARGETS[0]
ret = states.pkg.installed(
name=target,
version="<9999999",
refresh=False,
)
assert ret.result is True
# The version that was installed should be the latest available
version = modules.pkg.version(target)
assert version
# Clean up
ret = states.pkg.removed(name=target)
assert ret.result is True
ret = states.pkg.purged(name=target)
assert ret.result is True
assert ret.name == target
assert ret.comment == "All targeted packages were purged."
assert ret.changes == {
"installed": {},
"removed": {target: {"new": "", "old": version}},
}

View file

@ -14,7 +14,6 @@ log = logging.getLogger(__name__)
pytestmark = [
pytest.mark.slow_test,
pytest.mark.windows_whitelisted,
pytest.mark.skip_if_binaries_missing("docker", "dockerd", check_all=False),
]

Some files were not shown because too many files have changed in this diff Show more