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

show CDN invalidation status in release-pages #1877

Closed
syphar opened this issue Oct 13, 2022 · 5 comments
Closed

show CDN invalidation status in release-pages #1877

syphar opened this issue Oct 13, 2022 · 5 comments

Comments

@syphar
Copy link
Member

syphar commented Oct 13, 2022

This is a follow-up to #1552.

According to the Cloudfront documentation invalidations can take up to 15 minutes. Our tests showed around 10-13 minutes.

This can be confusing especially for crate maintainers (but also for users) since the build is finished and is shown on the release-page, while /latest/ URLs can still show the old release. URLs with the specific version in them will directly work.

So we should show an icon / a text for releases on the release-lists that tells us if there is a pending cloudfront invalidation for this crate.

A simple solution would be to just show the deploying marker when there is any finished build younger than 15 minutes for this crate. Caveat: this won't be 100% correct for yanks.

Another solution would be to use the CloudFront ListInvalidations API to get active invalidations, then parse the crate-name out of the paths in that invalidation, and mark the affected crates from these.

@syphar
Copy link
Member Author

syphar commented Oct 13, 2022

cc @jyn514 @jsha if you have anything to add

@Nemo157
Copy link
Member

Nemo157 commented Oct 13, 2022

I was wondering if this might have some overlap with UI for #826, but no I think that would just maybe add a similar icon on the queue-page showing the currently building crate and not impact the releases-page.

(Caching and invalidation as a whole probably affects it and means we wouldn't want to add any UI for it to the main crate page since it would normally not even be invalidated before the build completes and starts another invalidation).

@syphar
Copy link
Member Author

syphar commented Oct 13, 2022

short update:

  • ListInvalidations only gives us the ID & a status (InProgress or Completed), so no paths.
  • to get these we would have to call GetInvalidation for each invalidation, which would make it too slow to check active invalidations while generating the release-list
  • IMO this would only work by keeping track of the created invalidations in the database,
  • and/or when we build a separate view for this which only shows the status for a single crate

I lean towards starting with a simple visual marker <20 minutes after the build is finished

@syphar
Copy link
Member Author

syphar commented Oct 14, 2022

while thinking more I'm jumping back and forth between solutions using the actual invalidation status and the workaround.

We'll probably need some more sophisticated logic when we hit quotas (#1871) , and/or some monitoring around the parallel invalidation requests.

@syphar
Copy link
Member Author

syphar commented Feb 4, 2023

Since #1961 we show the actual in-progress invalidations on our build-queue page.

Coming from the original motivation of this issue, I'll close it now.

If we feel like we want to show a status on other release pages we can revisit this topic.

@syphar syphar closed this as completed Feb 4, 2023
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

No branches or pull requests

2 participants