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

Panic on nonexistent latency_test_results.json due to invalid status.json format #96

Open
ZoomRmc opened this issue Oct 9, 2022 · 1 comment

Comments

@ZoomRmc
Copy link

ZoomRmc commented Oct 9, 2022

If the file latency_test_results.json is not found, Flexo panics with:

[2022-10-09T15:23:34.018Z INFO  flexo::mirror_flexo] Retrieved 0 files with a total size of 0.00 B from local file system.
[2022-10-09T15:23:41.435Z INFO  flexo] Unable to fetch mirrors remotely: DemarshallError(Error("invalid type: map, expected a sequence", line: 1, column: 1))
    Will try to fetch them from cache.
thread 'main' panicked at 'Unable to fetch mirrors from cache: IoError(Os { code: 2, kind: NotFound, message: "No such file or directory" })', src/main.rs:678:19

Got that while trying to provide the status.json endpoint from Manjaro (which have a different format).
Flexo shouldn't panic here, as it's still possible to fall back on to provided mirrors_predefined vec from the config.

PS: Supporting Manjaro repo list would be a welcome addition, though it grants a separate issue.

@nroi
Copy link
Owner

nroi commented Oct 10, 2022

Thanks for reporting this. You can, of course, just set the mirror_selection_method to predefined. But using the predefined mirrors as a fallback would more robust and also compliant with the comments in the flexo.toml file, so this is something I am going to change.

I've created a separate issue for Manjaro support: #97

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

2 participants