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 support for "graph_update_mode" parameter in Add request #551

Merged
merged 1 commit into from
Aug 2, 2023

Conversation

yashvardhannanavati
Copy link
Collaborator

Refers to CLOUDDST-19655

This PR allows the user to specify "graph_update_mode" as a parameter while submitting an Add request to IIB. It allows the user to specify the OPM graph update mode that defines how the channel graphs are updated in the index. It is a restricted parameter only acceptING OPM specific values and will only be allowed for index image pull specs ("from_index") that are explicitly configured in the IIB API config under IIB_GRAPH_MODE_ALLOW_LIST.

@yashvardhannanavati yashvardhannanavati force-pushed the update_deps_dependabot branch 2 times, most recently from b19ef2f to dbdb0f1 Compare July 27, 2023 22:46
iib/web/config.py Outdated Show resolved Hide resolved
iib/web/models.py Outdated Show resolved Hide resolved
@xDaile
Copy link
Contributor

xDaile commented Jul 28, 2023

Probably not a problem, however, I noticed that this is the second PR from the "update_deps_dependabot" branch.

@yashvardhannanavati
Copy link
Collaborator Author

Probably not a problem, however, I noticed that this is the second PR from the "update_deps_dependabot" branch.

yes, I am using the same branch for the last PR (fixing models) and this PR

@yashvardhannanavati
Copy link
Collaborator Author

@release-engineering/exd-guild-hello-operator verified as working locally

$ curl -sL -H "Content-Type: application/json" \
        "http://localhost:8080/api/v1/builds/add" -d \
        '{
          "bundles":[], "from_index": "registry-proxy.engineering.redhat.com/rh-osbs/iib-pub:v4.11", "binary_image": "registry-proxy.engineering.redhat.com/rh-osbs/openshift-ose-operator-registry:v4.13", "graph_update_mode": "replaces"
        }' | jq '.id'

2023-07-28 20:20:06,409 iib.workers.tasks.utils ForkPoolWorker-1 request-2 DEBUG utils.run_cmd Running the command "opm registry add --database /tmp/iib-2-qnhb6yk_/database/index.db --enable-alpha --bundle-images "" --mode replaces"


$ curl -sL -H "Content-Type: application/json" \
        "http://localhost:8080/api/v1/builds/add" -d \
        '{
          "bundles":[], "from_index": "registry-proxy.engineering.redhat.com/rh-osbs/iib-pub:v4.11", "binary_image": "registry-proxy.engineering.redhat.com/rh-osbs/openshift-ose-operator-registry:v4.13"
        }' | jq '.id'

2023-07-28 20:02:12,895 iib.workers.tasks.utils ForkPoolWorker-1 request-1 DEBUG utils.run_cmd Running the command "opm registry add --database /tmp/iib-n002zsli/database/index.db --enable-alpha --bundle-images """

@yashvardhannanavati yashvardhannanavati merged commit 07cb3ab into master Aug 2, 2023
@yashvardhannanavati yashvardhannanavati deleted the update_deps_dependabot branch August 2, 2023 16:54
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