Skip to content

Conversation

Paulchen5
Copy link

@Paulchen5 Paulchen5 commented Sep 25, 2025

- What I did

  • Added environment variable expansion to the config plugin dirs
  • Added an example test (I guess 😅 )

Closes #6486

- How I did it

  • searching for config file references in the code, thinking and assisted by GitHub Copilot

- How to verify it

  • run the tests (I guess 😅 )

- Human readable description for the release notes

Add support to expand environment variables in docker plugin config directory string

- Add support to expand environment variables in docker plugin config directory string

I am really really new to Go like 0.5% experience. The test is mainly assisted by Copilot with a bit of brain usage by my side. Feel free to help me to add like a negative test or something like that if the current one is not enough

- A picture of a cute animal (not mandatory but encouraged)
ducks

@Paulchen5 Paulchen5 force-pushed the 6486-add-environment-variable-expansion-for-docker-config-plugin-dirs branch from 1759e72 to d91b9d5 Compare September 25, 2025 06:53
@Paulchen5 Paulchen5 requested a review from vvoland September 26, 2025 16:05
@Paulchen5
Copy link
Author

Hi @vvoland, any updates on this?

@Paulchen5 Paulchen5 force-pushed the 6486-add-environment-variable-expansion-for-docker-config-plugin-dirs branch from f9717ab to c3326fd Compare October 1, 2025 15:01
@vvoland
Copy link
Collaborator

vvoland commented Oct 2, 2025

LGTM after squashing commits

@vvoland vvoland requested a review from thaJeztah October 2, 2025 17:22
@thaJeztah
Copy link
Member

I'm slightly on the fence; wondering; does the (for the example) $HOMEBREW_PREFIX env-var ever change? And would it be an option to expand the env-var before adding the path to the config?

The point here is that we don't to env-var expansion for any of the other paths, so this may now become a sliding slope where it needs to be added to every path that's in config; the extraPaths was already added to allow customisation with a custom set of extra directories.

@Paulchen5
Copy link
Author

I'm slightly on the fence; wondering; does the (for the example) $HOMEBREW_PREFIX env-var ever change? And would it be an option to expand the env-var before adding the path to the config?

In general the $HOMEBREW_PREFIX env-var shouldn't really change as far as I know. At least when using standard configuration. However when writing a guide for example it's more helpful / clear wo write the path with the prefix into the guide so the reader has to think less about the content. So I think it would be a nice and helpful feature which shouldn't break somethin.

The point here is that we don't to env-var expansion for any of the other paths, so this may now become a sliding slope where it needs to be added to every path that's in config; the extraPaths was already added to allow customisation with a custom set of extra directories.

Feel free to tell me about the option names / code files and I will have a look whether I can implement it for the additional options

@thaJeztah

…gins/manager/manager.go`

test: Add test for plugin directory environment variable expansion

Signed-off-by: Paulchen <[email protected]>
@Paulchen5 Paulchen5 force-pushed the 6486-add-environment-variable-expansion-for-docker-config-plugin-dirs branch from c3326fd to da71a33 Compare October 2, 2025 20:19
@Paulchen5
Copy link
Author

LGTM after squashing commits

done 👍

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.

Expand environment variables in docker plugin config string
3 participants