Skip to content

fix: reset restmapper instead on invalidating discoveryclient#26

Merged
matteogastaldello merged 1 commit intomainfrom
25-fix-cache-invalidation-mechanism
Nov 27, 2025
Merged

fix: reset restmapper instead on invalidating discoveryclient#26
matteogastaldello merged 1 commit intomainfrom
25-fix-cache-invalidation-mechanism

Conversation

@matteogastaldello
Copy link
Contributor

  • Updated HandlerOptions to use a pointer for Clientset.
  • Modified ServeHTTP method to pass Clientset as a pointer to NewCachedClientFromRestConf.
  • Adjusted test cases to create Clientset as a pointer.
  • Enhanced CachedClients struct to include a mapper.
  • Changed StartCRDInformer and related functions to accept pointer types for CachedClients.
  • Updated fakeInvalidator to use Reset instead of Invalidate for better clarity.
  • Ensured main function passes Clientset as a pointer when starting the CRD informer.

- Updated HandlerOptions to use a pointer for Clientset.
- Modified ServeHTTP method to pass Clientset as a pointer to NewCachedClientFromRestConf.
- Adjusted test cases to create Clientset as a pointer.
- Enhanced CachedClients struct to include a mapper.
- Changed StartCRDInformer and related functions to accept pointer types for CachedClients.
- Updated fakeInvalidator to use Reset instead of Invalidate for better clarity.
- Ensured main function passes Clientset as a pointer when starting the CRD informer.
@matteogastaldello matteogastaldello linked an issue Nov 25, 2025 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Nov 25, 2025

Codecov Report

❌ Patch coverage is 33.33333% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
main.go 0.00% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@matteogastaldello matteogastaldello merged commit 6dad4d2 into main Nov 27, 2025
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix cache invalidation mechanism

1 participant