-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for 'src_path_content' in upstream does not exist #85
Conversation
/test |
61734a2
to
d10e639
Compare
/test |
d10e639
to
01b6533
Compare
Code change looks fine to me. |
The downstream file is properly deleted by `os.unlink` code, it is still present. But the code that is now in Exception fixes the problem, because upstream file is not present and 'os.readlink(src_path_content)' failed with traceback FileNotFoundError. The traceback is mentioned below in the commit message. See real error: rh_cwt.main.distgit - DEBUG: unlink nginx-124/results/test/run-openshift Traceback (most recent call last): File "/usr/local/bin/rhcwt", line 8, in <module> sys.exit(run()) ^^^^^ File "/home/phracek/.local/lib/python3.12/site-packages/rh_cwt/cli.py", line 169, in run cli.run() File "/home/phracek/.local/lib/python3.12/site-packages/rh_cwt/cli.py", line 163, in run run_function() File "/home/phracek/.local/lib/python3.12/site-packages/rh_cwt/main.py", line 369, in dist_git_merge_changes super(RhelImageRebuilder, self).dist_git_merge_changes(rebase) File "/home/phracek/.local/lib/python3.12/site-packages/container_workflow_tool/main.py", line 578, in dist_git_merge_changes self.distgit.dist_git_merge_changes(images, rebase) File "/home/phracek/.local/lib/python3.12/site-packages/container_workflow_tool/distgit.py", line 99, in dist_git_merge_changes self.pull_upstream(component, path, url, repo, ups_name, commands) File "/home/phracek/.local/lib/python3.12/site-packages/container_workflow_tool/git_operations.py", line 259, in pull_upstream self.sync_handler.handle_dangling_symlinks(cp_path, component) File "/home/phracek/.local/lib/python3.12/site-packages/container_workflow_tool/sync.py", line 101, in handle_dangling_symlinks os.readlink(src_path_content)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: 'upstreams/nginx/1.24/results/test/run-openshift' Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
Update also debug log message, why the file does not exist Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
01b6533
to
92964fd
Compare
@pkubatrh I have updated as code as a commit message with a detailed description. |
/test |
Fix for 'src_path_content' in upstream does not exist
like was removed by PR,
then 'os.readlink(src_path_content)' failed with
traceback 'FileNotFoundError'.
See real error: