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

allow no trailing slash latest snapshot link #325

Merged
merged 2 commits into from
Nov 2, 2023
Merged

Conversation

LesnyRumcajs
Copy link
Member

Summary of changes
Changes introduced in this pull request:

  • allow links without trailing slashes. Both wget https://forest-archive.chainsafe.dev/latest/calibnet and wget https://forest-archive.chainsafe.dev/latest/calibnet/ should work now.

Reference issue to close (if applicable)

Closes #286

Other information and links

@LesnyRumcajs LesnyRumcajs requested a review from a team as a code owner October 31, 2023 17:03
@LesnyRumcajs LesnyRumcajs requested review from hanabi1224 and jdjaustin and removed request for a team October 31, 2023 17:03
Copy link
Contributor

@lemmih lemmih left a comment

Choose a reason for hiding this comment

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

Are you sure this will support both paths?

@LesnyRumcajs
Copy link
Member Author

Are you sure this will support both paths?

Interestingly, wrangler had a peculiar behaviour with only:

    { pattern = "forest-archive.chainsafe.dev/latest/calibnet", zone_name = "chainsafe.dev" },

For /calibnet/ it dismissed the preview bucket and downloaded directly from the prod bucket.

❯ wget http://127.0.0.1:46647/latest/calibnet/
--2023-11-02 10:26:43--  http://127.0.0.1:46647/latest/calibnet/
Connecting to 127.0.0.1:46647... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2666784294 (2.5G) [application/zstd]

while the /calibnet downloaded from the preview bucket correctly.

❯ wget http://127.0.0.1:46647/latest/calibnet
--2023-11-02 10:35:27--  http://127.0.0.1:46647/latest/calibnet
Connecting to 127.0.0.1:46647... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2065053670 (1.9G) [application/zstd]

Now, both are downloading from the same bucket. Thanks for doubting it; I only checked that it downloads "some archives" before.

@lemmih lemmih merged commit 61d5548 into main Nov 2, 2023
6 checks passed
@LesnyRumcajs LesnyRumcajs deleted the allow-no-trailing-slash branch January 22, 2024 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

snapshot endpoint requires trailing slash
3 participants