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

Bug 1885425: fix(indexing): order bulk add by version field #503

Merged
merged 2 commits into from Nov 17, 2020

Conversation

njhale
Copy link
Member

@njhale njhale commented Nov 3, 2020

When adding more than one bundle to an index in replaces mode, sort the input by order of ascending version field (semver). This ensures a deterministic update graph in the absence of a replaces field.

The replaces field takes priority.

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 3, 2020
@njhale njhale changed the title fix(indexing): order bulk add by version field Bug 1885425: fix(indexing): order bulk add by version field Nov 3, 2020
@openshift-ci-robot
Copy link

@njhale: An error was encountered searching for bug 1885425 on the Bugzilla server at https://bugzilla.redhat.com:

could not unmarshal response body: unexpected end of JSON input
Please contact an administrator to resolve this issue, then request a bug refresh with /bugzilla refresh.

In response to this:

Bug 1885425: fix(indexing): order bulk add by version field

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.

@njhale
Copy link
Member Author

njhale commented Nov 3, 2020

/bugzilla refresh

@openshift-ci-robot
Copy link

@njhale: An error was encountered searching for bug 1885425 on the Bugzilla server at https://bugzilla.redhat.com:

could not unmarshal response body: unexpected end of JSON input
Please contact an administrator to resolve this issue, then request a bug refresh with /bugzilla refresh.

In response to this:

/bugzilla refresh

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.

@njhale
Copy link
Member Author

njhale commented Nov 3, 2020

/bugzilla refresh
/retest

@openshift-ci-robot openshift-ci-robot added the bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. label Nov 3, 2020
@openshift-ci-robot
Copy link

@njhale: This pull request references Bugzilla bug 1885425, which is valid. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.7.0) matches configured target release for branch (4.7.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

/bugzilla refresh
/retest

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.

@openshift-ci-robot openshift-ci-robot added the bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. label Nov 3, 2020
@njhale njhale force-pushed the fix-bulk-add branch 3 times, most recently from fa2449f to 0dd89d1 Compare November 3, 2020 15:04
@njhale
Copy link
Member Author

njhale commented Nov 5, 2020

/retest
/hold

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 5, 2020
@yashvardhannanavati
Copy link

Can I please ask what's the time-frame of this PR getting merged?

@openshift-ci-robot openshift-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 12, 2020
@codecov
Copy link

codecov bot commented Nov 12, 2020

Codecov Report

Merging #503 (ffbb2c4) into master (ed41d85) will increase coverage by 0.69%.
The diff coverage is 67.56%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #503      +/-   ##
==========================================
+ Coverage   48.73%   49.42%   +0.69%     
==========================================
  Files          90       90              
  Lines        6103     6286     +183     
==========================================
+ Hits         2974     3107     +133     
- Misses       2469     2485      +16     
- Partials      660      694      +34     
Impacted Files Coverage Δ
pkg/registry/decode.go 81.25% <ø> (ø)
pkg/registry/empty.go 0.00% <0.00%> (ø)
pkg/sqlite/load.go 41.79% <38.29%> (-0.50%) ⬇️
pkg/sqlite/query.go 67.08% <61.66%> (+0.50%) ⬆️
pkg/registry/bundle.go 58.53% <73.33%> (+7.83%) ⬆️
pkg/registry/populator.go 63.02% <77.01%> (+2.59%) ⬆️
pkg/registry/input_stream.go 77.94% <77.94%> (ø)
pkg/lib/bundle/validate.go 63.80% <100.00%> (ø)
pkg/registry/imageinput.go 69.49% <100.00%> (+0.52%) ⬆️
pkg/sqlite/configmap.go 45.16% <100.00%> (ø)
... and 3 more

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 ed41d85...8096517. Read the comment docs.

@njhale njhale force-pushed the fix-bulk-add branch 3 times, most recently from 3e84bf0 to 716e9ff Compare November 13, 2020 05:40
When adding more than one bundle to an index in replaces mode,
sort the input by order of ascending version field (semver).
This ensures a deterministic update graph in the absence of a replaces field.
The replaces field takes priority.
@openshift-ci-robot openshift-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 13, 2020
@njhale
Copy link
Member Author

njhale commented Nov 13, 2020

/hold cancel

Can I please ask what's the time-frame of this PR getting merged?

@yashvardhannanavati I'm requesting reviews now. If all goes well it should be in today.

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 13, 2020
On index add in replaces mode, pick the highest bundle version in each
channel as its head; take the default channel from the highest bundle
version in the entire package.
@ecordell
Copy link
Member

/approve

@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ecordell, njhale

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

@kevinrizza
Copy link
Member

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Nov 13, 2020
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

1 similar comment
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@njhale
Copy link
Member Author

njhale commented Nov 13, 2020

/retest

1 similar comment
@njhale
Copy link
Member Author

njhale commented Nov 14, 2020

/retest

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

1 similar comment
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@njhale
Copy link
Member Author

njhale commented Nov 16, 2020

/hold

e2e-aws consistently failing. investigating now.

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 16, 2020
@njhale
Copy link
Member Author

njhale commented Nov 16, 2020

/hold cancel

The failures don't seem to be isolated to this PR or operator-registry. DPTP is looking into the problem (see https://coreos.slack.com/archives/CEKNRGF25/p1605530888050100)

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 16, 2020
@njhale
Copy link
Member Author

njhale commented Nov 16, 2020

/retest

2 similar comments
@njhale
Copy link
Member Author

njhale commented Nov 16, 2020

/retest

@njhale
Copy link
Member Author

njhale commented Nov 17, 2020

/retest

@openshift-merge-robot openshift-merge-robot merged commit 6ec440c into operator-framework:master Nov 17, 2020
@openshift-ci-robot
Copy link

@njhale: Some pull requests linked via external trackers have merged:

The following pull requests linked via external trackers have not merged:

These pull request must merge or be unlinked from the Bugzilla bug in order for it to move to the next state. Once unlinked, request a bug refresh with /bugzilla refresh.

Bugzilla bug 1885425 has not been moved to the MODIFIED state.

In response to this:

Bug 1885425: fix(indexing): order bulk add by version field

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.

@njhale
Copy link
Member Author

njhale commented Nov 17, 2020

/cherry-pick release-4.6

@openshift-cherrypick-robot

@njhale: #503 failed to apply on top of branch "release-4.6":

Applying: fix(indexing): order bulk add by version field
Using index info to reconstruct a base tree...
M	go.mod
M	pkg/registry/populator_test.go
M	vendor/modules.txt
Falling back to patching base and 3-way merge...
Auto-merging vendor/modules.txt
Removing pkg/registry/replacesgraphloader.go
Auto-merging pkg/registry/populator_test.go
CONFLICT (content): Merge conflict in pkg/registry/populator_test.go
Auto-merging go.mod
CONFLICT (content): Merge conflict in go.mod
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 fix(indexing): order bulk add by version field
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherry-pick release-4.6

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.

anik120 added a commit to anik120/operator-registry that referenced this pull request Nov 18, 2020
With the introduction of operator-framework#503, when a bundle from the list of bundles
being added with the `opm index add` command was invalid, opm was not
throwing an error, and was building the index with the valid bundles
instead, even when the `permissive` mode was not enabled. This PR
fixes the issue.
@njhale
Copy link
Member Author

njhale commented Nov 19, 2020

/bugzilla refresh

@openshift-ci-robot
Copy link

@njhale: All pull requests linked via external trackers have merged:

Bugzilla bug 1885425 has been moved to the MODIFIED state.

In response to this:

/bugzilla refresh

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.

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. bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants