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

feat(diff): change HeadsOnly to be an explicit setting #950

Merged
merged 1 commit into from
May 12, 2022

Conversation

dinhxuanvu
Copy link
Member

@dinhxuanvu dinhxuanvu commented Apr 29, 2022

Currently the headsOnly mode is implicitly set if newRef is not provided.
This behavior is unclear and leads to confusion. This commit will change the current
headsOnly to be explicit setting that will be converted to package setting that will
be executed accordingly.

Signed-off-by: Vu Dinh vudinh@outlook.com

Description of the change:

Motivation for the change:

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
Copy link
Contributor

openshift-ci bot commented Apr 29, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dinhxuanvu

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 Apr 29, 2022
@dinhxuanvu
Copy link
Member Author

@jpower432 PTAL

@codecov
Copy link

codecov bot commented Apr 29, 2022

Codecov Report

Merging #950 (626527d) into master (aa8db09) will increase coverage by 0.06%.
The diff coverage is 100.00%.

❗ Current head 626527d differs from pull request most recent head c404b49. Consider uploading reports for the commit c404b49 to get more accurate results

@@            Coverage Diff             @@
##           master     #950      +/-   ##
==========================================
+ Coverage   52.36%   52.42%   +0.06%     
==========================================
  Files         103      103              
  Lines        9216     9228      +12     
==========================================
+ Hits         4826     4838      +12     
  Misses       3468     3468              
  Partials      922      922              
Impacted Files Coverage Δ
alpha/action/diff.go 75.30% <100.00%> (+0.30%) ⬆️
alpha/declcfg/diff.go 80.87% <100.00%> (+0.15%) ⬆️
alpha/declcfg/diff_include.go 63.06% <100.00%> (+1.99%) ⬆️

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 aa8db09...c404b49. Read the comment docs.

@jpower432
Copy link
Contributor

jpower432 commented Apr 29, 2022

@dinhxuanvu Is the HeadsOnly field planned to be added to the DiffIncluder

type DiffIncluder struct {
as well to allow heads-only bundles on packages? It does not appear to affect what bundles are returned when using an include config (I understand that may not be in the scope of this PR). Also noticed this change may break the CLI functionality of opm diff since there is no way for the user to control this field.

@dinhxuanvu dinhxuanvu changed the title feat(diff): Change HeadsOnly to be an explicit mode that can be set feat(diff): change HeadsOnly to be an explicit setting May 11, 2022
Currently the headsOnly mode is implilitly set if newRef is not provided.
This behavior is unclear and leads to confusion. This commit will change the current
headsOnly to be explicit setting that will be converted to package setting that will
be executed accordingly.

Signed-off-by: Vu Dinh <vudinh@outlook.com>
@jpower432
Copy link
Contributor

Review and tested. Working as expected from an oc-mirror perspective.
/lgtm

@openshift-ci
Copy link
Contributor

openshift-ci bot commented May 12, 2022

@jpower432: changing LGTM is restricted to collaborators

In response to this:

Review and tested. Working as expected from an oc-mirror perspective.
/lgtm

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@perdasilva
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label May 12, 2022
@dinhxuanvu dinhxuanvu merged commit fd85a98 into operator-framework:master May 12, 2022
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.

3 participants