Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ebfca86

Browse files
authored
Merge pull request #68398 from dwoz/merge/3007.x/3006.x-25-10-14
Merge forward 3006.x into 3007.x
2 parents 4d10aff + da73df9 commit ebfca86

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+483
-166
lines changed

.github/actions/setup-pre-commit/action.yml

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,24 +17,10 @@ runs:
1717

1818
steps:
1919

20-
- uses: ./.github/actions/cached-virtualenv
21-
id: pre-commit-virtualenv
22-
with:
23-
name: pre-commit
24-
cache-seed: ${{ inputs.cache-seed }}
25-
2620
- name: Install Pre-Commit
27-
if: ${{ steps.pre-commit-virtualenv.outputs.cache-hit != 'true' }}
2821
shell: bash
2922
run: |
30-
${{ steps.pre-commit-virtualenv.outputs.python-executable }} -m pip install pre-commit==${{ inputs.version }}
31-
32-
- name: Cache Pre-Commit Hooks
33-
uses: ./.github/actions/cache
34-
id: pre-commit-hooks-cache
35-
with:
36-
key: ${{ steps.pre-commit-virtualenv.outputs.cache-key }}|${{ inputs.version }}|${{ hashFiles('.pre-commit-config.yaml') }}
37-
path: ~/.cache/pre-commit
23+
pip install pre-commit==${{ inputs.version }}
3824
3925
- name: Install Pre-Commit Hooks
4026
shell: bash

.github/workflows/ci.yml

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ on:
2020

2121
env:
2222
COLUMNS: 190
23-
CACHE_SEED: SEED-0 # Bump the number to invalidate all caches
23+
CACHE_SEED: SEED-1 # Bump the number to invalidate all caches
2424
RELENV_DATA: "${{ github.workspace }}/.relenv"
2525
PIP_DISABLE_PIP_VERSION_CHECK: "1"
2626
RAISE_DEPRECATIONS_RUNTIME_ERRORS: "1"
@@ -239,7 +239,9 @@ jobs:
239239
with:
240240
cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }}
241241
changed-files: ${{ needs.prepare-workflow.outputs.changed-files }}
242-
pre-commit-version: "3.0.4"
242+
pre-commit-version: "4.3.0"
243+
ci-python-version: "3.11"
244+
full: ${{ fromJSON(needs.prepare-workflow.outputs.config)['testrun']['type'] == 'full' }}
243245

244246
lint:
245247
name: Lint
@@ -356,7 +358,7 @@ jobs:
356358
if: ${{ startsWith(github.event.ref, 'refs/tags') == false }}
357359
uses: ./.github/actions/setup-pre-commit
358360
with:
359-
version: "3.0.4"
361+
version: "4.3.0"
360362
cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }}
361363

362364
- name: Commit Changes
@@ -437,8 +439,8 @@ jobs:
437439
with:
438440
cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }}
439441
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
440-
relenv-version: "0.20.6"
441-
python-version: "3.10.18"
442+
relenv-version: "0.21.1"
443+
python-version: "3.10.19"
442444
ci-python-version: "3.11"
443445
matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['build-matrix']) }}
444446
linux_arm_runner: ${{ fromJSON(needs.prepare-workflow.outputs.config)['linux_arm_runner'] }}
@@ -454,8 +456,8 @@ jobs:
454456
with:
455457
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
456458
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}
457-
relenv-version: "0.20.6"
458-
python-version: "3.10.18"
459+
relenv-version: "0.21.1"
460+
python-version: "3.10.19"
459461
ci-python-version: "3.11"
460462
source: "onedir"
461463
matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['build-matrix']) }}
@@ -471,8 +473,8 @@ jobs:
471473
with:
472474
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
473475
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}
474-
relenv-version: "0.20.6"
475-
python-version: "3.10.18"
476+
relenv-version: "0.21.1"
477+
python-version: "3.10.19"
476478
ci-python-version: "3.11"
477479
source: "src"
478480
matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['build-matrix']) }}
@@ -487,10 +489,10 @@ jobs:
487489
with:
488490
nox-session: ci-test-onedir
489491
nox-version: 2022.8.7
490-
python-version: "3.10.18"
492+
python-version: "3.10.19"
491493
ci-python-version: "3.11"
492494
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
493-
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.18
495+
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.19
494496
nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}"
495497
matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['build-matrix']) }}
496498
linux_arm_runner: ${{ fromJSON(needs.prepare-workflow.outputs.config)['linux_arm_runner'] }}
@@ -507,7 +509,7 @@ jobs:
507509
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
508510
nox-version: 2022.8.7
509511
ci-python-version: "3.11"
510-
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.18
512+
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.19
511513
skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.config)['skip_code_coverage'] }}
512514
testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }}
513515
matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['pkg-test-matrix']) }}
@@ -525,7 +527,7 @@ jobs:
525527
ci-python-version: "3.11"
526528
testrun: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['testrun']) }}
527529
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
528-
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.18
530+
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.19
529531
skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.config)['skip_code_coverage'] }}
530532
workflow-slug: ci
531533
default-timeout: 180

.github/workflows/depcheck.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,8 @@ jobs:
237237
cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }}
238238
changed-files: ${{ needs.prepare-workflow.outputs.changed-files }}
239239
pre-commit-version: "3.0.4"
240+
ci-python-version: "3.11"
241+
full: true
240242

241243
lint:
242244
name: Lint

.github/workflows/nightly.yml

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ on:
2222

2323
env:
2424
COLUMNS: 190
25-
CACHE_SEED: SEED-0 # Bump the number to invalidate all caches
25+
CACHE_SEED: SEED-1 # Bump the number to invalidate all caches
2626
RELENV_DATA: "${{ github.workspace }}/.relenv"
2727
PIP_DISABLE_PIP_VERSION_CHECK: "1"
2828
RAISE_DEPRECATIONS_RUNTIME_ERRORS: "1"
@@ -292,7 +292,9 @@ jobs:
292292
with:
293293
cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }}
294294
changed-files: ${{ needs.prepare-workflow.outputs.changed-files }}
295-
pre-commit-version: "3.0.4"
295+
pre-commit-version: "4.3.0"
296+
ci-python-version: "3.11"
297+
full: ${{ fromJSON(needs.prepare-workflow.outputs.config)['testrun']['type'] == 'full' }}
296298

297299
lint:
298300
name: Lint
@@ -409,7 +411,7 @@ jobs:
409411
if: ${{ startsWith(github.event.ref, 'refs/tags') == false }}
410412
uses: ./.github/actions/setup-pre-commit
411413
with:
412-
version: "3.0.4"
414+
version: "4.3.0"
413415
cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }}
414416

415417
- name: Commit Changes
@@ -490,8 +492,8 @@ jobs:
490492
with:
491493
cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }}
492494
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
493-
relenv-version: "0.20.6"
494-
python-version: "3.10.18"
495+
relenv-version: "0.21.1"
496+
python-version: "3.10.19"
495497
ci-python-version: "3.11"
496498
matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['build-matrix']) }}
497499
linux_arm_runner: ${{ fromJSON(needs.prepare-workflow.outputs.config)['linux_arm_runner'] }}
@@ -507,8 +509,8 @@ jobs:
507509
with:
508510
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
509511
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}
510-
relenv-version: "0.20.6"
511-
python-version: "3.10.18"
512+
relenv-version: "0.21.1"
513+
python-version: "3.10.19"
512514
ci-python-version: "3.11"
513515
source: "onedir"
514516
matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['build-matrix']) }}
@@ -528,8 +530,8 @@ jobs:
528530
with:
529531
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
530532
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}
531-
relenv-version: "0.20.6"
532-
python-version: "3.10.18"
533+
relenv-version: "0.21.1"
534+
python-version: "3.10.19"
533535
ci-python-version: "3.11"
534536
source: "src"
535537
matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['build-matrix']) }}
@@ -548,10 +550,10 @@ jobs:
548550
with:
549551
nox-session: ci-test-onedir
550552
nox-version: 2022.8.7
551-
python-version: "3.10.18"
553+
python-version: "3.10.19"
552554
ci-python-version: "3.11"
553555
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
554-
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.18
556+
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.19
555557
nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}"
556558
matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['build-matrix']) }}
557559
linux_arm_runner: ${{ fromJSON(needs.prepare-workflow.outputs.config)['linux_arm_runner'] }}
@@ -568,7 +570,7 @@ jobs:
568570
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
569571
nox-version: 2022.8.7
570572
ci-python-version: "3.11"
571-
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.18
573+
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.19
572574
skip-code-coverage: true
573575
testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }}
574576
matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['pkg-test-matrix']) }}
@@ -586,7 +588,7 @@ jobs:
586588
ci-python-version: "3.11"
587589
testrun: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['testrun']) }}
588590
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
589-
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.18
591+
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.19
590592
skip-code-coverage: true
591593
workflow-slug: nightly
592594
default-timeout: 360

.github/workflows/pre-commit-action.yml

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ on:
88
required: true
99
type: string
1010
description: JSON string containing information about changed files
11+
ci-python-version:
12+
required: true
13+
type: string
14+
description: The python version to run tests with
1115
pre-commit-version:
1216
required: true
1317
type: string
@@ -16,21 +20,31 @@ on:
1620
required: true
1721
type: string
1822
description: Seed used to invalidate caches
23+
full:
24+
required: true
25+
type: boolean
26+
description: When this is true lint will run against all files
1927

2028
jobs:
2129
Pre-Commit:
2230
name: Run Pre-Commit Against Salt
2331

2432
runs-on: ubuntu-22.04
2533

26-
container:
27-
image: ghcr.io/saltstack/salt-ci-containers/testing:ubuntu-22.04
28-
2934
env:
3035
PRE_COMMIT_COLOR: always
3136

3237
steps:
3338

39+
- name: Setup Python ${{ inputs.ci-python-version }}
40+
uses: actions/setup-python@v5
41+
with:
42+
python-version: "${{ inputs.ci-python-version }}"
43+
44+
- name: Install dependency packages
45+
run: |
46+
sudo apt-get install -y libxml2-dev libxslt1-dev
47+
3448
- name: Add Git Safe Directory
3549
run: |
3650
git config --global --add safe.directory "$(pwd)"
@@ -42,24 +56,27 @@ jobs:
4256
- uses: ./.github/actions/setup-shellcheck
4357
with:
4458
cache-seed: ${{ inputs.cache-seed }}
59+
4560
- uses: ./.github/actions/setup-pre-commit
4661
with:
4762
version: ${{ inputs.pre-commit-version }}
4863
cache-seed: ${{ inputs.cache-seed }}
4964

5065
- name: Check ALL Files On Branch
51-
if: ${{ !cancelled() && github.event_name != 'pull_request' }}
66+
if: ${{ !cancelled() && github.event_name != 'pull_request' || inputs.full }}
5267
env:
5368
SKIP: lint-salt,lint-tests,remove-import-headers,pyupgrade
5469
run: |
5570
pre-commit run --show-diff-on-failure --color=always --all-files
5671
5772
- name: Check Changed Files On PR
58-
if: ${{ !cancelled() && github.event_name == 'pull_request' && fromJSON(inputs.changed-files)['repo'] }}
73+
if: ${{ !cancelled() && !inputs.full && github.event_name == 'pull_request' && fromJSON(inputs.changed-files)['repo'] }}
5974
env:
6075
SKIP: lint-salt,lint-tests
6176
GH_ACTIONS_ANNOTATE: "1"
6277
run: |
78+
which pre-commit
79+
pre-commit --version
6380
pre-commit run --show-diff-on-failure --color=always --files ${{ join(fromJSON(inputs.changed-files)['repo_files'], ' ') }}
6481
6582
- name: Check Docs On Deleted Files

.github/workflows/scheduled.yml

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212

1313
env:
1414
COLUMNS: 190
15-
CACHE_SEED: SEED-0 # Bump the number to invalidate all caches
15+
CACHE_SEED: SEED-1 # Bump the number to invalidate all caches
1616
RELENV_DATA: "${{ github.workspace }}/.relenv"
1717
PIP_DISABLE_PIP_VERSION_CHECK: "1"
1818
RAISE_DEPRECATIONS_RUNTIME_ERRORS: "1"
@@ -282,7 +282,9 @@ jobs:
282282
with:
283283
cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }}
284284
changed-files: ${{ needs.prepare-workflow.outputs.changed-files }}
285-
pre-commit-version: "3.0.4"
285+
pre-commit-version: "4.3.0"
286+
ci-python-version: "3.11"
287+
full: ${{ fromJSON(needs.prepare-workflow.outputs.config)['testrun']['type'] == 'full' }}
286288

287289
lint:
288290
name: Lint
@@ -399,7 +401,7 @@ jobs:
399401
if: ${{ startsWith(github.event.ref, 'refs/tags') == false }}
400402
uses: ./.github/actions/setup-pre-commit
401403
with:
402-
version: "3.0.4"
404+
version: "4.3.0"
403405
cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }}
404406

405407
- name: Commit Changes
@@ -480,8 +482,8 @@ jobs:
480482
with:
481483
cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }}
482484
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
483-
relenv-version: "0.20.6"
484-
python-version: "3.10.18"
485+
relenv-version: "0.21.1"
486+
python-version: "3.10.19"
485487
ci-python-version: "3.11"
486488
matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['build-matrix']) }}
487489
linux_arm_runner: ${{ fromJSON(needs.prepare-workflow.outputs.config)['linux_arm_runner'] }}
@@ -497,8 +499,8 @@ jobs:
497499
with:
498500
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
499501
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}
500-
relenv-version: "0.20.6"
501-
python-version: "3.10.18"
502+
relenv-version: "0.21.1"
503+
python-version: "3.10.19"
502504
ci-python-version: "3.11"
503505
source: "onedir"
504506
matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['build-matrix']) }}
@@ -514,8 +516,8 @@ jobs:
514516
with:
515517
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
516518
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}
517-
relenv-version: "0.20.6"
518-
python-version: "3.10.18"
519+
relenv-version: "0.21.1"
520+
python-version: "3.10.19"
519521
ci-python-version: "3.11"
520522
source: "src"
521523
matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['build-matrix']) }}
@@ -530,10 +532,10 @@ jobs:
530532
with:
531533
nox-session: ci-test-onedir
532534
nox-version: 2022.8.7
533-
python-version: "3.10.18"
535+
python-version: "3.10.19"
534536
ci-python-version: "3.11"
535537
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
536-
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.18
538+
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.19
537539
nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}"
538540
matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['build-matrix']) }}
539541
linux_arm_runner: ${{ fromJSON(needs.prepare-workflow.outputs.config)['linux_arm_runner'] }}
@@ -550,7 +552,7 @@ jobs:
550552
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
551553
nox-version: 2022.8.7
552554
ci-python-version: "3.11"
553-
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.18
555+
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.19
554556
skip-code-coverage: true
555557
testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }}
556558
matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['pkg-test-matrix']) }}
@@ -568,7 +570,7 @@ jobs:
568570
ci-python-version: "3.11"
569571
testrun: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['testrun']) }}
570572
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
571-
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.18
573+
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.19
572574
skip-code-coverage: true
573575
workflow-slug: scheduled
574576
default-timeout: 360

0 commit comments

Comments
 (0)