-
Notifications
You must be signed in to change notification settings - Fork 61
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
Add script to migrate existing build results to Pulp #3509
base: main
Are you sure you want to change the base?
Conversation
305ead3
to
a7d33d1
Compare
a7d33d1
to
92c67e6
Compare
I successfully used the script to migrate data from the Copr STG instance to the Pulp STG instance. It woks for CoprDirs as well:
This successfully installs the package from Pulp. |
sys.exit(1) | ||
|
||
if args.delete: | ||
print("Data removal is not supported yet") |
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.
Since we have a pre-initialized logger, I think we should avoid using print()
command.
|
||
for builddir in os.listdir(chrootdir): | ||
resultdir = os.path.join(chrootdir, builddir) | ||
if not os.path.isdir(resultdir): |
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'm not sure this check is enough..., maybe the upload_build_results
is clever enough to handle issues? But see how this checking is done for the resultdir cleaner crawler.
log.error("Failed to publish a repository: %s", resultdir) | ||
break | ||
|
||
log.info("OK: %s", resultdir) |
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 suppose we can not make this in a transactional manner.. (if error happens, rollback). But would it be possible to first analyze the situation and gather the tasks that need to be done, fail if some problem happens, and only if no problems happen - start the processing?
Also, I'm curious if whether we need a project lock (for building and other modification).
Fix #3503