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 helpers for operator-conditions #41

Conversation

varshaprasad96
Copy link
Member

@varshaprasad96 varshaprasad96 commented Nov 19, 2020

Description of the change:
This PR adds helpers for the Operator Conditions custom resource introduced by OLM. With the help of this package users can:

  1. set a specific condition in the CRD.
  2. find or delete a specific condition in the CRD.
  3. check the status of the specific condition in the CRD.

Motivation for the change:
Provide support for working with Operator Conditions CRD.

@openshift-ci-robot
Copy link

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci-robot openshift-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 19, 2020
@coveralls
Copy link

coveralls commented Nov 19, 2020

Pull Request Test Coverage Report for Build 373315720

  • 58 of 62 (93.55%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+2.9%) to 77.108%

Changes Missing Coverage Covered Lines Changed/Added Lines %
conditions/operator_conditions.go 58 62 93.55%
Totals Coverage Status
Change from base Build 373084173: 2.9%
Covered Lines: 320
Relevant Lines: 415

💛 - Coveralls

@varshaprasad96 varshaprasad96 force-pushed the add/conditions-helpers branch 2 times, most recently from c947b33 to 44a126a Compare November 19, 2020 23:20
@varshaprasad96 varshaprasad96 removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 19, 2020
@varshaprasad96 varshaprasad96 changed the title Add helpers for operator conditions Add helpers for operator-conditions Nov 19, 2020
@openshift-ci-robot openshift-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 19, 2020
@varshaprasad96 varshaprasad96 removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 19, 2020
@varshaprasad96 varshaprasad96 marked this pull request as ready for review November 19, 2020 23:31
Copy link
Member

@jmrodri jmrodri left a comment

Choose a reason for hiding this comment

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

/lgtm
Really great stuff, thorough testing, easy to read methods. Love it.

conditions/operator_conditions_test.go Show resolved Hide resolved
conditions/operator_conditions_test.go Show resolved Hide resolved
@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Nov 20, 2020
@jmrodri
Copy link
Member

jmrodri commented Nov 20, 2020

/lgtm
/approve

@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jmrodri

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 openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 20, 2020
@openshift-merge-robot openshift-merge-robot merged commit 973850e into operator-framework:main Nov 20, 2020
ErrNoOperatorCondition = fmt.Errorf("operator Condition CRD is nil")
)

// TODO: verify from OLM if this will be the name of the environment variable
Copy link
Member

Choose a reason for hiding this comment

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

@awgreene can you confirm? Afaik this is the name discussed in the EP

Copy link
Member

Choose a reason for hiding this comment

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

This name is fine, if you prefer something else just let me know.

@varshaprasad96
Copy link
Member Author

@estroz @jmrodri : addressed review comments in #42 . Please have a look.

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.

None yet

7 participants