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

plugins-add action does not walk up directory structure to discover all possible plugins #84

Open
mdobosz-isp opened this issue Jul 30, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@mdobosz-isp
Copy link

The plugins-add action does not appear to walk up the directory structure to discover all possible plugins to install when a non-default working-directory is configured in a workflow.

In this repro project I set up, I have a .tool-versions file in the root that configures one tool:
https://github.com/mdobosz-isp/asdf-actions-wrong-dir/blob/d448ef42593a21fef79927bd5e433f2f523b3888/.tool-versions#L1
I also have a subdirectory that sets a different tool:
https://github.com/mdobosz-isp/asdf-actions-wrong-dir/blob/d448ef42593a21fef79927bd5e433f2f523b3888/terraform/.tool-versions#L1

When I execute a workflow that uses the non-default working directory:
https://github.com/mdobosz-isp/asdf-actions-wrong-dir/blob/26d01bec1e7a7b48c5270acce978db41a4e2a3a4/.github/workflows/repro.yml#L8-L20
the plugin configured only in the subdirectory does not get installed which makes it impossible to correctly use the install action in that subdirectory (assuming #83 gets resolved) or to run asdf install as a freeform step.

This fails for workflows using the v1.0.0 and master versions of the action.

I would expect that the plugins-add action walked up the directory tree starting from working-directory and assembled the set of plugins to install from all .tool-versions files found.

The current workarounds are:

  1. Specify all possible tools and their default versions in the repos root .tool-versions file
  2. Run the plugins-add action multiple times for each directory that has a .tool-versions file, however this does not work on the v1 version of the action because plugins-add: skip installing plugins already installed #74 has not become part of an official release yet.
@smorimoto
Copy link
Member

​Implementing this makes a lot of sense if you want to use asdf in the CI workflow. ​I will try this, but I think it's a bit too much to recursively check all directories by default, so it would be better to disable it feature by default. What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants