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

[NIT-2642] Support latest snapshot with tar.gz extension #2446

Merged
merged 3 commits into from
Jul 4, 2024

Conversation

gligneul
Copy link
Contributor

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.

When getting the latest snapshot with the --init.latest option, the
latest file should contain the archive file path or the archive file
url instead of the archive year-week date.
@gligneul gligneul self-assigned this Jun 28, 2024
@cla-bot cla-bot bot added the s Automatically added by the CLA bot if the creator of a PR is registered as having signed the CLA. label Jun 28, 2024
@gligneul gligneul marked this pull request as ready for review June 28, 2024 14:34
Copy link
Member

@Tristan-Wilson Tristan-Wilson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gligneul gligneul merged commit 44c00e5 into master Jul 4, 2024
11 checks passed
@gligneul gligneul deleted the gligneul/latest-url branch July 4, 2024 12:51
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design-approved s Automatically added by the CLA bot if the creator of a PR is registered as having signed the CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants