Skip to content

Conversation

@ncaak
Copy link
Contributor

@ncaak ncaak commented Apr 4, 2024

summary

Basically, the original object's namespace ID is now included as part of the cache key. This ensures that when the code finishes and starts deleting non-existent objects, it successfully recognises the past objects and then removes the metrics associated with them.

Previously, the namespace ID for these objects was captured by the currently recreated namespace. This way there was no way for the code to remove metrics created with the previous namespace ID, even if it recognised the objects as removable.

fixes

  • Changed some function signatures to make the current namespace ID handle cache keys correctly.
  • Changed existing unit tests using these functions to work properly with the new signature
  • Minor fixes due to linting

in-progress

  • Addition of new unit test for this specific case (recreated namespaces)

@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented Apr 4, 2024

@ncaak: This pull request references DVO-185 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.16.0" version, but no target version was set.

In response to this:

This is a draft

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci
Copy link

openshift-ci bot commented Apr 4, 2024

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci openshift-ci bot added the approved label Apr 4, 2024
@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented Apr 4, 2024

@ncaak: This pull request references DVO-185 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.16.0" version, but no target version was set.

In response to this:

Summary

Basically, the original object's namespace ID is now included as part of the cache key. This ensures that when the code finishes and starts deleting non-existent objects, it successfully recognises the past objects and then removes the metrics associated with them.

Previously, the namespace ID for these objects was captured by the currently recreated namespace. This way there was no way for the code to remove metrics created with the previous namespace ID, even if it recognised the objects as removable.

Fixes

  • Changed some function signatures to make the current namespace ID handle cache keys correctly.
  • Changed existing unit tests using these functions to work properly with the new signature
  • Minor fixes due to linting

in-progress

  • Addition of new unit test for this specific case (recreated namespaces)

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented Apr 4, 2024

@ncaak: This pull request references DVO-185 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.16.0" version, but no target version was set.

In response to this:

summary

Basically, the original object's namespace ID is now included as part of the cache key. This ensures that when the code finishes and starts deleting non-existent objects, it successfully recognises the past objects and then removes the metrics associated with them.

Previously, the namespace ID for these objects was captured by the currently recreated namespace. This way there was no way for the code to remove metrics created with the previous namespace ID, even if it recognised the objects as removable.

fixes

  • Changed some function signatures to make the current namespace ID handle cache keys correctly.
  • Changed existing unit tests using these functions to work properly with the new signature
  • Minor fixes due to linting

in-progress

  • Addition of new unit test for this specific case (recreated namespaces)

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 openshift-eng/jira-lifecycle-plugin repository.

@ncaak
Copy link
Contributor Author

ncaak commented Apr 5, 2024

/test lint

@ncaak ncaak force-pushed the DVO-185/false-metrics-dupl-namespace branch from 0ad95e7 to 4d88ff3 Compare April 8, 2024 17:39
@ncaak
Copy link
Contributor Author

ncaak commented Apr 8, 2024

/test lint

1 similar comment
@ncaak
Copy link
Contributor Author

ncaak commented Apr 8, 2024

/test lint

@ncaak ncaak marked this pull request as ready for review April 8, 2024 18:36
@openshift-ci openshift-ci bot requested review from JoaoFula and rluders April 8, 2024 18:36
@codecov-commenter
Copy link

codecov-commenter commented Apr 8, 2024

Codecov Report

Attention: Patch coverage is 95.00000% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 55.24%. Comparing base (e3351d0) to head (4d88ff3).
Report is 2 commits behind head on master.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #318   +/-   ##
=======================================
  Coverage   55.24%   55.24%           
=======================================
  Files          15       15           
  Lines         905      905           
=======================================
  Hits          500      500           
  Misses        375      375           
  Partials       30       30           
Files Coverage Δ
pkg/controller/validationscache.go 100.00% <100.00%> (ø)
pkg/controller/generic_reconciler.go 60.67% <87.50%> (-0.19%) ⬇️

@ncaak
Copy link
Contributor Author

ncaak commented Apr 8, 2024

/retest

@ncaak
Copy link
Contributor Author

ncaak commented Apr 9, 2024

/test ci/prow/deployment-validation-operator-e2e-tests

@openshift-ci
Copy link

openshift-ci bot commented Apr 9, 2024

@ncaak: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test ci-index-dvo-operator-bundle
  • /test coverage
  • /test deployment-validation-operator-e2e-tests
  • /test images
  • /test lint
  • /test test
  • /test validate

Use /test all to run all jobs.

In response to this:

/test ci/prow/deployment-validation-operator-e2e-tests

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.

@ncaak
Copy link
Contributor Author

ncaak commented Apr 9, 2024

/test deployment-validation-operator-e2e-tests

@ncaak
Copy link
Contributor Author

ncaak commented Apr 16, 2024

/retest

Copy link
Contributor

@rluders rluders 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
Copy link

openshift-ci bot commented Apr 19, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ncaak, rluders

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

@ncaak
Copy link
Contributor Author

ncaak commented Apr 19, 2024

/retest

@openshift-merge-bot openshift-merge-bot bot merged commit 51ecc11 into app-sre:master Apr 19, 2024
@ncaak ncaak deleted the DVO-185/false-metrics-dupl-namespace branch February 7, 2025 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants