-
Notifications
You must be signed in to change notification settings - Fork 81
backend: skip projects with comps enabled when migrating to pulp #4087
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request adds functionality to skip projects with comps.xml enabled during the migration to Pulp, which is a necessary step as Pulp does not support this feature. The changes involve adding a new has_comps helper function and integrating it into the main migration script.
My review focuses on improving the efficiency and robustness of the new code. I've identified a performance bottleneck due to repeated API client instantiation within a loop, and a potential issue with overly broad exception handling. Addressing these points will make the migration script more performant and reliable, especially when dealing with a large number of projects.
Pull Request validationFailed🔴 Review - Missing review from a member (2 required) Success🟢 CI - All checks have passed |
b34fbd3 to
ad3b848
Compare
| return True | ||
| except CoprRequestException as ex: | ||
| log.warning("Failed to query chroot %s: %s", chroot, str(ex)) | ||
| continue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there should be either raise() or sys.exit(1) here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I rather removed the try-except... if it raises an exception, the error message will be outputted anyway
this should in theory work, however I haven't tested it yet, so no mergy please (but ready for review)works:Fix #4027