stolostron / multicluster-global-hub

the main repository for the multicluster global hub
Apache License 2.0
21 stars 32 forks source link

fix policy number is not right #1148

Closed ldpliu closed 2 months ago

ldpliu commented 2 months ago

Summary

In code logic, if the policy and hub info in synced to db, but do not synced heart beat. then we detached the hub cluster. The related policy and hubinfo will not be removed forever. So in this pr, we send the event immediately instead of waiting interval.

Will enhance this in future: https://issues.redhat.com/browse/ACM-14560

Related issue(s)

https://issues.redhat.com/browse/ACM-14401 Fixes #

Tests

ldpliu commented 2 months ago

/cc @clyang82 @yanmxa

sonarcloud[bot] commented 2 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
100.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

yanmxa commented 2 months ago

💯 Good Catch!

yanmxa commented 2 months ago

/lgtm

openshift-ci[bot] commented 2 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ldpliu, yanmxa

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: - ~~[agent/OWNERS](https://github.com/stolostron/multicluster-global-hub/blob/main/agent/OWNERS)~~ [yanmxa] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
ldpliu commented 2 months ago

/cherry-pick release-2.12

openshift-cherrypick-robot commented 2 months ago

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

In response to [this](https://github.com/stolostron/multicluster-global-hub/pull/1148#issuecomment-2381289006): >/cherry-pick release-2.12 Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
openshift-cherrypick-robot commented 2 months ago

@ldpliu: new pull request created: #1149

In response to [this](https://github.com/stolostron/multicluster-global-hub/pull/1148#issuecomment-2381289006): >/cherry-pick release-2.12 Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.