fix: ensure deterministic and reproducible workflow behavior#2102
fix: ensure deterministic and reproducible workflow behavior#2102Abhijeet2409 wants to merge 12 commits into
Conversation
Not up to standards ⛔🔴 Issues
|
| Category | Results |
|---|---|
| Security | 2 medium 1 minor |
| Complexity | 1 critical |
🟢 Metrics 0 complexity
Metric Results Complexity 0
TIP This summary will be updated as you push new changes. Give us feedback
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #2102 +/- ##
=======================================
Coverage 93.68% 93.68%
=======================================
Files 145 145
Lines 9426 9426
=======================================
Hits 8831 8831
Misses 595 595 🚀 New features to boost your workflow:
|
ad0c26e to
a75c8b7
Compare
0504e01 to
595016e
Compare
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughRemoved Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 📋 Issue PlannerBuilt with CodeRabbit's Coding Plans for faster development and fewer bugs. View plan used: ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: e9809a5e-f84e-4629-9a97-5f3ec1736765
⛔ Files ignored due to path filters (1)
uv.lockis excluded by!**/*.lock
📒 Files selected for processing (9)
.github/workflows/deps-check.yml.github/workflows/pr-check-codecov.yml.github/workflows/pr-check-examples.yml.github/workflows/pr-check-secondary-unit-integration-test.yml.github/workflows/publish.yml.github/workflows/tck-test.yml.gitignoreCHANGELOG.mdpyproject.toml
💤 Files with no reviewable changes (1)
- .gitignore
exploreriii
left a comment
There was a problem hiding this comment.
Hi @Abhijeet2409
This is looking pretty good, I left a question.
Could you please rebase, fetching all new content from upstream main.
We have changed some of these workflow names (sorry for the inconvenience) and also deleted the changelog, do you'll no longer need and entry.
Thanks!
0274282 to
16991d2
Compare
|
Hey @exploreriii, thanks for the review. I’ve successfully rebased my commits, resolved conflicts, and updated things accordingly. Happy to make any further changes if needed :) |
exploreriii
left a comment
There was a problem hiding this comment.
Hi @Abhijeet2409 note your DCO+GPG key signing got mixed up here, please check your signing and try again
No issue, I’ll fix that. I’ve been busy traveling lately. |
Signed-off-by: Abhijeet Saharan <abhijeetsaharan2236@gmail.com>
ac742a9 to
f642513
Compare
|
@Abhijeet2409 Please update the branch |
aceppaluni
left a comment
There was a problem hiding this comment.
@Abhijeet2409 Thank you for this.
The reason the workflow fails is the use of --no-editable
This flag needs to exist in each workflow, not jsut pr-check-secondary-deps-test.yml.
So sections where you see something like
- name: Install dependencies
run: |
uv sync --all-extras --dev --frozenNeed to inclide this flag. So it changes to
- name: Install dependencies
run: |
uv sync --all-extras --dev --frozen --no-editableWhat are your thoughts on this change?
|
@aceppaluni I agree with your suggestion. I checked the related workflows/tests to see if switching all Using Since I’ll proceed with adding --no-editable in the remaining workflows. |
Signed-off-by: Abhijeet <abhijeetsaharan2236@gmail.com>
Signed-off-by: Abhijeet Saharan <abhijeetsaharan2236@gmail.com>
Signed-off-by: Abhijeet <abhijeetsaharan2236@gmail.com>
|
After applying --no-editable across the remaining uv sync workflows, the failures now seem to consistently point to package version metadata mismatches. |
d3844a8 to
ac00687
Compare
Thank you for the update |
exploreriii
left a comment
There was a problem hiding this comment.
Hi I think this is pretty good, just have a couple questions
| # These should be periodically reviewed and updated for ensuring smooth execution. | ||
| - name: Install build, pdm-backend, and grpcio-tools | ||
| run: pip install build pdm-backend "grpcio-tools==1.76.0" | ||
| run: pip install build==1.4.2 pdm-backend==2.4.8 grpcio-tools==1.76.0 |
There was a problem hiding this comment.
i think this is now 1.5?
https://github.com/pypa/build/releases
There was a problem hiding this comment.
Yes, build version is 1.5 now, so updating accordingly.
| requires = ["pdm-backend", "setuptools", "setuptools_scm", "grpcio-tools"] | ||
| requires = [ | ||
| "pdm-backend>=2.4.8,<3", | ||
| "setuptools>=82,<83", |
There was a problem hiding this comment.
i know we had these in build, but unsure if they all need to be here? have you tested, as you are now narrowing the windows?
maybe grpcio-tools & setuptools (are we usin gthis?) can be moved to dependencies
cc @manishdait
There was a problem hiding this comment.
setuptools is needed we do use them because pdm-backend relies on it to resolve to dynamic = ["version"], for grpcio-tools, I'll verify if the build passes without it and drop a comment
Signed-off-by: Abhijeet <abhijeetsaharan2236@gmail.com>
|
|
||
| - name: Install dependencies | ||
| run: uv sync --all-extras --dev | ||
| run: uv sync --all-extras --dev --frozen --no-editable |
There was a problem hiding this comment.
Hi @Abhijeet2409, can you update this to uv sync --frozen --all-groups --all-packages --all-extras same for rest
Signed-off-by: Abhijeet Saharan <abhijeetsaharan2236@gmail.com>
This PR ensures deterministic and reproducible CI workflows by introducing
uv.lockand aligning dependency installation across workflows.Changes
1. Enable reproducible environments
uv.lockfrom.gitignoreuv.lockand committed it to the repository to ensure it locks exact dependency versions.2. Enforce frozen installs in CI
Added
--frozentouv syncin:pr-check-codecov.ymlpr-check-examples.ymlpr-check-secondary-unit-integration-test.ymltck-test.ymlEnsures workflows install dependencies from the lockfile (
uv.lock) using--frozen.3. deps-check workflow
--no-editableto avoid SCM version mismatch during editable installs.4. Stabilize publish workflow
pip(did not switch touvto avoid introducing potential issues).build==1.5pdm-backend==2.4.8grpcio-tools==1.76.05. pyproject.toml adjustments
Testing
1. Dependency Compatibility Check workflow
https://github.com/Abhijeet2409/hiero-sdk-python/actions/runs/24361544442
2. Publish to PyPI workflow
3. Run Examples workflow
https://github.com/Abhijeet2409/hiero-sdk-python/actions/runs/24361544373/job/71142317974
4. Secondary PR Check – Hiero Solo Integration & Unit Tests workflow
https://github.com/Abhijeet2409/hiero-sdk-python/actions/runs/24361909167/job/71143673219
5. TCK Unit Test workflow
https://github.com/Abhijeet2409/hiero-sdk-python/actions/runs/24361909191/job/71143561187
6. Code Coverage workflow
https://github.com/Abhijeet2409/hiero-sdk-python/actions/runs/24361909161/job/71143561091
Fixes #2057