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

Improved artifact matching, extraction and fallbacks #4

Open
filiptibell opened this issue Apr 9, 2024 · 0 comments
Open

Improved artifact matching, extraction and fallbacks #4

filiptibell opened this issue Apr 9, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@filiptibell
Copy link
Collaborator

Rokit currently uses an extraction process very similar to Foreman and Aftman:

  1. Match against the name of an artifact
  2. Look inside the artifact, find the first binary with a matching name, OR
  3. Fall back to using any executable binary we find at all

This usually works but in some rare cases it may not:

  • Artifacts that get skipped entirely because their naming was incorrect or our matching algorithm didn't support the naming scheme
  • Artifacts with binaries for several processor architectures (sometimes exists with m1 macs / "universal" binaries)
  • Artifacts with binaries for multiple platforms / architectures inside (rare)

There exists a solution for this and one that Rokit already partially implements - checking the binary contents in artifacts:

https://github.com/filiptibell/rokit/blob/6ecef4fdb14911005126f23010464476380368c7/lib/sources/artifact.rs#L193-L205

This is a good safety check after extracting, but would be even more useful as a fallback during extraction. We already implement this detection for all supported platforms (Windows, macOS, Linux) and architectures (X86, X64, aarch64, arm32).

It would also be nice to warn whenever this fallback gets triggered since release artifacts having uniform naming and proper executables inside them is generally a good idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant