Repository navigation
fix(plugins): a GRIB byte range a plugin command asked for lands for it (#2428) - #3003
Conversation
…it (opengeos#2428) The desktop app downloads a range under its marked address (`ranged_address`), so `asked_by` never matched it: the command waited out its 10 minutes before running again. A range asked for now matches the address with that range marked, and only that one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Code reviewReviewed the one changed file, Bugs
Security
Performance
Quality (nits, not posted inline)
AGENTS.md
Twins checked
Change sizeCompared with
|
📖 Docs previewCommit |
Na janela do RustGIS 0.8.0, um comando de plugin que pede um trecho de um arquivo GRIB só roda de novo 10 minutos depois, embora os registros cheguem em segundos (opengeos/RustGIS#3003 corrige). O aviso da previsão do BAM e a ajuda do formulário dizem agora o nome das camadas dos registros e que basta rodar o comando de novo quando elas aparecerem: ele usa os que já chegaram. Testes: 276; smoke sem falhas no rustgis-cli 0.5.0 e 0.8.0; BAM de 1 dia em Viçosa em 4 s no CLI 0.8.0. O aviso novo não foi visto na janela. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… the app marks The desktop app marks a GRIB range on the address as the plugin gave it, spaces and all, so a request for "…/model.grb " landed under "…/model.grb #rustgis-range=…" and wasn't matched: its command still waited the ten minutes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Code reviewOverall the change looks correct. I found no bugs. The one prior concern on this PR (a trailing-space address producing a marked address the match misses) is answered by b5c71f0. I checked both paths: the desktop app builds the marked address from the raw Bugs
Security
Performance
Quality
AGENTS.md
Twins checked
Already raised (left alone)
Change sizeCompared with the base branch: the whole PR against main (merge base 6810fba to PR head b5c71f0).
|
Code reviewThis PR makes Bugs: None found. I traced the trimmed and untrimmed URL paths against Security: None found. The new code only compares strings and reads numbers. Hostile input is handled without panics. Performance: None found. Quality:
AGENTS.md: No rule violations found. The wasm build is unaffected: Prior reviews: I left 1 earlier concern alone. It is the open thread on line 555 saying Change sizeCompared with the base branch, covering the whole PR (merge base 6810fba to head b5c71f0).
|
Summary
A plugin command that asks
layer.addUrlfor a byte range of a GRIB file ("bytes", #2669) waits 10 minutes in the desktop app before it runs again, though its download landed in seconds.Why: the app downloads a range under the address with the range marked in it (
ranged_address,…grb#rustgis-range=first-last), and the layer it adds carries that address.asked_bycompares it with the address the command asked for, which has no mark, so the download is never matched to its request. The command waits outREQUEST_WAITand runs again only then. The command line downloads at once, so it never shows there.Fix: in
asked_by(crates/engine/src/cmd/plugin_fetch.rs), a request with"bytes"also matches the address with exactly that range marked. Another range of the same file is still another request, and a request without"bytes"doesn't match a marked address.Found with the BrasilData plugin's new forecast command, which reads the 6-hourly records of CPTEC/INPE's BAM model (about 4 MB each, out of 1.6 GB files).
Testing
a_byte_range_lands_under_its_marked_address: the marked address of the range asked for is what was asked; another range, and a request without a range, aren't.cargo test -p rustgis-engine --lib fetch::(23 tests pass), clippy,cargo fmt --checkandcargo xtask test-hygiene. The rest of the workspace and the wasm build are left to CI.UI evidence
No visible UI change.
Related issue
Part of #2428.
🤖 Generated with Claude Code
Summary by CodeRabbit