Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Release-1.5] Cherry-picks #836

Merged

Conversation

anujc25
Copy link
Contributor

@anujc25 anujc25 commented Jan 8, 2025

What this PR does / why we need it

  • Cherrypicks commits from main to release-1.5

Important: Make sure to do Rebase and Merge.

Which issue(s) this PR fixes

Fixes #

Describe testing done for PR

Release note


Additional information

Special notes for your reviewer

marckhouzam and others added 7 commits January 8, 2025 14:12
* Avoid unnecessary synching of Context and Servers

Before this commit, the CLI would always perform a two-way sync of the
Contexts of the config-ng.yaml file and the Servers of the config.yaml
file, even if there was no reason to sync, i.e., if the Contexts
and Servers were already in sync.  This sync was being done for every
single command of the CLI.

This caused a write to the config files for each contexts configured
and one more for the current context.  With many contexts configured,
this unnecessary sync would make the CLI startup noticeably slower.

This commit verifies if the sync is required by computing and storing a
SHA for the "context" section and one for the "server" section, and
checking if the SHAs have changed on each CLI command and if so, only
then doing the sync. Note that Tanzu contexts are kept out of the
SHA computation since they are not synced.

* Write to datastore and config files only if needed

The logic to store the last execute CLI would always write to the
datastore and to the config files, which should be avoided.

This commit first checks if the update is required or not.

Signed-off-by: Marc Khouzam <[email protected]>
A plugin, when doing shell completion, may print debug printouts to
stderr.  When the plugin is invoked through the tanzu cli, those
printouts were being lost.  This commit prints them out to stderr to
allow for better troubleshooting of plugin shell completion.

Signed-off-by: Marc Khouzam <[email protected]>
If the plugin's descriptor Hidden field is set to true, only the root
command of the plugin should be hidden; any mapped subcommands should
stay visible.

Signed-off-by: Marc Khouzam <[email protected]>
Since the cert data and skip verify intent is captured in the certmap
for the endpoint that one `tanzu login`s to, subsequent tanzu login
to the same endpoint can succeed without providing these values.
However the kube context created with the subsequent login attempt does
not incorporate these values when they originate from the cert map.

This change addresses this inconsistency, by ensuring that these values
are incorporated unless command line arguments of alternative ones are
provided in the login command.

Signed-off-by: Vui Lam <[email protected]>
Bumps [github.com/golang-jwt/jwt/v4](https://github.com/golang-jwt/jwt) from 4.5.0 to 4.5.1.
- [Release notes](https://github.com/golang-jwt/jwt/releases)
- [Changelog](https://github.com/golang-jwt/jwt/blob/main/VERSION_HISTORY.md)
- [Commits](golang-jwt/jwt@v4.5.0...v4.5.1)

---
updated-dependencies:
- dependency-name: github.com/golang-jwt/jwt/v4
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
… from v0.23.0 to v0.33.0 (vmware-tanzu#834)

* Bump golang.org/x/crypto from 0.21.0 to 0.31.0, Bump golang.org/x/net from v0.23.0 to v0.33.0

Signed-off-by: Anuj Chaudhari <[email protected]>

* Update the copyright to 2025

---------

Signed-off-by: Anuj Chaudhari <[email protected]>
* Update cosign and k8s.io dependencies

- k8s.io/* from v0.28.3 to v0.31.3
- sigs.k8s.io/controller-runtime from v0.14.5 to v0.19.3
- Remove dependencies on github.com/vmware-tanzu/tanzu-framework by
  coping discovery client to this repo

* Use golang v1.23 in CI
* Bump Tanzu Plugin Runtime version to v1.4.7

Signed-off-by: Anuj Chaudhari <[email protected]>
@anujc25 anujc25 requested a review from a team as a code owner January 8, 2025 22:15
This allows to have different packages signed with different keys.
To achieve this, the building of RPM packages is now done by
hack/rpm/build_package.sh while building the final repository is now
done by hack/rpm/build_package_repo.sh.  This approach allows to call
hack/rpm/build_package.sh more than once with different RPM_PACKAGE_NAME
and then build the repo with all the new packages as a last step.

Signed-off-by: Marc Khouzam <[email protected]>
Copy link
Contributor

@marckhouzam marckhouzam left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

@anujc25 anujc25 merged commit 18b6706 into vmware-tanzu:release-1.5 Jan 9, 2025
7 checks passed
@marckhouzam marckhouzam added this to the v1.5.2 milestone Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants