[NIT-2642] Support latest snapshot with tar.gz extension #2446
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.
There is a small issue with the nitro code that finds the latest snapshot URL: it has the file extension hardcoded to .tar. So, if the DevOps team wants to use .tar.gz instead, the code won't work. Nitro can already handle unarchiving zipped files, so it is just a matter of fixing the latest URL generation.
To recap, we generate the URL by looking up a date in the latest file. For instance, for the sepolia-rollup archive, the server should have a file /sepolia-rollup/archive-latest.txt containing the year and week (e.g., 2024/20). The resulting latest URL will be /sepolia-rollup/2024/20/archive.tar.
The proposed solution is:
Change the latest URL file to contain the file's path or full URL of the file instead of just the year and week. In the example above, the latest file contents would be /sepolia-rollup/2024/20/archive.tar.gz.