8000 Github URL Locator mishandles certain refs · Issue #2697 · kurtosis-tech/kurtosis · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Github URL Locator mishandles certain refs #2697

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

Open
edobry opened this issue Apr 3, 2025 · 0 comments
Open

Github URL Locator mishandles certain refs #2697

edobry opened this issue Apr 3, 2025 · 0 comments
Labels
bug Something isn't working cli For bugs relating to the CLI papercut

Comments

@edobry
Copy link
Contributor
edobry commented Apr 3, 2025

What's your CLI version?

1.6.0

Description & steps to reproduce

I'm using plan.upload_files to pull in a bash script for execution with plan.run_sh and ran into an issue wherein Kurtosis was unable to pull from a specific git tag due to a bug in the logic that parses the git URL.

The locator I passed to upload_files: github.com/ethereum-optimism/infra/op-signer/gen-local-creds.sh@op-signer/v1.5.0

Note that the version is a tag called op-signer/v1.5.0, which is a valid ref name.

I received this error:

There was an error interpreting Starlark code
Evaluation error: Tried using the passed version 'op-signer' as commit as we couldn't find a tag/branch for it in the repo 'https://github.com/ethereum-optimism/infra.git' but failed

Upon digging thru Kurtosis code to find the error's origin, I encountered the ParseOutTagBranchOrCommit method.

Note this comment block describing the two accepted git URL formats:

	// 1- github.com/kurtosis-tech/sample-dependency-package/main.star@branch-or-version (when is called from cli run command)
	// 2- github.com/kurtosis-tech/sample-dependency-package@branch-or-version/main.star (when is declared in the replace section of the kurtosis.yml file)

I believe this issue occurs due to a faulty assumption in the parsing logic which interprets a . character following a / character in the URL's version segment (everything after the @ character) as being indicative of the post-/ segment referencing a file path, which is incorrect in the case of the tag I'm using op-signer/v1.5.0.

IMO the underlying issue here is that URL format 2 (see above) is fundamentally incompatible with this form of git ref, and should probably be removed. I searched thru the Kurtosis codebase and didn't find any direct references to this form, including not in an of the kurtosis.yml replace directive test cases. I'd submit a PR making this change but I'm not fully confident in this.

Desired behavior

Kurtosis should handle everything following a @ character in a git URL as a version, rather than trying to partially parse it as a file path.

What is the severity of this bug?

Papercut; this bug is frustrating, but I have a workaround.

What area of the product does this pertain to?

CLI: the Command Line Interface

@edobry edobry added the bug Something isn't working label Apr 3, 2025
@github-actions github-actions bot added cli For bugs relating to the CLI papercut labels Apr 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cli For bugs relating to the CLI papercut
Projects
None yet
Development

No branches or pull requests

1 participant
0