Repository navigation
feat(openrca): fetch the dataset from an archive you downloaded - #20
Merged
Merged
Conversation
Google Drive answers every download of the OpenRCA archives with its "Quota exceeded" page once a file's quota is used up. With --archive=<path>, evorca fetch and evorca reproduce read the files from an archive that the user downloaded in a browser. The size of the file picks the archive that it replaces. Each file goes through the same zip reader, pinned size and SHA-256 check, .tmp rename, and free-space check as a download from Drive. openRemoteZip becomes openZip, which takes a URL or a path.
When Drive answers a Range request with 200 and an HTML page, the fetch now fails with the archive's name and size, the link that opens it in a browser, and the evorca fetch command to run with --archive. The link comes from the pinned Drive file ID. Other unexpected responses keep the generic error.
# Conflicts: # packages/cli/README.md # packages/cli/src/main.ts
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.
Why
A ReAct baseline on OpenRCA needs the telemetry on disk. Today Google Drive answers every request for the three dataset archives with its "Quota exceeded" page, even for 1 KB ranges, and no mirror exists. This PR lets
evorca fetchread an archive that you download yourself, and makes the refusal say what to do.What changed
evorca fetchandevorca reproducetake--archive=<path>, which can repeat. The file's size picks the archive it replaces. Its files go through the same zip reader, pinned size and SHA-256 check,.tmprename, progress lines, and free-space check as a download.openRemoteZipinremote-zip.tsbecomesopenZipinzip.ts. It takes aZipSource, which is a URL or a path, so the source of the bytes is the only thing that changes.text/htmlanswer to a Range request fails with the archive's name and size, its browser link built from the pinned Drive file ID, and the command to run with--archive.Scope
pin-telemetrystill reads from Drive.evorca fetch. Areproduceuser who follows it gets the telemetry as well, which comes from disk, not the network.Blast Radius
The change touches the dataset download in
@evorca/openrcaand the flag parsing offetchandreproduce. Without--archive, the only new behavior is the HTML check, which fires only on an answer that already failed with the generic error.Verification
pnpm evorca fetch --benchmark=openrca --scenario=telecomagainst Drive exits 1 and writes no file:.tmp, and a zip of the wrong size fails with the archive sizes. A local server that returns Drive's quota page gives the message, both at the first request and partway through a file. Each test fails when its behavior is broken on purpose.pnpm checkpasses.