File tree Expand file tree Collapse file tree 3 files changed +33
-0
lines changed Expand file tree Collapse file tree 3 files changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,14 @@ on: # yamllint disable-line rule:truthy
23
23
- ' ["3.11"]'
24
24
- ' ["3.9"]'
25
25
- ' ["3.8"]'
26
+ lockfiles_upgrade :
27
+ description : ' Force full relock and upgrades for pylock.toml (manual runs)'
28
+ required : false
29
+ default : ' false'
30
+ type : choice
31
+ options :
32
+ - ' true'
33
+ - ' false'
26
34
update_optional_dirs :
27
35
description : ' Include optional directories in update'
28
36
required : false
48
56
env :
49
57
BRANCH : ${{ github.event.inputs.branch || 'main' }}
50
58
INCLUDE_OPT_DIRS : ${{ github.event.inputs.update_optional_dirs || 'false' }}
59
+ # Force full relock on scheduled runs. For manual runs, use the input toggle.
60
+ FORCE_LOCKFILES_UPGRADE : ${{ github.event_name == 'schedule' && '1' || (github.event.inputs.lockfiles_upgrade == 'true' && '1' || '0') }}
51
61
52
62
steps :
53
63
- name : Checkout code
75
85
- name : Run make refresh-pipfilelock-files
76
86
run : |
77
87
make refresh-pipfilelock-files PYTHON_VERSION=${{ matrix.python-version }} INCLUDE_OPT_DIRS=${{ env.INCLUDE_OPT_DIRS }}
88
+ env :
89
+ FORCE_LOCKFILES_UPGRADE : ${{ env.FORCE_LOCKFILES_UPGRADE }}
78
90
79
91
- name : Commit changes (if any)
80
92
run : |
Original file line number Diff line number Diff line change @@ -4,6 +4,25 @@ set -Eeuxo pipefail
4
4
# Red Hat's build tooling depends on requirements.txt files with hashes
5
5
# Namely, Konflux (https://konflux-ci.dev/), and Cachi2 (https://github.com/containerbuildsystem/cachi2).
6
6
7
+ # Optional behavior:
8
+ # - If FORCE_LOCKFILES_UPGRADE=1 (env) or --upgrade (arg) is provided, perform a
9
+ # ground-up relock and force upgrades using `uv pip compile --upgrade`.
10
+ # This is intended for scheduled runs, while manual runs should default to off.
11
+
12
+ ADDITIONAL_UV_FLAGS=" "
13
+ for arg in " $@ " ; do
14
+ case " $arg " in
15
+ --upgrade)
16
+ FORCE_LOCKFILES_UPGRADE=1
17
+ ;;
18
+ esac
19
+ done
20
+
21
+ if [[ " ${FORCE_LOCKFILES_UPGRADE:- 0} " == " 1" ]]; then
22
+ ADDITIONAL_UV_FLAGS=" --upgrade"
23
+ fi
24
+ export ADDITIONAL_UV_FLAGS
25
+
7
26
# The following will create a pylock.toml file for every pyproject.toml we have.
8
27
uv --version || pip install " uv==0.8.12"
9
28
find . -name pylock.toml -execdir bash -c '
@@ -17,4 +36,5 @@ find . -name pylock.toml -execdir bash -c '
17
36
--python-version="${PWD##*-}" \
18
37
--python-platform linux \
19
38
--no-annotate \
39
+ ${ADDITIONAL_UV_FLAGS:-} \
20
40
--quiet' \;
Original file line number Diff line number Diff line change 14
14
15
15
if TYPE_CHECKING :
16
16
from typing import Any
17
+
17
18
import pytest_subtests
18
19
19
20
MAKE = shutil .which ("gmake" ) or shutil .which ("make" )
You can’t perform that action at this time.
0 commit comments