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

[ci] Redirect sphinx-gallery URLs to S3 #11839

Merged
merged 1 commit into from
Jun 30, 2022
Merged

Conversation

driazati
Copy link
Member

@driazati driazati commented Jun 22, 2022

This hooks into urllib so we can redirect certain URLs used in CI to more reliable copies in S3. This method catches everything, even urls hidden inside third-party modules (like oneflow). This makes it so CI docs run with consistent speed and without the failures below. Items can be uploaded by any committer via this workflow. The S3 bucket is public, so users can still download the items if they want to exactly reproduce CI.

Fixes #11918, fixes #11919, fixes #11811

cc @Mousius @areusch

@driazati driazati force-pushed the sg_redirect branch 5 times, most recently from a56f818 to 334417c Compare June 23, 2022 18:34
driazati added a commit to driazati/tvm that referenced this pull request Jun 23, 2022
This adds a `workflow_dispatch` only GitHub Action that committers can
use to upload files to the CI bucket for use like in apache#11839
driazati added a commit to driazati/tvm that referenced this pull request Jun 23, 2022
This adds a `workflow_dispatch` only GitHub Action that committers can
use to upload files to the CI bucket for use like in apache#11839
driazati added a commit to driazati/tvm that referenced this pull request Jun 23, 2022
This adds a `workflow_dispatch` only GitHub Action that committers can
use to upload files to the CI bucket for use like in apache#11839
driazati added a commit to driazati/tvm that referenced this pull request Jun 23, 2022
This adds a `workflow_dispatch` only GitHub Action that committers can
use to upload files to the CI bucket for use like in apache#11839
driazati added a commit to driazati/tvm that referenced this pull request Jun 23, 2022
This adds a `workflow_dispatch` only GitHub Action that committers can
use to upload files to the CI bucket for use like in apache#11839
driazati added a commit to driazati/tvm that referenced this pull request Jun 23, 2022
This adds a `workflow_dispatch` only GitHub Action that committers can
use to upload files to the CI bucket for use like in apache#11839
driazati added a commit to driazati/tvm that referenced this pull request Jun 23, 2022
This adds a `workflow_dispatch` only GitHub Action that committers can
use to upload files to the CI bucket for use like in apache#11839
driazati added a commit to driazati/tvm that referenced this pull request Jun 23, 2022
This adds a `workflow_dispatch` only GitHub Action that committers can
use to upload files to the CI bucket for use like in apache#11839
driazati added a commit that referenced this pull request Jun 24, 2022
This adds a `workflow_dispatch` only GitHub Action that committers can use to upload files to the CI bucket for use like in #11839
@github-actions
Copy link
Contributor

Built docs for commit 81d748c can be found here.

@driazati driazati force-pushed the sg_redirect branch 2 times, most recently from f7675cf to 5aa13b2 Compare June 24, 2022 20:34
@github-actions
Copy link
Contributor

Built docs for commit 5aa13b2 can be found here.

@driazati driazati force-pushed the sg_redirect branch 6 times, most recently from 79dbb9f to 72a8b4c Compare June 24, 2022 23:52
zxybazh pushed a commit to zxybazh/tvm that referenced this pull request Jun 26, 2022
This adds a `workflow_dispatch` only GitHub Action that committers can use to upload files to the CI bucket for use like in apache#11839
@driazati driazati marked this pull request as ready for review June 27, 2022 23:18
Copy link
Member

@guberti guberti left a comment

Choose a reason for hiding this comment

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

Big fan of this PR! Thanks for the change!

Copy link
Contributor

@areusch areusch left a comment

Choose a reason for hiding this comment

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

thanks @driazati

msg += f"no file\n"

if base is None:
hook_script_dir = Path.cwd().resovle()
Copy link
Contributor

Choose a reason for hiding this comment

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

typo

raise RuntimeError(f"Directory {hook_script_dir} does not exist:\n{msg}")

# Import the hook and start it up (it's not included here directly to avoid
# keeping a database of URLs inside the tvm Python package
Copy link
Contributor

Choose a reason for hiding this comment

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

why not just make the database into a datafile? e.g. load from JSON or ast.literal_eval()?

Copy link
Member Author

Choose a reason for hiding this comment

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

that seems like the complexity is the same as this method (i.e. find a file, load it up) but more limited in functionality. I updated the list to de-duplicate the S3 bucket name to make it clearer the use of keeping it all Python

@driazati driazati force-pushed the sg_redirect branch 2 times, most recently from 2bb627a to 1d2936d Compare June 28, 2022 15:44
@github-actions github-actions bot requested a review from Mousius June 28, 2022 15:46
@driazati driazati force-pushed the sg_redirect branch 4 times, most recently from 8d178c5 to 6377c7e Compare June 28, 2022 20:24
@github-actions
Copy link
Contributor

Built docs for commit ef09a9c can be found here.

@driazati driazati requested a review from areusch June 29, 2022 14:52
@areusch areusch merged commit c0f4bf7 into apache:main Jun 30, 2022
driazati added a commit to driazati/tvm that referenced this pull request Jun 30, 2022
This follows on apache#11839 to apply it outside of docs and to tests running under pytest instead
blackkker pushed a commit to blackkker/tvm that referenced this pull request Jul 7, 2022
This adds a `workflow_dispatch` only GitHub Action that committers can use to upload files to the CI bucket for use like in apache#11839
blackkker pushed a commit to blackkker/tvm that referenced this pull request Jul 7, 2022
Co-authored-by: driazati <driazati@users.noreply.github.com>
areusch pushed a commit that referenced this pull request Jul 14, 2022
This follows on #11839 to apply it outside of docs and to tests running under pytest instead

Co-authored-by: driazati <driazati@users.noreply.github.com>
masahi pushed a commit to masahi/tvm that referenced this pull request Jul 15, 2022
Co-authored-by: driazati <driazati@users.noreply.github.com>
xinetzone pushed a commit to daobook/tvm that referenced this pull request Nov 25, 2022
This follows on apache#11839 to apply it outside of docs and to tests running under pytest instead

Co-authored-by: driazati <driazati@users.noreply.github.com>
mikeseven pushed a commit to mikeseven/tvm that referenced this pull request Sep 27, 2023
This adds a `workflow_dispatch` only GitHub Action that committers can use to upload files to the CI bucket for use like in apache#11839
mikeseven pushed a commit to mikeseven/tvm that referenced this pull request Sep 27, 2023
Co-authored-by: driazati <driazati@users.noreply.github.com>
mikeseven pushed a commit to mikeseven/tvm that referenced this pull request Sep 27, 2023
This follows on apache#11839 to apply it outside of docs and to tests running under pytest instead

Co-authored-by: driazati <driazati@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants