-
Notifications
You must be signed in to change notification settings - Fork 192
Update the builder plugin to make version flag optional and add new 'build-plugin-local' make target #3289
Conversation
Codecov Report
@@ Coverage Diff @@
## main #3289 +/- ##
==========================================
+ Coverage 46.91% 52.98% +6.06%
==========================================
Files 265 103 -162
Lines 28879 10419 -18460
==========================================
- Hits 13550 5520 -8030
+ Misses 14082 4440 -9642
+ Partials 1247 459 -788 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works for me. One comment in-line.
1351c47
to
78b11c0
Compare
Cluster Generation A/B Results: |
fc49623
to
4e256dd
Compare
Cluster Generation A/B Results: |
4e256dd
to
d4b8064
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
build-plugin-local
will compile the plugin and put it in the artifacts
directory within the repository.
We should add install-plugin-local
that installs the plugin as well. Because as a end user I would like to do some change in the plugin, then I want to build as well as install the plugin to test my change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit:
- git recommends that the commit title (the first line) be 50 characters or less. This is useful because that line is used in many different git outputs (see the first paragraph from https://git-scm.com/docs/git-commit#_discussion)
- as for the text of the commit, it is recommended that it wraps at 72 characters. If not, it makes
git log
hard to read, among other git output.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of things to clarify
94e04f3
to
25e086e
Compare
Implementation has updated to add new make target |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One comment. But otherwise looks good.
As part of this changes: -The command 'tanzu builder cli compile --match package --version v0.27.0-dev' is updated to make "--version" flag as optional -New make target 'build-plugin-local' has added, to build the given plugin locally. -New make target 'install-plugin-local' has added, to build and install the given plugin locally.
1b5ad77
to
25d8570
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the change. LGTM
What this PR does / why we need it
tanzu builder cli compile --match <package_name> --version
logic to make the flag "--version" as optional and the help text of the flag.build-plugin-local
andinstall-plugin-local
has added to give flexibility to users to build and install the given plugin locally.Which issue(s) this PR fixes
Fixes ##899
Describe testing done for PR
tanzu builder cli compile --match package --version $(make version) --ldflags "-X 'github.com/vmware-tanzu/tanzu-framework/pkg/v1/buildinfo.Version=v0.27.0-dev'"
tested with --ldflags having Version info, works fine.tanzu builder cli compile --match package ---ldflags "-X 'github.com/vmware-tanzu/tanzu-framework/pkg/v1/buildinfo.Version=v0.27.0-dev'"
tested without --version flag, works fine.build-plugin-local
tested: With valid plugin namemake build-plugin-local PLUGIN_NAME=package
works fine, builds the given plugin. Also tested with empty and in-valid PLUGIN_NAME, it does throw an error saying:The PLUGIN_NAME: '' is not valid or not exists or empty, please provide valid PLUGIN_NAME.
install-plugin-local
tested: With valid plugin namemake install-plugin-local PLUGIN_NAME=login
works fine, build and install the given plugin. Also tested with empty and in-valid PLUGIN_NAME, it does throw an error saying:The PLUGIN_NAME: '' is not valid or not exists or empty, please provide valid PLUGIN_NAME.
Release note
Additional information
Special notes for your reviewer