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

Enable feature flag for API driven CLIPlugin Discovery#1144

Merged
anujc25 merged 7 commits intovmware-tanzu:mainfrom
anujc25:turn-on-cliplugin-discovery
Nov 17, 2021
Merged

Enable feature flag for API driven CLIPlugin Discovery#1144
anujc25 merged 7 commits intovmware-tanzu:mainfrom
anujc25:turn-on-cliplugin-discovery

Conversation

@anujc25
Copy link
Copy Markdown
Contributor

@anujc25 anujc25 commented Nov 11, 2021

What this PR does / why we need it

Currently, the feature flag for API-driven CLIPlugin discovery also known as Context-Aware-Discovery is turned off by default.

This PR turns on this feature flag by default.

Changes:

  • Updates Makefile to add/update targets to build CLI with feature flag enabled
    • Build time configuration variable ENABLE_CONTEXT_AWARE_PLUGIN_DISCOVERY to enable/disable context-aware discovery
    • Added config variable DEFAULT_STANDALONE_DISCOVERY_TYPE to use local/oci discovery type when building CLI
  • Local build for the development purpose, publishes the plugin discovery yamls and distribution artifacts to local discovery and uses that when doing plugin operations
  • Test plugins and Plugin Tests pipeline still uses non-context-aware discovery for testing

Bug Fixes:

  • Fix the populateStandaloneDiscovery logic (To not add additional default discovery if one already exists)
  • Show warning instead of error when a discovery failure. So that tanzu plugin list etc operation can report correct status
  • Do not throw error when catalog cache file doesn't exist on tanzu plugin clean

NOTE: Developers using the pre-release CLI, might have the feature flag disabled in the config file and might have to enable it manually by running tanzu config set features.global.context-aware-discovery true once. Because the previous default value of the flag was false

Which issue(s) this PR fixes

Fixes #1150

Describe testing done for PR

  • Tested plugins sync, install, list commands with local, oci discovery
  • Tested the management-cluster creation with local,oci discovery

Release note

Enabled API-driven CLIPlugin discovery by default. The change makes tanzu CLI context-aware

PR Checklist

  • Squash the commits into one or a small number of logical commits
  • Use good commit messages
  • Ensure PR contains terms all contributors can understand and links all contributors can access

Additional information

Special notes for your reviewer

@github-actions
Copy link
Copy Markdown

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

@anujc25 anujc25 marked this pull request as draft November 11, 2021 09:01
@anujc25 anujc25 force-pushed the turn-on-cliplugin-discovery branch from c0f4c8f to 283d4f2 Compare November 11, 2021 09:02
@github-actions
Copy link
Copy Markdown

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

@anujc25 anujc25 force-pushed the turn-on-cliplugin-discovery branch from 283d4f2 to 377c87f Compare November 11, 2021 09:21
@github-actions
Copy link
Copy Markdown

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

@anujc25 anujc25 force-pushed the turn-on-cliplugin-discovery branch from 377c87f to 54ac182 Compare November 11, 2021 09:43
@github-actions
Copy link
Copy Markdown

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

@anujc25 anujc25 force-pushed the turn-on-cliplugin-discovery branch from 54ac182 to f1796f1 Compare November 11, 2021 19:09
@github-actions
Copy link
Copy Markdown

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

@anujc25 anujc25 force-pushed the turn-on-cliplugin-discovery branch from f1796f1 to 33411f2 Compare November 11, 2021 19:29
@github-actions
Copy link
Copy Markdown

Cluster Generation A/B Results:
https://storage.googleapis.com/tkg-clustergen/1144/20211111194429/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
Copy Markdown

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

@anujc25 anujc25 changed the title [WIP] Turn on feature flag for API driven CLIPlugin Discovery Turn on feature flag for API driven CLIPlugin Discovery Nov 11, 2021
@anujc25 anujc25 added area/cli area/plugin kind/feature Categorizes issue or PR as related to a new feature labels Nov 11, 2021
@github-actions
Copy link
Copy Markdown

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

@anujc25 anujc25 marked this pull request as ready for review November 11, 2021 23:08
@anujc25 anujc25 force-pushed the turn-on-cliplugin-discovery branch from ab9c7da to 98ceae9 Compare November 12, 2021 05:20
@anujc25 anujc25 changed the title Turn on feature flag for API driven CLIPlugin Discovery Enable feature flag for API driven CLIPlugin Discovery Nov 12, 2021
@github-actions
Copy link
Copy Markdown

Cluster Generation A/B Results:
https://storage.googleapis.com/tkg-clustergen/1144/20211112053634/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
Copy Markdown

Cluster Generation A/B Results:
https://storage.googleapis.com/tkg-clustergen/1144/20211115004106/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
Copy Markdown

Cluster Generation A/B Results:
https://storage.googleapis.com/tkg-clustergen/1144/20211115081905/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
Copy Markdown

Cluster Generation A/B Results:
https://storage.googleapis.com/tkg-clustergen/1144/20211115155213/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
Copy Markdown

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

@anujc25 anujc25 force-pushed the turn-on-cliplugin-discovery branch 2 times, most recently from e438f61 to 37683e9 Compare November 16, 2021 01:02
@github-actions
Copy link
Copy Markdown

Cluster Generation A/B Results:
https://storage.googleapis.com/tkg-clustergen/1144/20211116010411/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
Copy Markdown

Cluster Generation A/B Results:
https://storage.googleapis.com/tkg-clustergen/1144/20211116010855/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
Copy Markdown
Contributor

@imikushin imikushin left a comment

Choose a reason for hiding this comment

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

Except for a few microscopic comments, looks great!

@anujc25 anujc25 force-pushed the turn-on-cliplugin-discovery branch from 37683e9 to 01fe5b1 Compare November 16, 2021 02:16
@github-actions
Copy link
Copy Markdown

Cluster Generation A/B Results:
https://storage.googleapis.com/tkg-clustergen/1144/20211116022321/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
Copy Markdown
Contributor

@vuil vuil left a comment

Choose a reason for hiding this comment

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

lgtm, some minor typographical stuff, feel free to address as a followup.

Also, another nit: it wasn't perfect before, but all the new makefile targets have turned
make build-<tab> output quite menacing :-)
and introduced a bunch of misalignments in the
make help output

@anujc25 anujc25 force-pushed the turn-on-cliplugin-discovery branch from 01fe5b1 to 25f2644 Compare November 16, 2021 07:21
@github-actions
Copy link
Copy Markdown

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

Anuj Chaudhari added 7 commits November 16, 2021 15:30
@anujc25 anujc25 force-pushed the turn-on-cliplugin-discovery branch from 25f2644 to cb07e60 Compare November 16, 2021 23:30
@github-actions
Copy link
Copy Markdown

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area/cli area/plugin cla-not-required 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.

Enable feature flag for API driven CLIPlugin Discovery by default

5 participants