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

fix: repeatedly fetching posts, improve federation logic #2168

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

DataDrivenMD
Copy link
Contributor

@DataDrivenMD DataDrivenMD commented Jun 13, 2023

The post/status caching logic is written in a way that triggers multiple fetch requests for the same post in rapid succession, which becomes a problem when rate-limits come into play as well as when there are network bottlenecks (such as those illustrated here). The issue is further exacerbated when the post is authored by someone that has been blocked by the user (or vice versa), or when the remote host is down.

This PR improves fetching logic for posts by caching error response codes, and using that information to decide whether to retry fetch attempts. This PR also does a better job of handling requests for remote posts that:

  • reference status.uri instead of local status.id (erroneously) or as a side effect of preview card rendering logic, and
  • when permalinks request remoted posts that have not yet been federated to the host instance (or that were purged as part of regular maintenance)

**NOTE** This is a resubmission of [PR elk-zone#1494](elk-zone#1494), which was inadvertently closed by a force-push

- [X] Add Cloudflare Pages to deployment guide
- [X] Refactor Netlify deployment guide
- [X] Add Getting Started page to the deployment guide that covers topics that are common/shared by multiple deployment types
- [X] Add cloudflare_pages.yml workflow file (set to workspace/manual trigger)
@stackblitz
Copy link

stackblitz bot commented Jun 13, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@netlify
Copy link

netlify bot commented Jun 13, 2023

Deploy Preview for elk-zone ready!

Name Link
🔨 Latest commit 876a731
🔍 Latest deploy log https://app.netlify.com/sites/elk-zone/deploys/6489e9d28947eb0008ff55fd
😎 Deploy Preview https://deploy-preview-2168--elk-zone.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Jun 13, 2023

Deploy Preview for elk-docs ready!

Name Link
🔨 Latest commit 876a731
🔍 Latest deploy log https://app.netlify.com/sites/elk-docs/deploys/6489e9d203151a0008f10891
😎 Deploy Preview https://deploy-preview-2168--elk-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@ryanccn
Copy link
Member

ryanccn commented Jul 11, 2023

You have commits from #1882 here :p

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.

2 participants