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

provide generic mechanism to propagate global flags to render.Run operations #986

Merged
merged 1 commit into from Jul 26, 2022

Conversation

grokspawn
Copy link
Contributor

@grokspawn grokspawn commented Jul 6, 2022

Signed-off-by: Jordan Keister jordan@nimblewidget.com

Description of the change:
Provide a generic mechanism for propagating global flags (i.e. use-http, skip-tls-verify) into any caller of alpha/render/Run().
render.Run is updated to use the passed-in options IFF render.Reg is nil, which allows us to preserve call models which provide a ready containerd registry as well as customize call models which would instantiate the registry at that time.

I attempted to break NO API which is not "real alpha" (as opposed to gradations of alpha). There is a viable backwards-compatible path for all non-veneer APIs.

Motivation for the change:
issue #931

Reviewer Checklist

  • Implementation matches the proposed design, or proposal is updated to match implementation
  • Sufficient unit test coverage
  • Sufficient end-to-end test coverage
  • Docs updated or added to /docs
  • Commit messages sensible and descriptive

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 6, 2022
@grokspawn grokspawn requested a review from joelanford July 6, 2022 18:58
@openshift-ci openshift-ci bot requested a review from dinhxuanvu July 6, 2022 18:58
@grokspawn grokspawn requested review from awgreene and removed request for dinhxuanvu July 6, 2022 18:58
@codecov
Copy link

codecov bot commented Jul 6, 2022

Codecov Report

Merging #986 (5174193) into master (524a11c) will decrease coverage by 0.21%.
The diff coverage is 100.00%.

❗ Current head 5174193 differs from pull request most recent head 9752a22. Consider uploading reports for the commit 9752a22 to get more accurate results

@@            Coverage Diff             @@
##           master     #986      +/-   ##
==========================================
- Coverage   52.86%   52.65%   -0.22%     
==========================================
  Files         104      104              
  Lines        9467     9445      -22     
==========================================
- Hits         5005     4973      -32     
- Misses       3529     3539      +10     
  Partials      933      933              
Impacted Files Coverage Δ
alpha/action/list.go 73.25% <100.00%> (+0.31%) ⬆️
alpha/declcfg/write.go 73.01% <0.00%> (-9.28%) ⬇️
alpha/veneer/semver/semver.go 58.82% <0.00%> (-3.04%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 524a11c...9752a22. Read the comment docs.

alpha/action/render.go Outdated Show resolved Hide resolved
@grokspawn grokspawn force-pushed the global-args branch 3 times, most recently from 001bc80 to 48794a1 Compare July 7, 2022 13:08
@grokspawn grokspawn changed the title WIP: provide generic mechanism to propagate global flags to render.Run operations provide generic mechanism to propagate global flags to render.Run operations Jul 7, 2022
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 7, 2022
@grokspawn grokspawn force-pushed the global-args branch 2 times, most recently from eaf14be to 16344af Compare July 11, 2022 16:01
@grokspawn
Copy link
Contributor Author

Tested:

  1. opm alpha list bundles
  2. opm render
  3. opm alpha render-veneer basic
  4. opm alpha render-veneer semver
  5. opm index add

For each, checked help output as well as successful runs.

Signed-off-by: Jordan Keister <jordan@nimblewidget.com>
Copy link
Member

@dinhxuanvu dinhxuanvu left a comment

Choose a reason for hiding this comment

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

/approve

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 26, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dinhxuanvu, grokspawn

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 26, 2022
@perdasilva
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 26, 2022
@openshift-merge-robot openshift-merge-robot merged commit 2a21178 into master Jul 26, 2022
@grokspawn grokspawn deleted the global-args branch July 26, 2022 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: opm alpha list bundles does not support --use-http global flag
5 participants