Skip to content

Commit 986eee2

Browse files
authored
fix: ensure deterministic and reproducible workflow behavior (#2102)
Signed-off-by: Abhijeet Saharan <abhijeetsaharan2236@gmail.com> Signed-off-by: Abhijeet <abhijeetsaharan2236@gmail.com>
1 parent 74a947a commit 986eee2

10 files changed

Lines changed: 1913 additions & 13 deletions

.github/workflows/pr-check-primary-codecov.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939

4040
- name: Install dependencies
4141
run: |
42-
uv sync --all-extras --dev
42+
uv sync --frozen --all-groups --all-packages --all-extras
4343
4444
- name: Generate Proto Files
4545
run: uv run python generate_proto.py

.github/workflows/pr-check-primary-codeql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363

6464
- name: Install dependencies
6565
if: matrix.language == 'python'
66-
run: uv sync --all-extras --dev
66+
run: uv sync --frozen --all-groups --all-packages --all-extras
6767

6868
- name: Perform CodeQL Analysis
6969
uses: github/codeql-action/analyze@9e0d7b8d25671d64c341c19c0152d693099fb5ba # v4.3.5

.github/workflows/pr-check-secondary-deps-test.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ jobs:
2929

3030
- name: Checkout repository
3131
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
32-
32+
with:
33+
fetch-depth: 0 # ensure full git history for SCM-based versioning
3334
- name: Set up Python ${{ matrix.python-version }}
3435
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
3536
with:
@@ -44,7 +45,8 @@ jobs:
4445

4546
- name: Install minimum dependencies and tooling
4647
run: |
47-
uv sync --all-extras --resolution=lowest-direct
48+
# Minimum-deps compatibility check: use a non-editable install for stable packaging behavior.
49+
uv sync --all-extras --resolution=lowest-direct --no-editable
4850
4951
- name: Show resolved core dependency versions
5052
run: |

.github/workflows/pr-check-secondary-examples.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
2828

2929
- name: Install dependencies
30-
run: uv sync --all-extras
30+
run: uv sync --frozen --all-groups --all-packages --all-extras
3131

3232
- name: Generate Proto Files
3333
run: uv run python generate_proto.py

.github/workflows/pr-check-secondary-tck-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
enable-cache: true
4848

4949
- name: Install dependencies
50-
run: uv sync --all-extras --dev
50+
run: uv sync --frozen --all-groups --all-packages --all-extras
5151

5252
- name: Generate Proto Files
5353
run: uv run generate_proto.py

.github/workflows/pr-check-secondary-unit-integration-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
enable-cache: true
6060

6161
- name: Install dependencies
62-
run: uv sync --all-extras --dev
62+
run: uv sync --frozen --all-groups --all-packages --all-extras
6363

6464
- name: Generate Proto Files
6565
run: uv run generate_proto.py
@@ -122,7 +122,7 @@ jobs:
122122
enable-cache: true
123123

124124
- name: Install dependencies
125-
run: uv sync --all-extras --dev
125+
run: uv sync --frozen --all-groups --all-packages --all-extras
126126

127127
- name: Generate Proto Files
128128
run: uv run generate_proto.py

.github/workflows/publish.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,10 @@ jobs:
3535
- name: Upgrade pip
3636
run: pip install "pip==26.0.1"
3737

38+
# Dependency versions are pinned to ensure reproducible builds.
39+
# These should be periodically reviewed and updated for ensuring smooth execution.
3840
- name: Install build, pdm-backend, and grpcio-tools
39-
run: pip install build pdm-backend "grpcio-tools==1.76.0"
41+
run: pip install build==1.5 pdm-backend==2.4.8 grpcio-tools==1.76.0
4042

4143
- name: Generate Protobuf
4244
run: python generate_proto.py

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ src/hiero_sdk_python/hapi
3535
.hypothesis/
3636

3737
# Lock files
38-
uv.lock
3938
pdm.lock
4039
pubkey.asc
4140

pyproject.toml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,20 @@ lint = [
6262
default-groups = ["dev", "lint"]
6363

6464
[build-system]
65-
requires = ["pdm-backend", "setuptools", "setuptools_scm", "grpcio-tools"]
65+
requires = [
66+
"pdm-backend>=2.4.8,<3",
67+
"setuptools>=82,<83",
68+
"setuptools_scm>=7,<9",
69+
"grpcio-tools>=1.76.0,<2"
70+
]
6671
build-backend = "pdm.backend"
6772

6873
[tool.setuptools_scm]
6974
version_scheme = "python-simplified-semver"
7075
local_scheme = "dirty-tag"
7176

72-
[tool.pdm]
73-
version = { source = "scm" }
77+
[tool.pdm.version]
78+
source = "scm"
7479

7580
[tool.pdm.build]
7681
package-dir = "src"

uv.lock

Lines changed: 1892 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)