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

fix ClusterObjectStoreState Alert empty spec #1174

Merged
merged 1 commit into from May 17, 2021

Conversation

anmolsachan
Copy link
Contributor

@anmolsachan anmolsachan commented May 2, 2021

This commit fixes ClusterObjectStoreState alert spec being empty due to
which the rule was not being listed in the Prometheus Rules and alert
was not working. The reason alert spec is empty is because the function
getPrometheusRuleSpecFrom is returning empty object as the rule file
decoding is creating an object that matches the type struct
monitoringv1.PrometheusRule{} which does not match with the type of the
variable ruleSpec which is monitoringv1.PrometheusRuleS

Signed-off-by: Anmol Sachan anmol13694@gmail.com

Fix: https://bugzilla.redhat.com/show_bug.cgi?id=1948378

@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign egafford after the PR has been reviewed.
You can assign the PR to them by writing /assign @egafford in a comment when ready.

The full list of commands accepted by this bot can be found 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

@jarrpa
Copy link
Member

jarrpa commented May 3, 2021

/retest

@jarrpa
Copy link
Member

jarrpa commented May 3, 2021

Having no understanding of the problem you're trying to solve, I don't see the connection between the commit title and the actual changes. Can you provide a bit more description in the commit message about why/how your change addresses the problem?

@anmolsachan anmolsachan changed the title fix ClusterObjectStoreState alert not listing in Prometheus Rules fix ClusterObjectStoreState empty spec May 4, 2021
@anmolsachan
Copy link
Contributor Author

Having no understanding of the problem you're trying to solve, I don't see the connection between the commit title and the actual changes. Can you provide a bit more description in the commit message about why/how your change addresses the problem?

@jarrpa Thank you for the review. I have updated the commit and description.

@anmolsachan anmolsachan changed the title fix ClusterObjectStoreState empty spec fix ClusterObjectStoreState Alert empty spec May 4, 2021
@anmolsachan
Copy link
Contributor Author

@umangachapagain Please review.

@jarrpa
Copy link
Member

jarrpa commented May 6, 2021

You're still not really explaining how your code solves the problem. As far as I can tell, you are still returning the same thing you were returning before, I don't see why it would be any different.

This commit fixes ClusterObjectStoreState alert spec being empty due to
which the rule was not being listed in the Prometheus Rules and alert
was not working. The reason alert spec is empty is because the function
getPrometheusRuleSpecFrom is returning empty object as the rule file
decoding is creating an object that matches the type struct
monitoringv1.PrometheusRule{} which does not match with the type of the
variable ruleSpec which is monitoringv1.PrometheusRuleSpec{}.

Signed-off-by: Anmol Sachan <anmol13694@gmail.com>
@anmolsachan
Copy link
Contributor Author

/test ocs-operator-ci

Copy link
Member

@jarrpa jarrpa left a comment

Choose a reason for hiding this comment

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

/lgtm

@jarrpa
Copy link
Member

jarrpa commented May 17, 2021

/test ocs-operator-ci

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

openshift-ci bot commented May 17, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jarrpa

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 May 17, 2021
@openshift-merge-robot openshift-merge-robot merged commit 7c41d25 into red-hat-storage:master May 17, 2021
@agarwal-mudit
Copy link
Member

/cherry-pick release-4.8

@openshift-cherrypick-robot

@agarwal-mudit: new pull request created: #1196

In response to this:

/cherry-pick release-4.8

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.

@agarwal-mudit
Copy link
Member

/cherry-pick release-4.7

@openshift-cherrypick-robot

@agarwal-mudit: new pull request created: #1233

In response to this:

/cherry-pick release-4.7

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. 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

6 participants