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

api: Separate two distinct areas of code that were interleaved in one file #21906

Merged
merged 1 commit into from
Jul 18, 2023

Conversation

maxb
Copy link
Contributor

@maxb maxb commented Jul 18, 2023

This is a code cleanup and addition of an explanatory comment. For some reason, the code related to the CLI guessing whether a path requires sudo, has been interleaved into plugin_helpers.go, which was previously purely code used on the server side in the implementation of Vault plugins.

This remedies that by dividing the sudo paths code to a separate file, and adds a comment to plugin_helpers.go providing future readers with information about the overall theme of the file.

No code has been changed - only moved and documented.

… file

This is a code cleanup and addition of an explanatory comment. For some
reason, the code related to the CLI guessing whether a path requires
sudo, has been interleaved into plugin_helpers.go, which was previously
purely code used on the server side in the implementation of Vault
plugins.

This remedies that by dividing the sudo paths code to a separate file,
and adds a comment to plugin_helpers.go providing future readers with
information about the overall theme of the file.

No code has been changed - only moved and documented.
@@ -33,56 +43,6 @@ const (
PluginUnwrapTokenEnv = "VAULT_UNWRAP_TOKEN"
)

// sudoPaths is a map containing the paths that require a token's policy
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note to reviewer: All this removed code is moved without change to sudo_paths.go

@maxb
Copy link
Contributor Author

maxb commented Jul 18, 2023

I request pr/no-changelog as this is a trivial cleanup.

Copy link
Member

@banks banks left a comment

Choose a reason for hiding this comment

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

Thanks Max. This seems like a worthwhile clean up given the history of plugin_helpers.go.

Copy link
Member

@banks banks left a comment

Choose a reason for hiding this comment

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

Failed to approve 🤦

@banks banks merged commit 3961d7b into hashicorp:main Jul 18, 2023
@maxb maxb deleted the separate branch July 18, 2023 12:56
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.

2 participants