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

feat: generate fallback cache snapshot excluding affected objects #6047

Merged
merged 1 commit into from
May 17, 2024

Conversation

czeslavo
Copy link
Contributor

@czeslavo czeslavo commented May 16, 2024

What this PR does / why we need it:

  • Implements a fallback cache Generator with the GenerateExcludingAffected method. It depends on a CacheGraphProvider implemented by DefaultCacheGraphProvider (formerly NewConfigGraphFromCacheStores function). It's tested in isolation in the TestGenerator_ GenerateExcludingAffected test.
  • Implements ConfigGraph.SubgraphObjects capable of finding all objects depending on a broken source object and tests that in TestConfigGraph_SubgraphObjects
  • Moves NewConfigGraphFromCacheStores to cache_to_graph.go and refactors it into a struct implementing CacheGraphProvider interface (also moves its tests to cache_to_graph_test.go with no modifications).

Which issue this PR fixes:

Closes #5930.

Special notes for your reviewer:

PR Readiness Checklist:

Complete these before marking the PR as ready to review:

  • the CHANGELOG.md release notes have been updated to reflect any significant (and particularly user-facing) changes introduced by this PR

Copy link

codecov bot commented May 16, 2024

Codecov Report

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

❗ No coverage uploaded for pull request base (main@d60e105). Click here to learn what that means.

❗ Current head 38084a7 differs from pull request most recent head 15c10b6. Consider uploading reports for the commit 15c10b6 to get more accurate results

Files Patch % Lines
internal/dataplane/fallback/cache_to_graph.go 50.0% 5 Missing and 5 partials ⚠️
internal/dataplane/fallback/fallback.go 55.5% 4 Missing and 4 partials ⚠️
internal/dataplane/fallback/graph.go 77.7% 3 Missing and 1 partial ⚠️
Additional details and impacted files
@@          Coverage Diff           @@
##             main   #6047   +/-   ##
======================================
  Coverage        ?   54.3%           
======================================
  Files           ?     193           
  Lines           ?   18717           
  Branches        ?       0           
======================================
  Hits            ?   10179           
  Misses          ?    7850           
  Partials        ?     688           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@czeslavo czeslavo force-pushed the feat/generate-fallback-config branch from 6d17770 to 8efcc35 Compare May 16, 2024 16:48
@czeslavo czeslavo self-assigned this May 16, 2024
@czeslavo czeslavo force-pushed the feat/generate-fallback-config branch from 8efcc35 to 38084a7 Compare May 16, 2024 16:56
@czeslavo czeslavo added the area/feature New feature or request label May 16, 2024
@czeslavo czeslavo added this to the KIC v3.2.x milestone May 16, 2024
@czeslavo czeslavo force-pushed the feat/generate-fallback-config branch from 38084a7 to 15c10b6 Compare May 16, 2024 17:02
@czeslavo czeslavo marked this pull request as ready for review May 16, 2024 17:02
@czeslavo czeslavo requested a review from a team as a code owner May 16, 2024 17:02
@czeslavo czeslavo force-pushed the feat/generate-fallback-config branch from 15c10b6 to c117f75 Compare May 17, 2024 09:12
@rainest rainest merged commit 26c26ed into main May 17, 2024
36 checks passed
@rainest rainest deleted the feat/generate-fallback-config branch May 17, 2024 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/feature New feature or request size/XXL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement building a fallback Kubernetes store snapshot
2 participants