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

OCPBUGS-8044: Garbage collect grafana-dashboard-etcd #1016

Conversation

Elbehery
Copy link
Contributor

@Elbehery Elbehery commented Mar 2, 2023

@openshift-ci-robot openshift-ci-robot added jira/severity-low Referenced Jira bug's severity is low for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/valid-bug Indicates that a referenced Jira bug is valid 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. labels Mar 2, 2023
@openshift-ci-robot
Copy link

@Elbehery: This pull request references Jira Issue OCPBUGS-8044, which is valid. The bug has been moved to the POST state.

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

Requesting review from QA contact:
/cc @geliu2016

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

resolves https://issues.redhat.com/browse/OCPBUGS-8044

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.

@Elbehery
Copy link
Contributor Author

Elbehery commented Mar 2, 2023

/assign @wking
/assign @tjungblu
/assign @dusk125

@openshift-ci openshift-ci bot requested a review from geliu2016 March 2, 2023 12:34
@openshift-ci openshift-ci bot requested review from hasbro17 and tjungblu March 2, 2023 12:35
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 2, 2023
release.openshift.io/delete: "true"
labels:
console.openshift.io/dashboard: "true"
name: remove-etcd-dashboard
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not entirely sure what that does, @Elbehery. This will create a new configmap with the name "remove-etcd-dashboard" that will then be removed by the CVO.

I think we need to patch the existing configmap grafana-dashboard-etcd with the annotation release.openshift.io/delete: "true".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks @tjungblu for your prompt review

So iiuc from my chat with @wking , if we add the annotation to the existing CM, all etcd-dashboards will be removed

Currently we have two dashboard for etcd. I think adding a new CM with the annotation will remove one of them, please correct me if i a wrong

Copy link
Contributor

Choose a reason for hiding this comment

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

if we add the annotation to the existing CM, all etcd-dashboards will be removed

yes, that's my point. You need to add the annotation on the existing CM that you want to remove. What you committed here creates an entirely new configmap that will be deleted and recreated again - all the time.

@@ -0,0 +1,11 @@
apiVersion: v1
Copy link
Contributor

@tjungblu tjungblu Mar 2, 2023

Choose a reason for hiding this comment

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

also another nitpick, why not put it next to the existing dashboard in jsonnet?
https://github.com/openshift/cluster-etcd-operator/blob/master/jsonnet/dashboard.jsonnet

Copy link
Contributor Author

Choose a reason for hiding this comment

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

+1, this is the best option .. i will change it now 👍🏽

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done 👍🏽

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks. Strange that the verify job doesn't complain, doesn't this need to go into the binary with make update?

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 ran make update, make verify !!

let me reassure 👍🏽

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ran them again, nothing changed :/

Copy link
Contributor

Choose a reason for hiding this comment

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

ah it was hack/generate.sh. Can you try that?
Also while reading the docs https://github.com/openshift/cluster-etcd-operator/blob/master/docs/HACKING.md#cvo-resource-removal ...

could you kindly document this annotation approach in the cvo-resource-removal section?

@Elbehery Elbehery force-pushed the garbage-collect-grafana-dashboard branch from 0eb536f to f1cede6 Compare March 2, 2023 13:10
'release.openshift.io/delete': "true",
},
labels: {
'console.openshift.io/dashboard': 'true',
Copy link
Member

Choose a reason for hiding this comment

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

There's no need to set labels on a deletion manifest, because the CVO will delete the resource if it exists, labels isn't part of matching a manifest to a resource (just the group, kind, namespace, and name), and deleted resources don't retain any labels.

labels: {
'console.openshift.io/dashboard': 'true',
},
name: 'remove-etcd-dashboard',
Copy link
Member

Choose a reason for hiding this comment

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

This should be grafana-dashboard-etcd (the name of the resource you want to delete)

@Elbehery Elbehery force-pushed the garbage-collect-grafana-dashboard branch from b2e02d7 to 8c257b1 Compare March 2, 2023 15:26
@Elbehery
Copy link
Contributor Author

Elbehery commented Mar 2, 2023

/label tide/merge-method-squash

@openshift-ci openshift-ci bot added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label Mar 2, 2023
@Elbehery
Copy link
Contributor Author

Elbehery commented Mar 2, 2023

@simonpasquier Hello ✋🏽

Would you mind having a look here plz ? ..

I used a list to have two CM in the dashboard manifest, i validated it on https://jsonnet.org/learning/tools.html

yet it fails the CI 🤔

Copy link

@simonpasquier simonpasquier left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Mar 2, 2023
@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD b40e0f9 and 2 for PR HEAD 8c257b1 in total

@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Mar 3, 2023
@tjungblu
Copy link
Contributor

tjungblu commented Mar 3, 2023

/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 3, 2023
@tjungblu
Copy link
Contributor

tjungblu commented Mar 3, 2023

@wking one final review please?

@Elbehery
Copy link
Contributor Author

Elbehery commented Mar 3, 2023

/cherry-pick release-4.12

@openshift-cherrypick-robot

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

In response to this:

/cherry-pick release-4.12

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.

@Elbehery
Copy link
Contributor Author

Elbehery commented Mar 3, 2023

/cherry-pick release-4.11

@openshift-cherrypick-robot

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

In response to this:

/cherry-pick release-4.11

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.

@Elbehery
Copy link
Contributor Author

Elbehery commented Mar 3, 2023

/retest-required

1 similar comment
@Elbehery
Copy link
Contributor Author

Elbehery commented Mar 3, 2023

/retest-required

@tjungblu
Copy link
Contributor

tjungblu commented Mar 6, 2023

/lgtm

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

openshift-ci bot commented Mar 6, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Elbehery, simonpasquier, tjungblu, wking

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

/retest-required

Remaining retests: 0 against base HEAD 7bb6221 and 2 for PR HEAD 581fff1 in total

@tjungblu
Copy link
Contributor

tjungblu commented Mar 6, 2023

/retest-required

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 6, 2023

@Elbehery: all tests passed!

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

@openshift-merge-robot openshift-merge-robot merged commit 01a88bf into openshift:master Mar 6, 2023
@openshift-ci-robot
Copy link

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

Jira Issue OCPBUGS-8044 has been moved to the MODIFIED state.

In response to this:

resolves https://issues.redhat.com/browse/OCPBUGS-8044

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

@Elbehery: new pull request created: #1019

In response to this:

/cherry-pick release-4.12

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

@Elbehery: #1016 failed to apply on top of branch "release-4.11":

Applying: OCPBUGS-8044: Garbage collect grafana-dashboard-etcd
Applying: add jsonnet
Using index info to reconstruct a base tree...
M	go.mod
M	go.sum
Falling back to patching base and 3-way merge...
Auto-merging go.sum
CONFLICT (content): Merge conflict in go.sum
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 0002 add jsonnet
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.11

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.

@Elbehery
Copy link
Contributor Author

/cherry-pick release-4.13

@openshift-cherrypick-robot

@Elbehery: new pull request created: #1023

In response to this:

/cherry-pick release-4.13

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.

@Elbehery Elbehery deleted the garbage-collect-grafana-dashboard branch February 14, 2024 17:39
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/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. jira/severity-low Referenced Jira bug's severity is low for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants