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

Disable federation when using SQLite by default #5078

Closed
wants to merge 36 commits into from

Conversation

babolivier
Copy link
Contributor

Fixes #2917

@codecov
Copy link

codecov bot commented Apr 18, 2019

Codecov Report

Merging #5078 into develop will increase coverage by 0.01%.
The diff coverage is 60%.

@@             Coverage Diff             @@
##           develop    #5078      +/-   ##
===========================================
+ Coverage    61.72%   61.73%   +0.01%     
===========================================
  Files          335      335              
  Lines        34512    34517       +5     
  Branches      5672     5673       +1     
===========================================
+ Hits         21301    21308       +7     
+ Misses       11683    11678       -5     
- Partials      1528     1531       +3

Copy link
Contributor

@aaronraimist aaronraimist left a comment

Choose a reason for hiding this comment

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

On one hand I like the easy enable_federation option instead of telling people to set the whitelist to nothing or their own domain to disable federation.

On the other hand I wish the name of the config option had more of the warning built in to the name of the config, maybe almost as extreme as yes_i_want_my_server_to_catch_on_fire. I feel like a lot of people don't read the comments, or they use some package that doesn't provide the full comment above the command, just a huge list of commands.

synapse/config/database.py Outdated Show resolved Hide resolved
synapse/config/database.py Outdated Show resolved Hide resolved
@babolivier babolivier marked this pull request as ready for review April 18, 2019 17:38
@babolivier babolivier requested a review from a team April 18, 2019 17:38
@Half-Shot
Copy link
Collaborator

Question for maintainers: Are we also making the packaging switch to postgres by default, otherwise we are going to be shipping a synapse that won't federate by default?

@aaronraimist
Copy link
Contributor

^ is #4270 / #2317 btw

Copy link
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

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

So I have two main concerns with this.

Firstly, it's going to break all the existing deployments out there which use sqlite and federation and we're going to have a lot of confused users. We can try to mitigate that with warnings in the upgrade notes, but most people don't read them, and a lot will receive this as an automated update, so we'd need to put something in the debian news file too. In any case I'm not sure we should be making this sort of change with a minor release. One to discuss with the team I think.

Secondly, I don't think we can do this until we fix #4877, otherwise we're going to have even more users with broken databases.

synapse/config/database.py Outdated Show resolved Hide resolved
synapse/config/database.py Outdated Show resolved Hide resolved
synapse/config/database.py Outdated Show resolved Hide resolved
tests/utils.py Outdated Show resolved Hide resolved
synapse/config/database.py Outdated Show resolved Hide resolved
@richvdh
Copy link
Member

richvdh commented Apr 24, 2019

Question for maintainers: Are we also making the packaging switch to postgres by default, otherwise we are going to be shipping a synapse that won't federate by default?

I'm not too uncomfortable with shipping such a synapse - you have to do a few extra steps to get federation working correctly as it is. So I think we should treat the decision on whether to switch to postgres by default as a separate question, which as @aaronraimist says, is #4270 / #2317.

@babolivier
Copy link
Contributor Author

Right, so I agree with the fact that it shouldn't be merged right away, especially not before we fix synapse_port_db. I suggest we just focus on getting this in shape right now then let it hang until #4877 is closed, which would then be a good time to have that discussion. wdyt?

synapse/config/server.py Outdated Show resolved Hide resolved
tests/utils.py Outdated Show resolved Hide resolved
synapse/config/server.py Outdated Show resolved Hide resolved
synapse/config/server.py Outdated Show resolved Hide resolved
@babolivier babolivier requested a review from a team May 3, 2019 14:31
Copy link
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

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

couple of minor nits. Still not sure what we're going to do with this PR, though. We can't land it, and I fear it will bit-rot.

#
# If you want to use federation with SQLite regardless, you can
# uncomment the line below. This option defaults to 'false' when using
# SQLite and 'true' otherwise. It is ignored when using PostgreSQL.
Copy link
Member

Choose a reason for hiding this comment

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

if it is ignored when using postgresql, surely it doesn't matter what it defaults to? I think you could remove the whole sentence about the default: it's pretty obvious what the default is from the context.

# If you want to use federation with SQLite regardless, you can
# uncomment the line below. This option defaults to 'false' when using
# SQLite and 'true' otherwise. It is ignored when using PostgreSQL.
#
Copy link
Member

Choose a reason for hiding this comment

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

spare line is spare

@richvdh
Copy link
Member

richvdh commented Jul 18, 2019

closing for now, since it's bitrotting and not being worked on. we can reopen when work resumes.

@richvdh richvdh closed this Jul 18, 2019
@babolivier babolivier deleted the babolivier/sqlite_federation branch September 27, 2019 09:49
@aaronraimist
Copy link
Contributor

#4877 is fixed now

@babolivier babolivier restored the babolivier/sqlite_federation branch October 28, 2019 17:47
@aaronraimist
Copy link
Contributor

Can we reopen this?

@richvdh
Copy link
Member

richvdh commented Nov 21, 2019

well, it's still bitrotten. happy to reopen if it gets brought up to date.

@babolivier babolivier deleted the babolivier/sqlite_federation branch October 28, 2021 15:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants