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

fix: get proper version from download manifest and spawn with canonical path #704

Merged
merged 1 commit into from
Dec 9, 2024

Conversation

j-lanson
Copy link
Collaborator

@j-lanson j-lanson commented Dec 9, 2024

Discovered a bug in the entry selection process from the plugin's download manifest, such that the desired version was not checked and the first entry with a matching arch was returned. Additionally, downloaded plugin.kdl files have entrypoints that are relative to the parent dir, but Hipcheck core does not change working directory for the process so we don't find the right plugin binary. This commit appends the working dir to the entrypoint binary and canonicalizes it so it can be resolved. The new implementation works but disallows the use of arguments in the entrypoint or use of docker containers. The spawning code will need to be addressed at greater length in a subsequent commit.

@j-lanson j-lanson added type: bug Something isn't working product: hc Relates to the core "hc" binary labels Dec 9, 2024
@j-lanson j-lanson added this to the 3.8.0 milestone Dec 9, 2024
@j-lanson j-lanson self-assigned this Dec 9, 2024
@j-lanson j-lanson force-pushed the jlanson/fix-plugin-ver-and-spawning branch from f2cbd04 to 44d7628 Compare December 9, 2024 17:18
@j-lanson j-lanson changed the title DRAFT: fix: get proper version from download manifest and spawn with canonical path fix: get proper version from download manifest and spawn with canonical path Dec 9, 2024
…al path

Discovered a bug in the entry selection process from the plugin's download
manifest, such that the desired version was not checked and the first
entry with a matching arch was returned. Additionally, downloaded
plugin.kdl files have entrypoints that are relative to the parent dir,
but Hipcheck core does not change working directory for the process so
we don't find the right plugin binary. This commit prepends the proper
plugin cache dir to PATH when resolving the binary to execute so that
the `git` plugin's `git` binary will be found before the actual version
control software. This commit also passes entrypoint args properly to
the plugin's Command object.

Signed-off-by: jlanson <[email protected]>
@j-lanson j-lanson force-pushed the jlanson/fix-plugin-ver-and-spawning branch from 44d7628 to 2dae179 Compare December 9, 2024 17:23
@j-lanson j-lanson merged commit 8766ff2 into main Dec 9, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product: hc Relates to the core "hc" binary type: bug Something isn't working
Projects
Status: Done
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants