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

Conversation

codegold79
Copy link
Contributor

@codegold79 codegold79 commented Nov 7, 2022

What this PR does / why we need it

This PR updates the Tanzu CLI plugin for managing Features on a cluster. It required updating the FeatureGate client in order to make the plugin work. Unit tests for the plugin and client have been updated.

Which issue(s) this PR fixes

Fixes #

Describe testing done for PR

Unit tests are passing, but the plugin code test coverage is less than 33% while the client test coverage rounds up to 70%. Increased unit test coverage for the plugin will happen in a future PR.

I have done some manual testing by setting up the new Feature controller and Feature(Gate) APIs. I have documented the commands I ran in a gist: https://gist.github.com/codegold79/0b4e76d437e58173dc17fbb2047e2e69

Please ignore the FeatureGate status section as the logic for the controller is not in the scope of this Tanzu CLI Feature plugin PR.

Release note

Update the Tanzu Feature CLI plugin and FeatureGate client to work with the new (core.tanzu.vmware.com v1alpha2) Feature and FeatureGate APIs. This change is a breaking change as the Tanzu Feature CLI will no longer work with config.tanzu.vmware.com v1alpha1. Please upgrade Feature and FeatureGate resources to use the new v1alpha2 CRDs.

Additional information

Special notes for your reviewer

@codegold79 codegold79 added enhancement New feature or request area/cli area/plugin area/api kind/feature Categorizes issue or PR as related to a new feature labels Nov 7, 2022
@codegold79 codegold79 requested a review from a team as a code owner November 7, 2022 10:57
@codegold79 codegold79 self-assigned this Nov 7, 2022
@codegold79 codegold79 requested review from a team as code owners November 7, 2022 10:57
@codegold79 codegold79 force-pushed the TKG-14893_Make-feature-plugin-work-for-Feature-and-FeatureGate-APIs-in-core.tanzu.vmware.com branch from 0ec768d to c65d3ae Compare November 7, 2022 17:13
@github-actions
Copy link

github-actions bot commented Nov 7, 2022

Cluster Generation A/B Results:
https://storage.googleapis.com/tkg-clustergen/3850/20221107172524/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 Nov 7, 2022

Codecov Report

Merging #3850 (df68d5e) into main (7bc2c90) will decrease coverage by 0.84%.
The diff coverage is 52.01%.

❗ Current head df68d5e differs from pull request most recent head 0495a94. Consider uploading reports for the commit 0495a94 to get more accurate results

@@            Coverage Diff             @@
##             main    #3850      +/-   ##
==========================================
- Coverage   46.95%   46.10%   -0.85%     
==========================================
  Files         402      434      +32     
  Lines       40251    42158    +1907     
==========================================
+ Hits        18898    19437     +539     
- Misses      19605    20942    +1337     
- Partials     1748     1779      +31     
Impacted Files Coverage Δ
apis/config/v1alpha1/feature_types.go 100.00% <ø> (ø)
apis/config/v1alpha1/featuregate_types.go 100.00% <ø> (ø)
apis/config/v1alpha1/featuregate_webhook.go 34.64% <ø> (ø)
apis/core/v1alpha2/featuregate_webhook.go 31.48% <31.48%> (ø)
...eaturegates/client/pkg/featuregateclient/client.go 55.80% <63.96%> (+2.36%) ⬆️
...cli/plugin-admin/codegen/generators/feature/gen.go 42.02% <66.66%> (+3.93%) ⬆️
...eaturegates/client/pkg/featuregateclient/errors.go 80.00% <80.00%> (ø)
featuregates/client/pkg/util/featuregate.go 82.90% <83.33%> (+0.18%) ⬆️
...regates/client/pkg/featuregateclient/validation.go 90.90% <90.90%> (ø)
apis/core/v1alpha2/feature_stability_policies.go 100.00% <100.00%> (ø)
... and 34 more

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

@github-actions
Copy link

github-actions bot commented Nov 7, 2022

Cluster Generation A/B Results:
https://storage.googleapis.com/tkg-clustergen/3850/20221107233602/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
Member

@yharish991 yharish991 left a comment

Choose a reason for hiding this comment

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

This is a Round 1 review, need to review this more thoroughly

cmd/cli/plugin/feature/README.md Outdated Show resolved Hide resolved
cmd/cli/plugin/feature/README.md Outdated Show resolved Hide resolved
cmd/cli/plugin/feature/activate.go Outdated Show resolved Hide resolved
cmd/cli/plugin/feature/activate.go Outdated Show resolved Hide resolved
cmd/cli/plugin/feature/activate.go Outdated Show resolved Hide resolved
featuregates/client/pkg/featuregateclient/client.go Outdated Show resolved Hide resolved
featuregates/client/pkg/featuregateclient/client.go Outdated Show resolved Hide resolved
@github-actions
Copy link

github-actions bot commented Nov 8, 2022

Cluster Generation A/B Results:
https://storage.googleapis.com/tkg-clustergen/3850/20221108083143/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.

@codegold79 codegold79 force-pushed the TKG-14893_Make-feature-plugin-work-for-Feature-and-FeatureGate-APIs-in-core.tanzu.vmware.com branch 2 times, most recently from 772cfaa to aad27db Compare November 10, 2022 02:19
@github-actions
Copy link

Cluster Generation A/B Results:
https://storage.googleapis.com/tkg-clustergen/3850/20221110023123/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.

@codegold79 codegold79 force-pushed the TKG-14893_Make-feature-plugin-work-for-Feature-and-FeatureGate-APIs-in-core.tanzu.vmware.com branch from aad27db to 0ff238e Compare November 10, 2022 19:07
cmd/cli/plugin/feature/README.md Outdated Show resolved Hide resolved
cmd/cli/plugin/feature/README.md Outdated Show resolved Hide resolved
cmd/cli/plugin/feature/deactivate.go Outdated Show resolved Hide resolved
@codegold79 codegold79 force-pushed the TKG-14893_Make-feature-plugin-work-for-Feature-and-FeatureGate-APIs-in-core.tanzu.vmware.com branch from c54db79 to 47d3a48 Compare November 14, 2022 19:44
@codegold79 codegold79 requested a review from prkalle as a code owner November 14, 2022 19:44
@codegold79 codegold79 force-pushed the TKG-14893_Make-feature-plugin-work-for-Feature-and-FeatureGate-APIs-in-core.tanzu.vmware.com branch 2 times, most recently from fe26948 to df68d5e Compare November 15, 2022 17:01
@codegold79 codegold79 added the ok-to-merge PRs should be labelled with this before merging label Nov 15, 2022
@github-actions
Copy link

Cluster Generation A/B Results:
https://storage.googleapis.com/tkg-clustergen/3850/20221115171123/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
Member

@rajathagasthya rajathagasthya left a comment

Choose a reason for hiding this comment

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

Please make sure release note is updated with breaking changes and what users can use as an alternative.

@codegold79
Copy link
Contributor Author

Please make sure release note is updated with breaking changes and what users can use as an alternative.

@rajathagasthya. I updated the release note to contain your suggestions,

Update the Tanzu Feature CLI plugin and FeatureGate client to work with the new (core.tanzu.vmware.com v1alpha2) Feature and FeatureGate APIs. This change is a breaking change as the Tanzu Feature CLI will no longer work with config.tanzu.vmware.com v1alpha1. Please upgrade Feature and FeatureGate resources to use the new v1alpha2 CRDs.

Let me know if it can be improved.

@github-actions
Copy link

Cluster Generation A/B Results:
https://storage.googleapis.com/tkg-clustergen/3850/20221115195837/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.

@codegold79 codegold79 force-pushed the TKG-14893_Make-feature-plugin-work-for-Feature-and-FeatureGate-APIs-in-core.tanzu.vmware.com branch from ca8bfab to 37569c1 Compare November 18, 2022 16:22
@github-actions
Copy link

Cluster Generation A/B Results:
https://storage.googleapis.com/tkg-clustergen/3850/20221118163309/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.

@codegold79 codegold79 force-pushed the TKG-14893_Make-feature-plugin-work-for-Feature-and-FeatureGate-APIs-in-core.tanzu.vmware.com branch from 37569c1 to 68ef063 Compare December 1, 2022 22:14
…e) v1alpha2 APIs

- update feature plugin and client code to work with core.tanzu.vmware.com APIs
- update unit tests for both plugin and client

Signed-off-by: F. Gold <fgold@vmware.com>
@codegold79 codegold79 force-pushed the TKG-14893_Make-feature-plugin-work-for-Feature-and-FeatureGate-APIs-in-core.tanzu.vmware.com branch from 68ef063 to 0495a94 Compare December 1, 2022 22:15
@codegold79 codegold79 merged commit cca563f into vmware-tanzu:main Dec 1, 2022
@codegold79 codegold79 deleted the TKG-14893_Make-feature-plugin-work-for-Feature-and-FeatureGate-APIs-in-core.tanzu.vmware.com branch December 5, 2022 18:34
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
area/api area/cli area/plugin cla-not-required enhancement New feature or request kind/feature Categorizes issue or PR as related to a new feature ok-to-merge PRs should be labelled with this before merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants