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

add download endpoint for rustdoc archive #1865

Merged
merged 4 commits into from
Oct 15, 2022

Conversation

syphar
Copy link
Member

@syphar syphar commented Sep 30, 2022

This resolves #174 for offline documentation readers.

The tag specifications & static domain were already set up with @Mark-Simulacrum , see here.

A working download can be seen here, while other crates / versions would get a 403 / forbidden error.

note for deploy:

we need to check with @pietroalbini if the access key on the docs.rs server has the needed permissions:

  • s3:PutObjectTagging on the bucket
  • create-invalidation for the static.docs.rs cloudfront distribution

@syphar
Copy link
Member Author

syphar commented Sep 30, 2022

r? @Nemo157 @jyn514

@github-actions github-actions bot added the S-waiting-on-review Status: This pull request has been implemented and needs to be reviewed label Sep 30, 2022
@syphar
Copy link
Member Author

syphar commented Sep 30, 2022

also I imagine in the future we would also run the JSON-build and offer a download too.

@syphar syphar added the S-waiting-on-author Status: This PR is incomplete or needs to address review comments label Oct 1, 2022
@syphar
Copy link
Member Author

syphar commented Oct 1, 2022

invalidation is incomplete, I would like to fix it when #1864 is reviewed & merged & this PR is rebased on it.

I would love a review on this PR anyways

@pietroalbini
Copy link
Member

Tweaked the permissions.

@Kapeli Kapeli mentioned this pull request Oct 4, 2022
@syphar syphar force-pushed the downloadable-docs branch 3 times, most recently from 517d344 to 8cb6bf0 Compare October 8, 2022 16:38
@syphar syphar force-pushed the downloadable-docs branch from 8cb6bf0 to 7f2074f Compare October 8, 2022 16:53
@syphar syphar removed the S-waiting-on-author Status: This PR is incomplete or needs to address review comments label Oct 8, 2022
src/cdn.rs Outdated Show resolved Hide resolved
@syphar
Copy link
Member Author

syphar commented Oct 8, 2022

after #1864 was merged & deployed I rebased & updated this PR.

So this would be ready for review, ping @Nemo157 @jsha ?

Any comments about the design @jyn514 ?

src/cdn.rs Outdated Show resolved Hide resolved
src/config.rs Outdated Show resolved Hide resolved
@syphar
Copy link
Member Author

syphar commented Oct 10, 2022

@Nemo157 I updated the branch according to your comments. Ready for another round :)

@syphar syphar force-pushed the downloadable-docs branch from 6bdcd9a to 7e2ae13 Compare October 10, 2022 17:10
src/config.rs Outdated Show resolved Hide resolved
@Nemo157
Copy link
Member

Nemo157 commented Oct 15, 2022

I've tested this locally with minio and the download is working and I can see the tag being applied when I hit the download endpoint:

> mcli tag list docsrs/rust-docs-rs/rustdoc/bpaf/0.6.1.zip
Name                     : http://localhost:9000/rust-docs-rs/rustdoc/bpaf/0.6.1.zip ()
static-cloudfront-access : allow

@syphar syphar merged commit ebd47b1 into rust-lang:master Oct 15, 2022
@syphar syphar deleted the downloadable-docs branch October 15, 2022 13:18
@github-actions github-actions bot added S-waiting-on-deploy This PR is ready to be merged, but is waiting for an admin to have time to deploy it and removed S-waiting-on-review Status: This pull request has been implemented and needs to be reviewed labels Oct 15, 2022
@syphar syphar added S-waiting-on-deploy This PR is ready to be merged, but is waiting for an admin to have time to deploy it and removed S-waiting-on-deploy This PR is ready to be merged, but is waiting for an admin to have time to deploy it labels Oct 15, 2022
@syphar syphar removed the S-waiting-on-deploy This PR is ready to be merged, but is waiting for an admin to have time to deploy it label Nov 5, 2022
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.

Downloadable docs
3 participants