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

Apply monitoring linter #1771

Merged
merged 1 commit into from
Mar 25, 2024
Merged

Conversation

assafad
Copy link
Contributor

@assafad assafad commented Mar 17, 2024

What this PR does / why we need it:
Apply monitoringlinter that was implemented in kubevirt/monitoring#221, and was designed to enforce kubevirt/community#219.
This linter ensures that all monitoring-related practices are implemented within the pkg/monitoring directory using operator-observability methods. It verifies that all metrics, alerts and recording rules registrations are centralized in this directory, and restricts the direct use of Prometheus registration methods.
Example for a message reported by the linter:

kubevirt/pkg/virt-controller/watch/workload-updater/workload-updater.go:67:2: monitoring-linter: metrics should be registered only within pkg/monitoring directory, using operator-observability packages.

Fixes https://issues.redhat.com/browse/CNV-36763
Other PRs references: kubevirt/hyperconverged-cluster-operator#2827, kubevirt/kubevirt#11454, kubevirt/ssp-operator#932

Release note:

None

@kubevirt-bot kubevirt-bot added release-note-none Denotes a PR that doesn't merit a release note. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. labels Mar 17, 2024
@assafad assafad force-pushed the monitoring-linters branch 3 times, most recently from 094830a to ffb36a3 Compare March 20, 2024 14:54
@assafad assafad changed the title Apply monitoring linters Apply monitoring linter Mar 20, 2024
Apply monitoringlinter, which is designed to enforce
kubevirt/community#219 by ensuring that monitoring-related practices are
implemented within the pkg/monitoring directory using
operator-observability methods.

Signed-off-by: assafad <aadmi@redhat.com>
@assafad assafad force-pushed the monitoring-linters branch from ffb36a3 to d869fd1 Compare March 20, 2024 14:59
Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@assafad
Copy link
Contributor Author

assafad commented Mar 20, 2024

/hold

@kubevirt-bot kubevirt-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 20, 2024
@assafad
Copy link
Contributor Author

assafad commented Mar 24, 2024

Hi @RamLavi, @oshoval, Can you PTAL?

@assafad
Copy link
Contributor Author

assafad commented Mar 24, 2024

/unhold

@kubevirt-bot kubevirt-bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 24, 2024
@oshoval
Copy link
Collaborator

oshoval commented Mar 25, 2024

Thanks

/lgtm

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Mar 25, 2024
@oshoval
Copy link
Collaborator

oshoval commented Mar 25, 2024

/approve

@kubevirt-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: oshoval

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

@kubevirt-bot kubevirt-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 25, 2024
@kubevirt-bot kubevirt-bot merged commit 88ba046 into kubevirt:main Mar 25, 2024
14 checks passed
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. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/XS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants