Skip to content

feat: crd status check#9016

Merged
ericzzzzzzz merged 22 commits intoGoogleContainerTools:mainfrom
ericzzzzzzz:crds-status-check
Aug 22, 2023
Merged

feat: crd status check#9016
ericzzzzzzz merged 22 commits intoGoogleContainerTools:mainfrom
ericzzzzzzz:crds-status-check

Conversation

@ericzzzzzzz
Copy link
Copy Markdown
Contributor

@ericzzzzzzz ericzzzzzzz commented Aug 11, 2023

Fixes: #8462
Description

  • users can provide resource selectors through file for their crds status check

Test Plan

  • I don't know any other crd controllers than ConfigConnector that implements kstatus, you can test other crds if you know those
  • checkout this branch , comment out this line
    &WildcardGroupKind{Group: regexp.MustCompile(`([[:alpha:]]+\.)+cnrm\.cloud\.google\.com`)},
    (otherwise, the code will not use customize resource validator) and build skaffold
  • follow this guide to set up Config Connector https://cloud.google.com/config-connector/docs/how-to/getting-started
  • download this tar
    test-crds-status-check.tar.gz and untar it
  • enter the result folder and run skaffold dev --status-check-selectors selectors.json should see status check against the crd, the status check against ConfigConnector will hang until check success, this is expected as config controller returns IN_PROGRESS for both resource reconciling and failing.

@codecov
Copy link
Copy Markdown

codecov bot commented Aug 11, 2023

Codecov Report

Merging #9016 (13cbf8a) into main (290280e) will decrease coverage by 7.02%.
Report is 996 commits behind head on main.
The diff coverage is 49.80%.

@@            Coverage Diff             @@
##             main    #9016      +/-   ##
==========================================
- Coverage   70.48%   63.46%   -7.02%     
==========================================
  Files         515      624     +109     
  Lines       23150    32028    +8878     
==========================================
+ Hits        16317    20328    +4011     
- Misses       5776    10167    +4391     
- Partials     1057     1533     +476     
Files Changed Coverage Δ
cmd/skaffold/app/cmd/completion.go 13.04% <0.00%> (-1.25%) ⬇️
cmd/skaffold/app/cmd/config/list.go 65.21% <ø> (ø)
cmd/skaffold/app/cmd/config/set.go 88.72% <ø> (ø)
cmd/skaffold/app/cmd/config/util.go 54.28% <ø> (ø)
cmd/skaffold/app/cmd/credits.go 100.00% <ø> (ø)
cmd/skaffold/app/cmd/credits/export.go 0.00% <0.00%> (ø)
cmd/skaffold/app/cmd/deploy.go 40.90% <0.00%> (-12.94%) ⬇️
cmd/skaffold/app/cmd/generate_pipeline.go 60.00% <ø> (ø)
cmd/skaffold/app/cmd/inspect_modules.go 65.00% <ø> (ø)
cmd/skaffold/app/cmd/inspect_profiles.go 66.66% <ø> (ø)
... and 40 more

... and 416 files with indirect coverage changes

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

@ericzzzzzzz ericzzzzzzz marked this pull request as ready for review August 11, 2023 17:28
@ericzzzzzzz ericzzzzzzz requested a review from a team as a code owner August 11, 2023 17:28
@renzodavid9
Copy link
Copy Markdown
Contributor

LGTM! I was just wondering if there is a way to have the CRDs logic to manage the ConfigConnector case, I saw we are using different errors codes, but I guess we can discuss it if make sense. Thanks!

@ericzzzzzzz ericzzzzzzz merged commit 97c9c14 into GoogleContainerTools:main Aug 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for user supplied CRDs to be added to our validations.go logic (similar to bespoke ConfigController support currently but make it dynamic)

2 participants