Do not delete the caller's directory in pipeline mode - #425
Open
ibrahim halatci (ihalatci) wants to merge 2 commits into
Open
Do not delete the caller's directory in pipeline mode#425ibrahim halatci (ihalatci) wants to merge 2 commits into
ibrahim halatci (ihalatci) wants to merge 2 commits into
Conversation
update_docker.py called remove_cloned_code(execution_path) unconditionally. In --pipeline mode execution_path is supplied by the caller (in CI it is $GITHUB_WORKSPACE), so the cleanup deleted the runner's own workspace after the PR had already been created. The Python process exited 0, but the next action in the job could not start: An error occurred trying to start process '.../node20/bin/node' with working directory '/home/runner/work/docker/docker'. No such file or directory This is why every citusdata/docker "Update Version on Docker Files" run has failed even though it successfully opened its PR. remove_cloned_code is only meaningful for the clone the script creates itself in non-pipeline mode. Guard it the same way update_pgxn.py and update_package_properties.py already do. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: bb18c8e4-f4c5-43b7-92cf-30d6b03deb87
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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.
Problem
update_docker.pycalledremove_cloned_code(execution_path)unconditionally at the end of its__main__block.In
--pipelinemode,execution_pathis supplied by the caller — and in CI that is$GITHUB_WORKSPACE. So the cleanup step deleted the runner's own workspace, immediately after the PR had already been created.The Python process itself exits
0, so the failure surfaces one step later, when the next action in the job cannot start:Impact
This is why every recorded run of the
Update Version on Docker Filesworkflow incitusdata/dockerhas failed — 13 runs going back to Sep 2025 — despite the bump PR being opened successfully each time.Evidence: the PRs those runs created (citusdata/docker#364, #371, #375) were each created 2–3 seconds before their run died, and the check-run annotation on each is the
No such file or directoryerror above.Because the workflow always went red, nobody trusted it, and version bumps drifted to being done by hand. That is the root cause of Citus 14.2.0 never getting a Docker image until it was noticed and published manually four weeks after the upstream release.
Fix
remove_cloned_codeis only meaningful for the clone the script creates itself in non-pipeline mode (viainitialize_env). In pipeline mode the caller owns the directory and is responsible for it.Guarded exactly the way the two sibling scripts already do:
update_pgxn.py:78—if not args.is_test and not args.pipeline:update_package_properties.py:451—if not arguments.is_test and not arguments.pipeline:update_docker.pywas the only one missing the guard.Validation
black --checkclean;prospector-relevant formatting unchangedpytest packaging_automation/tests/test_update_docker.py— 9 passed__main__, local bare origin, stubbedcreate_pr): branch created → 6 files changed → commit → push → exit 0 → workspace intactdocker_tempand still deletes it afterwards — no regression to the existing cleanup behaviourFollow-up
Once this is merged and tagged,
citusdata/dockerwill repin.github/workflows/update_version.ymlfromv0.8.36to the new tag.