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

tiltfile/helm: handle parsing version strings without v prefix #6408

Merged

Conversation

aybabtme
Copy link
Contributor

@aybabtme aybabtme commented Jul 3, 2024

helm version doesn't necessarily return a string with v in the prefix, as it depends how it's packaged and bundled. For instance when running helm with pkgx.sh (for pinning tool dependencies):

$ pkgx helm version --client --short
3.15.2

(due to https://github.com/pkgxdev/pantry/blob/main/projects/helm.sh/package.yml#L22)

Without this change, tilt fails to parse the version with error:

Error in helm: could not parse Helm version from string: "3.15.2\n"

This fixes that.

@aybabtme aybabtme force-pushed the parse-helm-version-with-pkgx-bundling branch 2 times, most recently from 0393afe to 8f17dd4 Compare July 3, 2024 11:29
`helm version` doesn't necessarily return a string with `v` in the
prefix, as it depends how it's packaged and bundles. For instance
when running helm with pkgx.sh:

```
$ pkgx helm version --client --short
3.15.2
```

(due to https://github.com/pkgxdev/pantry/blob/main/projects/helm.sh/package.yml#L22)

Without this change, tilt fails to parse the version with error:

```
Error in helm: could not parse Helm version from string: "3.15.2\n"
```

This fixes that.

Signed-off-by: Antoine Grondin <antoinegrondin@gmail.com>
@aybabtme aybabtme force-pushed the parse-helm-version-with-pkgx-bundling branch from 8f17dd4 to d07b7e9 Compare July 3, 2024 11:31
@aybabtme
Copy link
Contributor Author

aybabtme commented Jul 3, 2024

Not sure how to get CI to run.

@nicks
Copy link
Member

nicks commented Jul 3, 2024

ugh, circleci has been really awful the past couple weeks, let me kick it to see if it resolves.

@nicks nicks merged commit 2b23cc8 into tilt-dev:master Jul 3, 2024
8 of 10 checks passed
@aybabtme aybabtme deleted the parse-helm-version-with-pkgx-bundling branch July 4, 2024 01:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants