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

VAULT-24050 Fix erroneous warning showing when -address is provided #27265

Merged
merged 3 commits into from
May 30, 2024

Conversation

VioletHynes
Copy link
Contributor

This fixes the issue where the WARNING! VAULT_ADDR and -address unset error would appear even if -address was set. As far as I can tell, this is the best way to solve the issue, as this is where -address actually gets set. Previous to this, the flag is set as the default.

Closes #26294
Closes #27135

@github-actions github-actions bot added the hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed label May 29, 2024
@VioletHynes VioletHynes requested a review from biazmoreira May 29, 2024 19:04
@VioletHynes VioletHynes marked this pull request as ready for review May 29, 2024 19:04
Copy link

github-actions bot commented May 29, 2024

CI Results:
All Go tests succeeded! ✅

Copy link

github-actions bot commented May 29, 2024

Build Results:
All builds succeeded! ✅

@@ -212,7 +211,7 @@ func (c *BaseCommand) Client() (*api.Client, error) {
}

if c.addrWarning != "" && c.UI != nil {
if os.Getenv("VAULT_ADDR") == "" {
if os.Getenv("VAULT_ADDR") == "" && !c.flags.hadAddressFlag {
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the difference?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The left is for the environment variable, the right is for -address :)

@VioletHynes VioletHynes merged commit b41dcee into main May 30, 2024
83 checks passed
@VioletHynes VioletHynes deleted the violethynes/VAULT-24050 branch May 30, 2024 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed pr/no-milestone
Projects
None yet
Development

Successfully merging this pull request may close these issues.

inappropriate warning message from "vault status" Vault Agent/Proxy/SSH unneeded warning message
2 participants