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

Add CI for synapse_port_db #6140

Merged
merged 21 commits into from
Oct 28, 2019
Merged

Add CI for synapse_port_db #6140

merged 21 commits into from
Oct 28, 2019

Conversation

babolivier
Copy link
Contributor

@babolivier babolivier commented Oct 1, 2019

Paired with matrix-org/pipelines#9

This PR adds:

  • a test sqlite database
  • a configuration file for the sqlite database
  • a configuration file for a postgresql database (using the credentials in .buildkite/docker-compose.pyXX.pgXX.yaml)

as well as a new script named .buildkite/scripts/test_synapse_port_db.sh that:

  1. installs Synapse
  2. updates the test sqlite database to the latest schema and runs background updates on it
  3. creates an empty postgresql database
  4. run the synapse_port_db script to migrate the test sqlite database to the empty postgresql database (with coverage)

Step 2 is done via a new script located at scripts-dev/update_database.

The test sqlite database is extracted from a SyTest run, so that it can be considered as an actual homeserver's database with actual data in it.

@babolivier babolivier force-pushed the babolivier/port_db_ci branch 3 times, most recently from 6d062d3 to f370c32 Compare October 3, 2019 18:11
@babolivier babolivier marked this pull request as ready for review October 4, 2019 16:51
@babolivier babolivier requested a review from a team October 4, 2019 16:52
@babolivier babolivier force-pushed the babolivier/port_db_ci branch from c191072 to 0b68a54 Compare October 7, 2019 17:19
@erikjohnston
Copy link
Member

Can you give us a commit range to review or something please? There are too many commits to figure out whats going on without some help :)

@erikjohnston erikjohnston removed the request for review from a team October 8, 2019 10:09
@babolivier
Copy link
Contributor Author

babolivier commented Oct 8, 2019

Can you give us a commit range to review or something please? There are too many commits to figure out whats going on without some help :)

Right, sorry, I assumed this review would come after the ones on the PRs this one is built on top of. A list of all commits specific to this PR can be seen here, and for maximum clarity this PR only changes the following files:

  • .buildkite/scripts/test_synapse_port_db.sh (creation)
  • .buildkite/postgres-config.yaml (creation)
  • .buildkite/sqlite-config.yaml (creation)
  • .buildkite/test_db.db (creation)
  • scripts-dev/create_postgres_db (creation)
  • scripts-dev/update_database (creation)
  • tox.ini (addition of the synapse_port_db test environment)

None of the other PRs edit these files, so the reviewer can review just the changes to these files, without worrying about whether they've been changed by this PR or another.

@babolivier babolivier requested a review from a team October 8, 2019 10:20
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.

a few comments; it kinda needs #6102 to land before it gets a proper review.

tox.ini Outdated Show resolved Hide resolved
scripts-dev/create_postgres_db Outdated Show resolved Hide resolved
scripts-dev/update_database Show resolved Hide resolved
@babolivier babolivier requested a review from a team October 22, 2019 17:16
@richvdh
Copy link
Member

richvdh commented Oct 23, 2019

pending merge of #6102

@richvdh richvdh removed the request for review from a team October 23, 2019 13:34
@babolivier babolivier force-pushed the babolivier/port_db_ci branch from d9efe03 to 05463e4 Compare October 23, 2019 14:50
@babolivier babolivier requested a review from a team October 23, 2019 15:01
@babolivier
Copy link
Contributor Author

#6102 has been merged; I've rebased the branch on develop so it doesn't pull any more commit than it should.

changelog.d/6140.bugfix Outdated Show resolved Hide resolved
.buildkite/postgres-config.yaml Show resolved Hide resolved
.buildkite/scripts/test_synapse_port_db.sh Outdated Show resolved Hide resolved
.buildkite/sqlite-config.yaml Show resolved Hide resolved
.buildkite/scripts/test_synapse_port_db.sh Outdated Show resolved Hide resolved
.buildkite/scripts/test_synapse_port_db.sh Outdated Show resolved Hide resolved
scripts-dev/update_database Outdated Show resolved Hide resolved
scripts-dev/update_database Outdated Show resolved Hide resolved
scripts-dev/update_database Outdated Show resolved Hide resolved
scripts-dev/update_database Show resolved Hide resolved
.buildkite/postgres-config.yaml Outdated Show resolved Hide resolved
.buildkite/scripts/test_synapse_port_db.sh Show resolved Hide resolved
.buildkite/scripts/test_synapse_port_db.sh Outdated Show resolved Hide resolved
scripts-dev/update_database Show resolved Hide resolved
@babolivier babolivier requested a review from a team October 28, 2019 17:21
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.

lgtm!

@babolivier babolivier merged commit 14504ad into develop Oct 28, 2019
richvdh pushed a commit to matrix-org/pipelines that referenced this pull request Oct 28, 2019
Paired with matrix-org/synapse#6140

Defines the Synapse CI jobs to run the tox environment added in matrix-org/synapse#6140
@richvdh richvdh mentioned this pull request Oct 28, 2019
babolivier pushed a commit that referenced this pull request Sep 1, 2021
* commit '14504ad57':
  Add CI for synapse_port_db (#6140)
@babolivier babolivier deleted the babolivier/port_db_ci 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.

3 participants