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

Cluster version condition #524

Conversation

Serhii1011010
Copy link
Contributor

@Serhii1011010 Serhii1011010 commented Oct 20, 2021

Categories

  • Bugfix
  • Enhancement
  • Backporting
  • Others (CI, Infrastructure, Documentation)

Sample Archive

No changes

Documentation

No changes

Unit Tests

  • pkg/gatherers/conditional/conditional_gatherer_test.go

Privacy

No new data was collected

Changelog

No

Breaking Changes

Yes

References

https://issues.redhat.com/browse/CCXDEV-5773
https://bugzilla.redhat.com/show_bug.cgi?id=???
https://access.redhat.com/solutions/???

@openshift-ci openshift-ci bot requested a review from derekwaynecarr October 20, 2021 17:07
@openshift-ci
Copy link

openshift-ci bot commented Oct 20, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Sergey1011010

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 requested a review from iNecas October 20, 2021 17:07
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 20, 2021
@xJustin
Copy link
Contributor

xJustin commented Nov 1, 2021

/label docs-approved

@openshift-ci openshift-ci bot added the docs-approved Signifies that Docs has signed off on this PR label Nov 1, 2021
@sferich888
Copy link

/label px-approved

@openshift-ci openshift-ci bot added the px-approved Signifies that Product Support has signed off on this PR label Nov 1, 2021
@Serhii1011010
Copy link
Contributor Author

/retest

@Serhii1011010 Serhii1011010 force-pushed the cluster-version-condition branch from 85067aa to 8cc560a Compare November 12, 2021 15:40
@Serhii1011010
Copy link
Contributor Author

/retest

@tremes
Copy link
Contributor

tremes commented Nov 23, 2021

@Sergey1011010 Please update the PR template. This is not an enhancement.

return err
}

return g.updateVersionCache(ctx, configClient)
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess this logic here basically means that if the updateAlertsCache fails (we couldn't connect to the metrics for some reason) then the updateVersionCache is not executed. Is that right? Does it mean that the conditions for cluster version will not be evaluated when we can't connect to the metrics?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I guess this logic here basically means that if the updateAlertsCache fails (we couldn't connect to the metrics for some reason) then the updateVersionCache is not executed. Is that right?

Yes, but there's no point to update version cache if we don't have valid alerts cache since current rules contain alerts anyway.

Does it mean that the conditions for cluster version will not be evaluated when we can't connect to the metrics?

Yup, conditional gatherer won't do it's job if it can't initialize any of the caches. We'd get the error in the metadata tho.

Copy link
Contributor

@tremes tremes Nov 29, 2021

Choose a reason for hiding this comment

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

Yes, but there's no point to update version cache if we don't have valid alerts cache since current rules contain alerts anyway.

I am not sure I follow. We don't have any conditional rules with version yet. I think it's difficult to predict if they will have any alerts as well. If they will then it probably makes sense, but if they will not then it seems as unnecessary limitation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated changing the logic little bit so we would get more info in the archive

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks

@JoaoFula
Copy link
Contributor

/retest

@JoaoFula
Copy link
Contributor

/label qe-approved

@openshift-ci openshift-ci bot added the qe-approved Signifies that QE has signed off on this PR label Nov 24, 2021
@openshift-ci openshift-ci bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 2, 2021
@Serhii1011010 Serhii1011010 force-pushed the cluster-version-condition branch from 07dc7c2 to 8297b39 Compare December 2, 2021 17:48
@openshift-ci openshift-ci bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 2, 2021
type GatheringRuleMetadata struct {
Rule GatheringRule `json:"rule"`
Errors []error `json:"errors"`
WasTriggered bool `json:"was_triggered"`
Copy link
Contributor

Choose a reason for hiding this comment

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

Great. I like this idea!

@tremes
Copy link
Contributor

tremes commented Dec 3, 2021

@Sergey1011010 Please fix the linting and then I will approve. Good job! Thanks!

@Serhii1011010
Copy link
Contributor Author

@tremes done

@tremes
Copy link
Contributor

tremes commented Dec 6, 2021

I reviewed few times and it looks good to me. I like the information in the metadata! Thanks!
/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Dec 6, 2021
@openshift-bot
Copy link
Contributor

/retest-required

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

3 similar comments
@openshift-bot
Copy link
Contributor

/retest-required

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

@openshift-bot
Copy link
Contributor

/retest-required

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

@openshift-bot
Copy link
Contributor

/retest-required

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

@openshift-merge-robot openshift-merge-robot merged commit d5d0030 into openshift:master Dec 6, 2021
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. docs-approved Signifies that Docs has signed off on this PR lgtm Indicates that a PR is ready to be merged. px-approved Signifies that Product Support has signed off on this PR qe-approved Signifies that QE has signed off on this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants