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

Automatic runtime install of tools #101

Open
2 of 4 tasks
rarkins opened this issue Jul 26, 2021 · 9 comments
Open
2 of 4 tasks

Automatic runtime install of tools #101

rarkins opened this issue Jul 26, 2021 · 9 comments
Labels
priority-3-normal Default priority, "should be done" but isn't prioritised ahead of others status:requirements Full requirements are not yet known, so implementation should not be started type:feature Feature (new functionality)

Comments

@rarkins
Copy link
Member

rarkins commented Jul 26, 2021

An even more advanced approach here would be that we create our own tools directory in $PATH, e.g. containing node, poetry, gradle, etc. But each is in fact a wrapper/stub and its purpose is to dynamically install the required tool + language and then pass the same parameters to the tool itself after it's installed.

e.g. the application like Renovate will simply call poetry via child process, which then kicks off:

  • Our own custom shell script
  • Installs python if missing (According to PYTHON_VERSION)
  • Installs poetry
  • Calls newly installed poetry and passes all args to it

Depends on

@viceice
Copy link
Member

viceice commented Aug 19, 2021

I think for this we need a higher language to make this more easy.

I suggest to use pkg and package some node tools.
Use the executable name to differenciate the mode to run, eg: prepare-tool, install-tool, install-npm, install-buildpack

@rarkins rarkins pinned this issue Jan 20, 2022
@rarkins rarkins unpinned this issue Jan 20, 2022
@viceice viceice added priority-3-normal Default priority, "should be done" but isn't prioritised ahead of others status:blocked Issue is blocked by another issue or external requirement type:feature Feature (new functionality) labels Jan 24, 2022
@viceice viceice added status:requirements Full requirements are not yet known, so implementation should not be started and removed status:blocked Issue is blocked by another issue or external requirement labels Mar 16, 2023
@viceice
Copy link
Member

viceice commented Mar 16, 2023

@rarkins Do we still like to do this?

When such a wrapper is called and a version is passed via env, use that version.
If version is not set use latest version or fail?

@rarkins
Copy link
Member Author

rarkins commented Mar 16, 2023

Yes, we need this for other products at Mend. Except we also want it to do it's own auto detection too, for the tools which don't have the smarts like Renovate

@viceice
Copy link
Member

viceice commented Mar 16, 2023

ok, detecting tool version from current dir (until repo root) will be tricky. so i'm sure it's nothing we should try to do in bash scripts.

@rarkins
Copy link
Member Author

rarkins commented Mar 17, 2023

My plan is to do it first using TS so that we can reuse renovate's datasource lookup logic. It can be compiled to a binary using pkg. After that porting to Go is a nice to have. I don't think this forces the current code to be rewritten in the same time frame and can remain as bash

@viceice
Copy link
Member

viceice commented Mar 17, 2023

sounds good.

#771 (comment)

@viceice
Copy link
Member

viceice commented Jan 30, 2024

@rarkins
Copy link
Member Author

rarkins commented Jan 30, 2024

Can it be unset before we call to pipenv?

@viceice
Copy link
Member

viceice commented Jan 30, 2024

maybe, not working on it now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority-3-normal Default priority, "should be done" but isn't prioritised ahead of others status:requirements Full requirements are not yet known, so implementation should not be started type:feature Feature (new functionality)
Projects
None yet
Development

No branches or pull requests

2 participants