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 1829735: fix(operator): map top-level csv phase to component conditions #1732

Merged

Conversation

njhale
Copy link
Member

@njhale njhale commented Aug 20, 2020

Description of the change:

Map the top-level status of a CSV to a single status condition of an Operator component reference. A corollary is that a CSV component reference will only have the latest phase recorded as a condition.

Motivation for the change:

The CSV status condition type doesn't match component status conditions, resulting in a bad projection:

- lastTransitionTime: "2020-04-30T07:05:13Z"
  lastUpdateTime: "2020-04-30T07:05:13Z"
  message: all requirements found, attempting install
  reason: AllRequirementsMet
  status: ""
  type: ""

Additionally, CSV conditions are effectively a log of past phases rather than a summary of the current status - mapping 1:1 produces noisy Operator resources.

- replace jsonpath with jq package for copying component conditions
- map top-level CSV status to a single component condition
@openshift-ci-robot openshift-ci-robot added the bugzilla/severity-low Referenced Bugzilla bug's severity is low for the branch this PR is targeting. label Aug 20, 2020
@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 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

@openshift-ci-robot
Copy link
Collaborator

@njhale: This pull request references Bugzilla bug 1829735, which is invalid:

  • expected the bug to target the "4.6.0" release, but it targets "4.7.0" instead

Comment /bugzilla refresh to re-evaluate validity if changes to the Bugzilla bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

Bug 1829735: fix(operator): map top-level csv phase to component conditions

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 bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Aug 20, 2020
@njhale
Copy link
Member Author

njhale commented Aug 20, 2020

/bugzilla refresh

@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 Aug 20, 2020
@openshift-ci-robot
Copy link
Collaborator

@njhale: This pull request references Bugzilla bug 1829735, which is valid. The bug has been moved to the POST state. 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.6.0) matches configured target release for branch (4.6.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

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.

@openshift-ci-robot openshift-ci-robot removed the bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. label Aug 20, 2020
@njhale
Copy link
Member Author

njhale commented Aug 20, 2020

/retest

1 similar comment
@njhale
Copy link
Member Author

njhale commented Aug 21, 2020

/retest

@njhale
Copy link
Member Author

njhale commented Aug 21, 2020

/cherry-pick release-4.5

@openshift-cherrypick-robot

@njhale: once the present PR merges, I will cherry-pick it on top of release-4.5 in a new PR and assign it to you.

In response to this:

/cherry-pick release-4.5

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 Aug 24, 2020

/retest

3 similar comments
@njhale
Copy link
Member Author

njhale commented Aug 27, 2020

/retest

@njhale
Copy link
Member Author

njhale commented Sep 8, 2020

/retest

@njhale
Copy link
Member Author

njhale commented Sep 8, 2020

/retest

Copy link
Member

@exdx exdx left a comment

Choose a reason for hiding this comment

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

/lgtm
gojq looks like a very handy library to have in OLM


var out interface{}
for {
v, ok := iter.Next()
Copy link
Member

@exdx exdx Sep 8, 2020

Choose a reason for hiding this comment

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

if the query returns no results, so ok is false here and we break -- is there an issue passing a blank interface{} into the Decode call below? Should we check its length?

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

/retest

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

5 similar comments
@openshift-bot
Copy link
Contributor

/retest

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

@openshift-bot
Copy link
Contributor

/retest

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

@openshift-bot
Copy link
Contributor

/retest

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

@openshift-bot
Copy link
Contributor

/retest

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

@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 Sep 9, 2020

/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 Sep 9, 2020
@njhale
Copy link
Member Author

njhale commented Sep 10, 2020

operator-framework/operator-registry#437 has merged and should rectify the test timeouts.

/retest

@njhale
Copy link
Member Author

njhale commented Sep 10, 2020

/hold cancel
/retest

@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 Sep 10, 2020
@openshift-bot
Copy link
Contributor

/retest

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

3 similar comments
@openshift-bot
Copy link
Contributor

/retest

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

@openshift-bot
Copy link
Contributor

/retest

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

@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 Sep 10, 2020

/retest

@openshift-bot
Copy link
Contributor

/retest

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

11 similar comments
@openshift-bot
Copy link
Contributor

/retest

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

@openshift-bot
Copy link
Contributor

/retest

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

@openshift-bot
Copy link
Contributor

/retest

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

@openshift-bot
Copy link
Contributor

/retest

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

@openshift-bot
Copy link
Contributor

/retest

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

@openshift-bot
Copy link
Contributor

/retest

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

@openshift-bot
Copy link
Contributor

/retest

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

@openshift-bot
Copy link
Contributor

/retest

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

@openshift-bot
Copy link
Contributor

/retest

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

@openshift-bot
Copy link
Contributor

/retest

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

@openshift-bot
Copy link
Contributor

/retest

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

@openshift-merge-robot openshift-merge-robot merged commit c0a2879 into operator-framework:master Sep 12, 2020
@openshift-ci-robot
Copy link
Collaborator

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

Bugzilla bug 1829735 has been moved to the MODIFIED state.

In response to this:

Bug 1829735: fix(operator): map top-level csv phase to component conditions

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-cherrypick-robot

@njhale: #1732 failed to apply on top of branch "release-4.5":

Applying: fix(operator): map top-level csv phase to component conditions
Using index info to reconstruct a base tree...
M	go.mod
M	go.sum
M	pkg/controller/operators/decorators/operator.go
M	pkg/controller/operators/decorators/operator_test.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/controller/operators/decorators/operator_test.go
CONFLICT (content): Merge conflict in pkg/controller/operators/decorators/operator_test.go
Auto-merging pkg/controller/operators/decorators/operator.go
CONFLICT (content): Merge conflict in pkg/controller/operators/decorators/operator.go
Auto-merging go.sum
CONFLICT (content): Merge conflict in go.sum
Auto-merging 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(operator): map top-level csv phase to component conditions
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.5

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 njhale deleted the fix-op-csv-cond branch July 23, 2021 02:45
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-low Referenced Bugzilla bug's severity is low 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.

6 participants