Repository navigation
workflows: Restore the dependency cache before creating the virtual environment in "Release" - #1063
Merged
jtrobles-cdd merged 1 commit intoSep 10, 2026
Conversation
- Apply to workflow `release.yaml` the fix that PR #1062 applied to workflow `ci.yaml`: restore the cache before creating the Python virtual environment, and create the environment only when the cache was not restored. - The `Release` job restores the same cache over a virtual environment it has just created, which merges the Pip installation that `python -m venv` bootstraps with the cached one instead of replacing it, and fails with `ImportError: cannot import name 'get_runnable_pip' from 'pip._internal.utils.misc'` since Pip 26.2 turned module `pip/_internal/build_env.py` into a package of the same name. - The job was not covered by PR #1062 because only `ci.yaml` was inspected. It runs only on `master`, so the failure has not been observed yet and would have surfaced during the next publication. Ref: cordada/lib-cl-sii-api-python#1131
|
jtrobles-cdd
deleted the
bugfix/release-virtualenv-cache-restore-order
branch
September 10, 2026 18:35
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



The
Releasejob of theReleaseworkflow has the step order that #1062 fixed in theCIworkflow. That pull request changed only.github/workflows/ci.yaml, so.github/workflows/release.yamlwas left with it.The failure has not been observed here yet, unlike in
lib-cl-sii-api-python, only becauseci-cd.yamlgates theReleasejob onrefs/heads/master: it is skipped ondevelop, and it would have surfaced during the next publication instead.Cause
actions/cacherestores by extracting an archive over the workspace, so the cached Pip installation gets merged with the onepython -m venvbootstraps instead of replacing it.actions/setup-pythoncurrently installs bootstrap Pip 26.2.1, while this project pins 26.0.1. Pip 26.2 turned modulepip/_internal/build_env.pyinto a package of the same name, so thebuild_env/package of 26.2.1 survives the merge and shadows thebuild_env.pymodule of 26.0.1, and Pip fails withImportError: cannot import name 'get_runnable_pip' from 'pip._internal.utils.misc'.Changes
release.yamlthe same reordering workflows: Restore the dependency cache before creating the virtual environment #1062 applied toci.yaml: restore the cache first, and create the virtual environment only when the cache was not restored.Remaining Occurrences
deploy.yamlrestores the same cache but creates no virtual environment, which is the safe case, andci-cd.yaml,task-release-and-publish.yaml,git-commit-lint.yamlanddependency-review.yamltouch neither.Verification
Releasejob runs on a push tomaster, not on a pull request, so no check on this pull request exercises the changed job, and neither will thedeveloprun after the merge. Somebody has to confirm it during the next publication tomaster.