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

Find a replacement for drone/envsubst (not maintained anymore) #8325

Open
guettli opened this issue Mar 21, 2023 · 12 comments
Open

Find a replacement for drone/envsubst (not maintained anymore) #8325

guettli opened this issue Mar 21, 2023 · 12 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.

Comments

@guettli
Copy link
Contributor

guettli commented Mar 21, 2023

What would you like to be added (User Story)?

As a developer, I would like tools to fail if an environment variable is missing.

Detailed Description

At some places drone/envsubst gets used (for example hack/tools/bin/envsubst)

Up to now this tools silently replaces missing environment variables with an empty string.

Unfortunately this tool does not support an option to fail if an variable is not set.

I searched and found a8m/envsubst which supports failing on missing env variables.

Wasting time because missing env vars got silently replaced with empty strings is not fun.

The authors of drone/envsubst are a bit un-welcoming: They don't provide an issue tracker. This signals to me that it would be better to switch to a package which supports this feature, instead of adding this feature to drone/envsubst.

Label(s) to be applied

/kind feature
/area/code-organization

@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Mar 21, 2023
@sbueringer
Copy link
Member

At a first glance sound reasonable to me.

Probably would be better if we replace it everywhere (including e.g. clusterctl)

@guettli
Copy link
Contributor Author

guettli commented Mar 21, 2023

@sbueringer thank you for your feedback. I hope I have time to create a PR during the next weeks.

@chrischdi
Copy link
Member

👍 a8m/envsubst also seems to be the more healthier project, having more recent commits.

@guettli
Copy link
Contributor Author

guettli commented Mar 22, 2023

I think this would be a "good first issue". Does anyone have a young and motivated intern at hand?

@fabriziopandini
Copy link
Member

fabriziopandini commented Mar 23, 2023

If I'm not wrong with the proposed replacement we are going to lose a couple of the syntax supported by the current library (https://github.com/drone/envsubst vs https://github.com/a8m/envsubst#docs), this will be breaking for the users.

Have you considered contributing the syntax you are looking to into drone/envsubst?

@fabriziopandini
Copy link
Member

/triage accepted
given that the discussion is ongoing, but let's make sure to not create disruption to users or to have a clear plan on how to handle this before moving forward

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Mar 23, 2023
@guettli
Copy link
Contributor Author

guettli commented Mar 24, 2023

If I'm not wrong with the proposed replacement we are going to lose a couple of the syntax supported by the current library (https://github.com/drone/envsubst vs https://github.com/a8m/envsubst#docs), this will be breaking for the users.

Have you considered contributing the syntax you are looking to into drone/envsubst?

drone/envsubst does not provide an issue-tracker or any other way to provide feedback. That's why I created a PR to their README to make this clear to everybody. Up to now noone left a comment in my PR. For me this means the maintainers of drone/envsubst are not interested in a conversation with users: https://github.com/drone/envsubst/pull/33/files

I guess that a8m/envsubst is accepting PRs to get feature parity. I guess that should not be that difficult, since both are written in Go an both have the MIT license.

@fabriziopandini
Copy link
Member

If drone stopped accepting issues it is a piece of bad news.
if we can easily feature parity in the alternative it will be great, otherwise, we will be forced to move handling all the communication with users. I will bring up the topic at the next office hours

@guettli
Copy link
Contributor Author

guettli commented Mar 25, 2023

I had a look at it. But bad news: a8m/envsubst replaces vars like $HOME, but the current implementation (drone/envsubst) does only replace variables in curly braces (for example ${HOME}). This change could break a lot of usages.

I created a PR to the corruently used repo drone/envsubst. Let's see if they accept it.

drone/envsubst#34

@k8s-triage-robot
Copy link

This issue has not been updated in over 1 year, and should be re-triaged.

You can:

  • Confirm that this issue is still relevant with /triage accepted (org members only)
  • Close this issue with /close

For more details on the triage process, see https://www.kubernetes.dev/docs/guide/issue-triage/

/remove-triage accepted

@k8s-ci-robot k8s-ci-robot added needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. and removed triage/accepted Indicates an issue or PR is ready to be actively worked on. labels Mar 24, 2024
@fabriziopandini
Copy link
Member

/priority important-longterm

@k8s-ci-robot k8s-ci-robot added the priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. label Apr 11, 2024
@fabriziopandini fabriziopandini changed the title Switch from drone/envsubst to a8m/envsubst (hack/tools/bin) Find a replacement for drone/envsubst (not maintained anymore) May 2, 2024
@chrischdi
Copy link
Member

Note: https://github.com/a8m/envsubst also seems not to be that much maintained currently. (last commit 9 months ago, last release in february 2023)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.
Projects
None yet
Development

No branches or pull requests

6 participants