kubebb / core

A declarative component lifecycle management platform
https://kubebb.github.io/website
Apache License 2.0
8 stars 9 forks source link

refactor: check portal conflicts in entry and path seperately #277

Closed bjwswang closed 1 year ago

bjwswang commented 1 year ago

What type of PR is this?

/kind refactor

What this PR does / why we need it

Which issue(s) this PR fixes

Fix #274
Fix #273

Special notes for your reviewer

  1. We need to make the conflicts clear both in Entry and Path, so I splitted the Conflicts to two seperate fields in status and update these two fields seperately.
  2. I defined another EnqueueRequestsFromMapFunc to make all relevant conflicted Portals do the reconcile in their own scope.

With these two changes, we can get the latest conflict status in all relevant portals just like the example-test did.

codecov[bot] commented 1 year ago

Codecov Report

Merging #277 (f444c63) into main (6fdd525) will increase coverage by 0.03%. The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main     #277      +/-   ##
==========================================
+ Coverage   16.92%   16.95%   +0.03%     
==========================================
  Files          34       34              
  Lines        3367     3361       -6     
==========================================
  Hits          570      570              
+ Misses       2764     2758       -6     
  Partials       33       33              
Files Changed Coverage Δ
api/v1alpha1/portal_types.go 100.00% <ø> (ø)
api/v1alpha1/zz_generated.deepcopy.go 0.00% <0.00%> (ø)
controllers/portal_controller.go 0.00% <0.00%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more