Repository navigation
Import the Volvo Data Portal's files as it delivers them - #396
Merged
Merged
Conversation
The portal does not give two CSV files: it gives dozens of ZIPs to download one by one, each holding a data.csv, with metadata.json and final.zip beside them. A trip's waypoints are not always in the ZIP whose name matches it, and rows come in no order. The import now takes every file at once: the ZIPs, a ZIP of them all, or the CSVs, told apart by their header and merged; what holds no data is ignored. Bounded to 1,000 files, 32 MiB uploaded and 256 MiB inflated. A trip given twice, in two chunks, is written once. The API's form has a single field, files, in place of trips and waypoints. The page's button opens the browser's picker, and the files chosen are imported at once, the report or the error shown under it. The fixture is a made-up answer of the portal, zipped as it zips. Co-Authored-By: Claude Opus 5.5 <[email protected]>
"Imported history" read as something past, done once: the tab is where an import is started, as much as where its history is listed. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 29 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Volvo Data Portal does not give two CSV files, as the import assumed: it gives dozens of ZIPs to download one by one, each holding a
data.csv, plusmetadata.jsonandfinal.zip. An owner had to unzip and merge them by hand. Now every file is chosen at once, as downloaded, and imported straight away.Changes
internal/volvoportal):ReadFilestakes the portal's ZIPs, a ZIP of them all, or the CSVs; trips and waypoints are told apart by their header, never by the file's name (a trip's waypoints are not always in the ZIP whose name matches it), and merged.metadata.json,final.zipand macOS's archive leftovers are ignored. Bounded: 10,000 CSVs, 256 MiB inflated, a ZIP inside a ZIP one level deep only.POST /vehicles/{vehicle}/imports/volvo_data_portaltakes one repeated field,files, in place oftripsandwaypoints(at most 1,000 files, 32 MiB together). A breaking change of the form, on an import still in beta.guide/importing.mddescribes what the portal really delivers.internal/volvoportal/testdata/portal, zipped exactly as the portal zips (deflate, a data descriptor, no attributes), rows out of order and a trip's waypoints in a ZIP of another name.Screenshots
The API answered by Playwright from the API's test fixtures.
Tests
task unitpassed (fmt, lint, Go tests without PostgreSQL, govulncheck, build; Vitest, ESLint, vue-tsc, the web build).tilt up.task integrationandtask system(no store, migration or Compose change). The browser tests' locators follow the tab's new name (exact, since Import is also a button); they run in CI.Closes #395
🤖 Generated with Claude Code