-
Notifications
You must be signed in to change notification settings - Fork 14
add script to backup csv #240
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
Conversation
|
||
If dry_run is True, only log the command and return None. | ||
""" | ||
logger.info(f"[DRY RUN] Executing: {' '.join(cmd)}" if dry_run else f"Executing: {' '.join(cmd)}") |
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.
let's not add [DRY RUN] if it's not a dry run
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.
if its not a dry_run we are running this
else f"Executing: {' '.join(cmd)}")
or do you mean we shouldn't use the ternary operator?
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.
Awesome work!
Summary
This pull request introduces a new script and corresponding Evergreen tasks to backup digest-pinned images from a ClusterServiceVersion (CSV) YAML file to Quay.io. The changes include adding a Python script to perform the backup process, new Evergreen tasks to execute the script, and a new build variant for these tasks.
New Evergreen tasks and build variant:
.evergreen.yml
: Added three new tasks (backup_csv_images_dry_run
,backup_csv_images_limit_3
, andbackup_csv_images_all
) to run the backup script with different options, and created a new build variant (backup_csv_images
) to group these tasks under the "Backup CSV Images" workflow. [1] [2]New Python script for image backup:
scripts/dev/release/backup_csv_images.py
: Added a comprehensive Python script to parse a CSV file, extract digest-pinned images, and back them up to Quay.io using a new tag format (_openshift_<mck_version>
). The script supports dry-run mode, logging, and limiting the number of images to back up.Proof of Work
https://parsley.mongodb.com/evergreen/mongodb_kubernetes_backup_csv_images_backup_csv_images_all_patch_5710105f0347aed651ce63e6b37f06051caa634a_686e4ee749d2610007d96aaa_25_07_09_11_13_48/0/task?bookmarks=0,11182&shareLine=3143

Checklist
Reminder (Please remove this when merging)