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

Support proxying moderation through to appview #1233

Merged
merged 18 commits into from
Aug 4, 2023
Merged

Conversation

devinivy
Copy link
Collaborator

This adds support to the PDS for proxying moderation reports and actions to an appview.

  • Takedowns and their reversals are in turn applied on the PDS.
  • Resulting labels and their reversals are applied on the PDS.
  • PDS-specific details such as invite status are hydrated onto appview responses.

try {
await transact
} catch (err) {
req.log.error(
Copy link
Collaborator

Choose a reason for hiding this comment

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

what's the recovery from this?

now redsky will show that something is taken down but that isn't reflected on the PDS, right?

this is probably rare, but we should have a plan in mind for how to deal with it 🤔
would it make sense to fire of a reversal if the txn fails on the PDS? to attempt to keep state in sync? (of course that request can fail as well 😅

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's a good question. I was imagining we'd monitor these errors closely and handle them in a high-touch way. My hunch is that if this happens it's probably not a temporary issue, and something needs fixing.

await sc.createAccount('carol', users.carol)
await sc.createAccount('dan', users.dan)
export default async (sc: SeedClient, invite?: { code: string }) => {
await sc.createAccount('alice', { ...users.alice, inviteCode: invite?.code })
Copy link
Collaborator

Choose a reason for hiding this comment

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

nice 👌

Copy link
Collaborator

@dholms dholms left a comment

Choose a reason for hiding this comment

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

code looks good - i'm a bit nervous about half-applied actions

Ideally we don't get into a bad state, but that might be unrealistic & I don't want to overengineer this just for this transition period.

I think at the least we need a good story about how the client will be notified of something going haywire & how we can recover from that state 🤔

I supposed one option would just be to somewhat rigorously monitor that error log so that we can manually patch it up if it fails (should basically never happen)

@devinivy devinivy merged commit 3f3ae4c into main Aug 4, 2023
@devinivy devinivy deleted the pds-to-appview-mod branch August 4, 2023 20:06
mloar pushed a commit to mloar/atproto that referenced this pull request Sep 26, 2023
* in-progress work on proxying moderation to appview

* tidy

* proxy reports pds to appview, misc tidy

* test proxying of moderation endpoints

* remove report action fkeys from pds for appview sync

* test appview/pds moderation synchronization

* tidy

* tidy

* fix admin proxy tests, build

* temp disable migration

* rm relative @atproto/api imports

* fix a couple more relative imports

* tidy

* reenable migration, comment contents temporarily

* fully enable migration, remove build, misc test fixes

---------

Co-authored-by: dholms <[email protected]>
mloar pushed a commit to mloar/atproto that referenced this pull request Nov 15, 2023
* in-progress work on proxying moderation to appview

* tidy

* proxy reports pds to appview, misc tidy

* test proxying of moderation endpoints

* remove report action fkeys from pds for appview sync

* test appview/pds moderation synchronization

* tidy

* tidy

* fix admin proxy tests, build

* temp disable migration

* rm relative @atproto/api imports

* fix a couple more relative imports

* tidy

* reenable migration, comment contents temporarily

* fully enable migration, remove build, misc test fixes

---------

Co-authored-by: dholms <[email protected]>
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