Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Update worker docs to update preferred settings for pusher and federation_sender #14493

Merged
merged 10 commits into from
Dec 2, 2022
6 changes: 6 additions & 0 deletions docs/workers.md
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,8 @@ worker application type.

### `synapse.app.pusher`

**Deprecated as of Synapse v1.74.** [Use `synapse.app.generic_worker` with the `pusher_instances` map instead](usage/configuration/config_documentation.md#pusher_instances).
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This I'm really not sure how to handle. Is it really deprecated? It's not mentioned anywhere in source that is important outside of backwards-compatibility and the contrib folder. The one has to stay until the 'go-ahead' is given to rip it out, and the other...am I allowed to edit other people's work in this case? I don't want to step on any toes...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

(I gave it a longer window than I did for the last PR, just in case)

Copy link
Contributor

Choose a reason for hiding this comment

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

IMO in a normal case deperactions are announced in changelog and upgrade notes. This can perhaps be done in this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I saw user_dir and appservice and thought it should be duplicated in a like manner.

Copy link
Contributor

Choose a reason for hiding this comment

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

the next version is v1.73.0 :-).

Otherwise, yes, you just note it here and add to the docs/upgrade.md — you should see an existing section for anything that's already deprecated.

Also, I would make the changelog fragment a .removal (full title is 'Removals and deprecations', so it does fit) and change it to say what you're deprecating, rather than just being a pure doc change.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Here's the deal: the functionality hasn't changed and there are a bunch of the synapse.app.* that are technically part of that change. I didn't want to make it a full on 'removal' until all the apps are ready(working on media_repository now) and all the tests are updated before doing a blanket "You all need to change your settings now because this is going away in XX weeks". Plus, once it's actually ready and documented, I'll need to know how long is acceptable to add that to the doc/upgrade.md change. I'm not sure how long to give for that. I will change this to reflect Synapse v1.73 for this PR, but the other....I think that's a bit out of scope for now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Rudimentary timeline:

  1. This change to docs.
  2. Update tests relevant to this doc change.
  3. Update other tests that are already including apps.* that were previously deprecated(like appservice, user_dir, client_reader, etc) and need their settings adjusted.
  4. Fix synapse.app.media_repository in tests.
  5. Update settings configuration logic for synapse.app.media_repository to handle new methods.
  6. Fix synapse.app.media_repository in tests, again.
  7. Triple check nothing got orphaned.
  8. (Profit???)
  9. Blanket update in docs/workers.md and docs/upgrade.md saying these are being retired and to update settings to new recommended options. Probably going to see a whole restructure of how docs/workers.md is written out as right now it's a bunch of words and almost needs an index or a table of contents(for the record, not looking forward to this part). Maybe break out the 'Historical Apps' section into a separate page that gets linked to. I'll need a respectable schedule for this. Six months, 4 weeks, something. Point being that doing this all at once and giving them a deadline will mean no disgruntled admins having to keep changing things a bunch of times, just the once.
  10. Add log warnings as a visual reminder that they need to update their settings. Prior art is available.
  11. There's more, like dealing with synctl.py and it's reference to synapse.app.homeserver but I think that's the bulk of it.

Copy link
Contributor

Choose a reason for hiding this comment

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

well, we've missed v1.73 anyway (my fault for being off, sorry).
I'd be reluctant to say 'Deprecated since v1.xx' if we're not going to make noise about it in the upgrade notes at the same time: we don't expect admins to read random pieces of documentation periodically but we are happy to expect them to read the upgrade notes. (So in a way, we haven't really been honest about giving fair warning before removing it if we 'quietly' deprecate it this way.)
That said, I agree that it'd be good to knock them all out at once, so if some of them aren't ready, let's wait. In that case, I'd rephrase these changes to the documentation as 'suggestions' rather than calling them deprecated — perhaps saying they are likely to be deprecated in the future and we don't recommend their use for new installations.
Once we have all the worker types converted, then it's fair to deprecate them all and announce it in the upgrade notes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

How about this?
a9efe4d


Handles sending push notifications to sygnal and email. Doesn't handle any
REST endpoints itself, but you should set
[`start_pushers: false`](usage/configuration/config_documentation.md#start_pushers) in the
Expand Down Expand Up @@ -541,6 +543,8 @@ Note this worker cannot be load-balanced: only one instance should be active.

### `synapse.app.federation_sender`

**Deprecated as of Synapse v1.74.** [Use `synapse.app.generic_worker` with the `federation_sender_instances` map instead](usage/configuration/config_documentation.md#federation_sender_instances).

Handles sending federation traffic to other servers. Doesn't handle any
REST endpoints itself, but you should set
[`send_federation: false`](usage/configuration/config_documentation.md#send_federation)
Expand Down Expand Up @@ -637,7 +641,9 @@ equivalent to `synapse.app.generic_worker`:
* `synapse.app.client_reader`
* `synapse.app.event_creator`
* `synapse.app.federation_reader`
* `synapse.app.federation_sender`
* `synapse.app.frontend_proxy`
* `synapse.app.pusher`
* `synapse.app.synchrotron`


Expand Down