Skip to content
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 bundle_replacements parameter to regenerate_bundle #429

Merged

Conversation

arewm
Copy link
Contributor

@arewm arewm commented Sep 14, 2022

Adding support towards the specification of specific bundle replacements
to perform when calling the regenerate_bundle API.

Refers to CLOUDDST-14679 and CLOUDDST-14790

Replaces #424 to resolve the merge conflicts.

Signed-off-by: arewm arewm@users.noreply.github.com

iib/workers/tasks/build_regenerate_bundle.py Outdated Show resolved Hide resolved
iib/workers/tasks/build_regenerate_bundle.py Outdated Show resolved Hide resolved
iib/workers/tasks/build_regenerate_bundle.py Outdated Show resolved Hide resolved
iib/web/api_v1.py Show resolved Hide resolved
@arewm arewm force-pushed the bundle-replacements branch 3 times, most recently from df21a4c to ffd071a Compare September 15, 2022 18:14
@arewm arewm requested review from yashvardhannanavati and removed request for chandwanitulsi September 15, 2022 18:21
@arewm
Copy link
Contributor Author

arewm commented Sep 19, 2022

@chandwanitulsi, I didn't mean to remove a requested review from you. Please feel free to review! :D

Copy link
Collaborator

@yashvardhannanavati yashvardhannanavati left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one comment. Otherwise looks good to me

.flake8 Outdated Show resolved Hide resolved
for old, new in bundle_replacements.items():
if _is_bundle_image(old):
replacement_pullspecs[ImageName.parse(old)] = ImageName.parse(new)
_replace_csv_pullspecs(bundle_metadata, replacement_pullspecs)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we know what happens if the pullspec you are trying to replace is not present in the CSV? Will it throw an error?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It won't throw an error. This is actually already tested with the test case I included --

    bundle_replacements = {
        'quay.io/operator/image@sha256:654321': 'quay.io/operator/image@sha256:123456',
        'registry.access.company.com/operator/image@sha256:765432': 'foo.baz/image@sha256:234567',
    }

The first pullspec is present, the second isn't (at the time of doing the replacements).

Make the process easier to migrate the underlying database and update
requirements files.

Also updated the package dependencies to support building on aarch.

Signed-off-by: arewm <arewm@users.noreply.github.com>
Adding support towards the specification of specific bundle replacements
to perform when calling the `regenerate_bundle` API.

Refers to CLOUDDST-14679

Signed-off-by: arewm <arewm@users.noreply.github.com>
Continuing to add support towards the specification of specific bundle
replacements to perform when calling the `regenerate_bundle` API.

In order to apply the bundle_replacements, a `perform_bundle_replacements`
typed customization needs to be set for the organization.

Refers to CLOUDDST-14790

Signed-off-by: arewm <arewm@users.noreply.github.com>
@arewm arewm force-pushed the bundle-replacements branch from ffd071a to 0ab3d4a Compare September 27, 2022 01:40
@yashvardhannanavati yashvardhannanavati merged commit 7952978 into release-engineering:master Sep 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants