Skip to content
This repository has been archived by the owner on Oct 10, 2023. It is now read-only.

Display correct error message when passing Cluster based resource without ClusterClass as part of cluster create #3053

Merged
merged 1 commit into from
Aug 4, 2022

Conversation

anujc25
Copy link
Contributor

@anujc25 anujc25 commented Aug 2, 2022

What this PR does / why we need it

  • Display correct error message when passing Cluster based resource without ClusterClass as part of cluster create

Currently, when user passes Cluster resource as part of tanzu cluster create --file <input.yaml> and the cluster resource doesn't include ClusterClass as part of .spec.topology.cluster thrown proper error message.

Which issue(s) this PR fixes

Fixes #3054

Describe testing done for PR

  • Added unit tests
  • Manually verified by passing --dru-run output to tanzu cluster create --file <manifest.yaml> and verified the error message

Release note

Display correct error message when passing Cluster resource without ClusterClass as part of cluster create

Additional information

Special notes for your reviewer

@github-actions
Copy link

github-actions bot commented Aug 2, 2022

Cluster Generation A/B Results:
https://storage.googleapis.com/tkg-clustergen/3053/20220802010526/clustergen.diff.txt
Author/reviewers:
Please review to verify that the effects on the generated cluster configurations are exactly what the PR intended, and give a thumbs-up if so.

@codecov
Copy link

codecov bot commented Aug 2, 2022

Codecov Report

Merging #3053 (36da3fe) into main (1c29154) will decrease coverage by 0.08%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #3053      +/-   ##
==========================================
- Coverage   44.23%   44.14%   -0.09%     
==========================================
  Files         416      416              
  Lines       42143    42225      +82     
==========================================
  Hits        18641    18641              
- Misses      21780    21868      +88     
+ Partials     1722     1716       -6     
Impacted Files Coverage Δ
pkg/v1/tkg/tkgctl/helpers.go 58.68% <100.00%> (+0.28%) ⬆️
addons/pkg/crdwait/crd_wait.go 0.00% <0.00%> (-72.14%) ⬇️
pkg/v1/tkg/tkgctl/pacific_cluster.go 0.00% <0.00%> (-50.00%) ⬇️
pkg/v1/tkg/tkgctl/featuregate_helper.go 16.66% <0.00%> (-2.69%) ⬇️
pkg/v1/tkg/tkgpackageclient/package_update.go 83.57% <0.00%> (-1.43%) ⬇️
...ons/controllers/packageinstallstatus_controller.go 77.99% <0.00%> (-1.16%) ⬇️
addons/webhooks/clusterbootstrap_webhook.go 24.03% <0.00%> (-0.29%) ⬇️
cmd/cli/plugin/cluster/get.go 6.16% <0.00%> (-0.03%) ⬇️
pkg/v1/tkg/client/init.go 0.00% <0.00%> (ø)
... and 5 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@miclettej miclettej added the ok-to-merge PRs should be labelled with this before merging label Aug 2, 2022
@github-actions
Copy link

github-actions bot commented Aug 2, 2022

Cluster Generation A/B Results:
https://storage.googleapis.com/tkg-clustergen/3053/20220802183129/clustergen.diff.txt
Author/reviewers:
Please review to verify that the effects on the generated cluster configurations are exactly what the PR intended, and give a thumbs-up if so.

Copy link
Contributor

@tenczar tenczar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@prkalle prkalle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@anujc25 anujc25 force-pushed the anujc/fix-dry-run-apply branch 2 times, most recently from 07ec24c to 365a7f5 Compare August 3, 2022 16:57
@github-actions
Copy link

github-actions bot commented Aug 3, 2022

Cluster Generation A/B Results:
https://storage.googleapis.com/tkg-clustergen/3053/20220803170521/clustergen.diff.txt
Author/reviewers:
Please review to verify that the effects on the generated cluster configurations are exactly what the PR intended, and give a thumbs-up if so.

@github-actions
Copy link

github-actions bot commented Aug 3, 2022

Cluster Generation A/B Results:
https://storage.googleapis.com/tkg-clustergen/3053/20220803170611/clustergen.diff.txt
Author/reviewers:
Please review to verify that the effects on the generated cluster configurations are exactly what the PR intended, and give a thumbs-up if so.

pkg/v1/tkg/tkgctl/helpers_test.go Outdated Show resolved Hide resolved
pkg/v1/tkg/tkgctl/helpers_test.go Outdated Show resolved Hide resolved
@chandrareddyp
Copy link
Contributor

LGTM

@github-actions
Copy link

github-actions bot commented Aug 3, 2022

Cluster Generation A/B Results:
https://storage.googleapis.com/tkg-clustergen/3053/20220803182459/clustergen.diff.txt
Author/reviewers:
Please review to verify that the effects on the generated cluster configurations are exactly what the PR intended, and give a thumbs-up if so.

@marckhouzam
Copy link
Contributor

LGTM

@anujc25 anujc25 merged commit fcf7763 into main Aug 4, 2022
@anujc25 anujc25 deleted the anujc/fix-dry-run-apply branch August 4, 2022 00:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla-not-required ok-to-merge PRs should be labelled with this before merging
Projects
None yet
7 participants