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

Consider allowing bypassing validation of firmware filename #90

Open
bruno-f-cruz opened this issue Jan 22, 2025 · 0 comments
Open

Consider allowing bypassing validation of firmware filename #90

bruno-f-cruz opened this issue Jan 22, 2025 · 0 comments

Comments

@bruno-f-cruz
Copy link
Contributor

The current pipeline to upload firmware files to device relies on validating the filename string to a template. e.g:

Behavior-fw3.2-harp1.13-hw2.0-ass0.hex

The current parsing relies on a custom parsing regex:

static readonly Regex MetadataRegex = new Regex("^(?<device>\\w+)-fw(?<firmware>\\d+\\.\\d+)-harp(?<core>\\d+\\.\\d+)-hw(?<hardware>(?:x|\\d+)\\.(?:x|\\d+))-ass(?<sequence>x|\\d+)(?:-preview(?<prerelease>\\d+))?$");

Recently, some files in harp-tech were found to have been misformatted (e.g. underscores instead of dashes) or missing information (e.g. no assembly).

One way to get around this is not to enforce the validation of the name, but simply to provide a warning to the user in the UI (or in the harp.toolkit) and allow users to force the update at their own risk.

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

No branches or pull requests

1 participant