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

Remove references to BuildKite in favour of GitHub Actions #10573

Merged
merged 14 commits into from
Aug 12, 2021
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions .buildkite/.env

This file was deleted.

35 changes: 0 additions & 35 deletions .buildkite/merge_base_branch.sh

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
# CI's Docker setup at the point where this file is considered.
server_name: "localhost:8800"

signing_key_path: ".buildkite/test.signing.key"
signing_key_path: ".ci/test.signing.key"

report_stats: false

database:
name: "psycopg2"
args:
user: postgres
host: postgres
host: localhost
password: postgres
database: synapse

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
# We use "postgres" as a database because it's bound to exist and the "synapse" one
# doesn't exist yet.
db_conn = psycopg2.connect(
user="postgres", host="postgres", password="postgres", dbname="postgres"
user="postgres", host="localhost", password="postgres", dbname="postgres"
)
db_conn.autocommit = True
cur = db_conn.cursor()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

# this script is run by buildkite in a plain `bionic` container; it installs the
# this script is run by GitHub Actions in a plain `bionic` container; it installs the
# minimal requirements for tox and hands over to the py3-old tox environment.

set -ex
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,22 @@ pip install -e .
echo "--- Generate the signing key"

# Generate the server's signing key.
python -m synapse.app.homeserver --generate-keys -c .buildkite/sqlite-config.yaml
python -m synapse.app.homeserver --generate-keys -c .ci/sqlite-config.yaml

echo "--- Prepare test database"

# Make sure the SQLite3 database is using the latest schema and has no pending background update.
scripts-dev/update_database --database-config .buildkite/sqlite-config.yaml
scripts-dev/update_database --database-config .ci/sqlite-config.yaml

# Create the PostgreSQL database.
./.buildkite/scripts/postgres_exec.py "CREATE DATABASE synapse"
.ci/scripts/postgres_exec.py "CREATE DATABASE synapse"

echo "+++ Run synapse_port_db against test database"
coverage run scripts/synapse_port_db --sqlite-database .buildkite/test_db.db --postgres-config .buildkite/postgres-config.yaml
coverage run scripts/synapse_port_db --sqlite-database .ci/test_db.db --postgres-config .ci/postgres-config.yaml

# We should be able to run twice against the same database.
echo "+++ Run synapse_port_db a second time"
coverage run scripts/synapse_port_db --sqlite-database .buildkite/test_db.db --postgres-config .buildkite/postgres-config.yaml
coverage run scripts/synapse_port_db --sqlite-database .ci/test_db.db --postgres-config .ci/postgres-config.yaml

#####

Expand All @@ -44,14 +44,14 @@ coverage run scripts/synapse_port_db --sqlite-database .buildkite/test_db.db --p
echo "--- Prepare empty SQLite database"

# we do this by deleting the sqlite db, and then doing the same again.
rm .buildkite/test_db.db
rm .ci/test_db.db

scripts-dev/update_database --database-config .buildkite/sqlite-config.yaml
scripts-dev/update_database --database-config .ci/sqlite-config.yaml

# re-create the PostgreSQL database.
./.buildkite/scripts/postgres_exec.py \
.ci/scripts/postgres_exec.py \
"DROP DATABASE synapse" \
"CREATE DATABASE synapse"

echo "+++ Run synapse_port_db against empty database"
coverage run scripts/synapse_port_db --sqlite-database .buildkite/test_db.db --postgres-config .buildkite/postgres-config.yaml
coverage run scripts/synapse_port_db --sqlite-database .ci/test_db.db --postgres-config .ci/postgres-config.yaml
4 changes: 2 additions & 2 deletions .buildkite/sqlite-config.yaml → .ci/sqlite-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
# schema and run background updates on it.
server_name: "localhost:8800"

signing_key_path: ".buildkite/test.signing.key"
signing_key_path: ".ci/test.signing.key"

report_stats: false

database:
name: "sqlite3"
args:
database: ".buildkite/test_db.db"
database: ".ci/test_db.db"

# Suppress the key server warning.
trusted_key_servers: []
File renamed without changes.
File renamed without changes.
22 changes: 8 additions & 14 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,9 @@ jobs:
fetch-depth: 0
- uses: actions/setup-python@v2
- run: pip install tox
- name: Patch Buildkite-specific test script
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Wasn't sure what @callahad had in mind here (see line 41 above) for simplifying the check-newsfragment script.

Aside: I can't seem to leave a comment on line 41 because(?) it's not part of the diff hunk?

Copy link
Member

Choose a reason for hiding this comment

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

Aside: I can't seem to leave a comment on line 41 because(?) it's not part of the diff hunk?

welcome to github PR review!

Copy link
Member

Choose a reason for hiding this comment

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

... of course you can make it part of the diff hunk by removing the comment about Buildkite :). I think you've done is all that was needed here.

I'm not sure how it relates to the issues about checkout though. I guess they are meant to be a separate comment.

Copy link
Member

Choose a reason for hiding this comment

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

Please can you remove the comment at line 41?

run: |
sed -i -e 's/\$BUILDKITE_PULL_REQUEST/${{ github.event.number }}/' \
scripts-dev/check-newsfragment
- run: scripts-dev/check-newsfragment
env:
PULL_REQUEST_NUMBER: ${{ github.event.number }}

lint-sdist:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -144,7 +142,7 @@ jobs:
uses: docker://ubuntu:bionic # For old python and sqlite
with:
workdir: /github/workspace
entrypoint: .buildkite/scripts/test_old_deps.sh
entrypoint: .ci/scripts/test_old_deps.sh
env:
TRIAL_FLAGS: "--jobs=2"
- name: Dump logs
Expand Down Expand Up @@ -197,12 +195,12 @@ jobs:
volumes:
- ${{ github.workspace }}:/src
env:
BUILDKITE_BRANCH: ${{ github.head_ref }}
POSTGRES: ${{ matrix.postgres && 1}}
MULTI_POSTGRES: ${{ (matrix.postgres == 'multi-postgres') && 1}}
WORKERS: ${{ matrix.workers && 1 }}
REDIS: ${{ matrix.redis && 1 }}
BLACKLIST: ${{ matrix.workers && 'synapse-blacklist-with-workers' }}
TOP: ${{ github.workspace }}

strategy:
fail-fast: false
Expand Down Expand Up @@ -232,7 +230,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Prepare test blacklist
run: cat sytest-blacklist .buildkite/worker-blacklist > synapse-blacklist-with-workers
run: cat sytest-blacklist .ci/worker-blacklist > synapse-blacklist-with-workers
- name: Run SyTest
run: /bootstrap.sh synapse
working-directory: /src
Expand All @@ -252,6 +250,8 @@ jobs:
if: ${{ !failure() && !cancelled() }} # Allow previous steps to be skipped, but not fail
needs: linting-done
runs-on: ubuntu-latest
env:
TOP: ${{ github.workspace }}
strategy:
matrix:
include:
Expand Down Expand Up @@ -281,13 +281,7 @@ jobs:
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Patch Buildkite-specific test scripts
run: |
sed -i -e 's/host="postgres"/host="localhost"/' .buildkite/scripts/postgres_exec.py
sed -i -e 's/host: postgres/host: localhost/' .buildkite/postgres-config.yaml
sed -i -e 's|/src/||' .buildkite/{sqlite,postgres}-config.yaml
sed -i -e 's/\$TOP/\$GITHUB_WORKSPACE/' .coveragerc
- run: .buildkite/scripts/test_synapse_port_db.sh
- run: .ci/scripts/test_synapse_port_db.sh

complement:
if: ${{ !failure() && !cancelled() }}
Expand Down
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ include book.toml
include pyproject.toml
recursive-include changelog.d *

prune .buildkite
prune .circleci
prune .github
prune .ci
prune contrib
prune debian
prune demo/etc
Expand Down
1 change: 1 addition & 0 deletions changelog.d/10573.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove references to BuildKite in favour of GitHub Actions.
2 changes: 1 addition & 1 deletion scripts-dev/check-newsfragment
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ set -e
git remote set-branches --add origin develop
git fetch -q origin develop

pr="$BUILDKITE_PULL_REQUEST"
pr="$PULL_REQUEST_NUMBER"

# if there are changes in the debian directory, check that the debian changelog
# has been updated
Expand Down
2 changes: 1 addition & 1 deletion scripts-dev/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ else
"scripts-dev/build_debian_packages"
"scripts-dev/sign_json"
"scripts-dev/update_database"
"contrib" "synctl" "setup.py" "synmark" "stubs" ".buildkite"
"contrib" "synctl" "setup.py" "synmark" "stubs" ".ci"
)
fi
fi
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ lint_targets =
contrib
synctl
synmark
.buildkite
.ci
docker

# default settings for all tox environments
Expand Down