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

Add metrics linter #2291

Merged
merged 1 commit into from
Jun 20, 2023
Merged

Add metrics linter #2291

merged 1 commit into from
Jun 20, 2023

Conversation

avlitman
Copy link
Collaborator

@avlitman avlitman commented Mar 16, 2023

This linter will lint the metrics created in "github.com/kubevirt/hyperconverged-cluster-operator/pkg/metrics". In order to run the linter:
make lint-metrics

What this PR does / why we need it:
jira-ticket: https://issues.redhat.com/browse/CNV-28665

Reviewer notes:
Linter output:

kubevirt_hco_out_of_band_modifications_count: counter metrics should have "_total" or "_timestamp_seconds" suffix
kubevirt_hco_out_of_band_modifications_count: non-histogram and non-summary metrics should not have "_count" suffix
kubevirt_hco_unsafe_modification_count: non-histogram and non-summary metrics should not have "_count" suffix
kubevirt_hyperconverged_operator_health_status: name need to start with "kubevirt_hco_"
make: *** [Makefile:227: lint-metrics] Error 1

note that we ignore all current errors until the metrics names will be fixed in:#2358

Release note:

Add a metrics name linter. In order to monitor metrics naming and make sure they aligned with the Prometheus metrics naming best practices. 

Falied sanity for review purposes: https://github.com/kubevirt/hyperconverged-cluster-operator/actions/runs/5209824760/jobs/9400149372?pr=2291

@kubevirt-bot kubevirt-bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Mar 16, 2023
@kubevirt-bot kubevirt-bot added size/L release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Mar 16, 2023
@hco-bot

This comment was marked as outdated.

@kubevirt-bot

This comment was marked as outdated.

@hco-bot

This comment was marked as outdated.

@kubevirt-bot

This comment was marked as outdated.

@avlitman avlitman marked this pull request as draft March 16, 2023 11:36
@avlitman avlitman force-pushed the metrics-linter branch 8 times, most recently from 84121a5 to c049535 Compare March 19, 2023 14:24
@avlitman avlitman force-pushed the metrics-linter branch 5 times, most recently from e8e9b06 to 750eaf3 Compare March 19, 2023 19:35
@coveralls
Copy link
Collaborator

coveralls commented Mar 19, 2023

Pull Request Test Coverage Report for Build 5320363903

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.02%) to 85.979%

Totals Coverage Status
Change from base Build 5315966687: 0.02%
Covered Lines: 4924
Relevant Lines: 5727

💛 - Coveralls

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Jun 12, 2023
@avlitman
Copy link
Collaborator Author

/retest

@kubevirt-bot kubevirt-bot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed lgtm Indicates that a PR is ready to be merged. labels Jun 20, 2023
@kubevirt-bot kubevirt-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 20, 2023
In order to run the linter:
make lint-metrics

Signed-off-by: Aviv Litman <alitman@redhat.com>
Signed-off-by: alitman <alitman@redhat.com>
@sonarcloud
Copy link

sonarcloud bot commented Jun 20, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Collaborator

@nunnatsa nunnatsa left a comment

Choose a reason for hiding this comment

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

/approve

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Jun 20, 2023
@kubevirt-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: nunnatsa

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 Jun 20, 2023
@avlitman
Copy link
Collaborator Author

/retest

1 similar comment
@avlitman
Copy link
Collaborator Author

/retest

@avlitman
Copy link
Collaborator Author

/hold cancel

@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 Jun 20, 2023
@hco-bot
Copy link
Collaborator

hco-bot commented Jun 20, 2023

okd-hco-e2e-operator-sdk-gcp lane succeeded.
/override ci/prow/okd-hco-e2e-operator-sdk-aws
hco-e2e-operator-sdk-gcp, hco-e2e-operator-sdk-aws lanes succeeded.
/override ci/prow/hco-e2e-operator-sdk-azure

@kubevirt-bot
Copy link
Contributor

@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-operator-sdk-azure, ci/prow/okd-hco-e2e-operator-sdk-aws

In response to this:

okd-hco-e2e-operator-sdk-gcp lane succeeded.
/override ci/prow/okd-hco-e2e-operator-sdk-aws
hco-e2e-operator-sdk-gcp, hco-e2e-operator-sdk-aws lanes succeeded.
/override ci/prow/hco-e2e-operator-sdk-azure

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.

@hco-bot
Copy link
Collaborator

hco-bot commented Jun 20, 2023

okd-hco-e2e-operator-sdk-gcp lane succeeded.
/override ci/prow/okd-hco-e2e-operator-sdk-aws

@kubevirt-bot
Copy link
Contributor

@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/okd-hco-e2e-operator-sdk-aws

In response to this:

okd-hco-e2e-operator-sdk-gcp lane succeeded.
/override ci/prow/okd-hco-e2e-operator-sdk-aws

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-ci
Copy link

openshift-ci bot commented Jun 20, 2023

@avlitman: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/hco-e2e-image-index-sno-aws 914905d65692b496e92d5b89baf77bb04e41eb6f link false /test hco-e2e-image-index-sno-aws
ci/prow/hco-e2e-image-index-sno-azure 914905d65692b496e92d5b89baf77bb04e41eb6f link false /test hco-e2e-image-index-sno-azure
ci/prow/okd-hco-e2e-image-index-gcp 914905d65692b496e92d5b89baf77bb04e41eb6f link true /test okd-hco-e2e-image-index-gcp
ci/prow/hco-e2e-operator-sdk-azure 8a52e9e link true /test hco-e2e-operator-sdk-azure
ci/prow/okd-hco-e2e-operator-sdk-aws 8a52e9e link true /test okd-hco-e2e-operator-sdk-aws
ci/prow/hco-e2e-kv-smoke-azure 8a52e9e link true /test hco-e2e-kv-smoke-azure

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.

@hco-bot
Copy link
Collaborator

hco-bot commented Jun 20, 2023

hco-e2e-kv-smoke-gcp lane succeeded.
/override ci/prow/hco-e2e-kv-smoke-azure

@kubevirt-bot
Copy link
Contributor

@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-kv-smoke-azure

In response to this:

hco-e2e-kv-smoke-gcp lane succeeded.
/override ci/prow/hco-e2e-kv-smoke-azure

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.

@kubevirt-bot kubevirt-bot merged commit 3646947 into kubevirt:main Jun 20, 2023
35 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 Denotes a PR that will be considered when it comes time to generate release notes. size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants