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

Commit e60aab1

Browse files
committed
Merge remote-tracking branch 'origin/develop' into shhs
2 parents e7c1171 + 82d9d52 commit e60aab1

File tree

217 files changed

+9022
-2242
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

217 files changed

+9022
-2242
lines changed

.buildkite/docker-compose.py35.pg94.yaml

Lines changed: 0 additions & 21 deletions
This file was deleted.

.buildkite/format_tap.py

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import sys
2+
from tap.parser import Parser
3+
from tap.line import Result, Unknown, Diagnostic
4+
5+
out = ["### TAP Output for " + sys.argv[2]]
6+
7+
p = Parser()
8+
9+
in_error = False
10+
11+
for line in p.parse_file(sys.argv[1]):
12+
if isinstance(line, Result):
13+
if in_error:
14+
out.append("")
15+
out.append("</pre></code></details>")
16+
out.append("")
17+
out.append("----")
18+
out.append("")
19+
in_error = False
20+
21+
if not line.ok and not line.todo:
22+
in_error = True
23+
24+
out.append("FAILURE Test #%d: ``%s``" % (line.number, line.description))
25+
out.append("")
26+
out.append("<details><summary>Show log</summary><code><pre>")
27+
28+
elif isinstance(line, Diagnostic) and in_error:
29+
out.append(line.text)
30+
31+
if out:
32+
for line in out[:-3]:
33+
print(line)
Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
11
#!/usr/bin/env bash
22

3-
set -e
3+
set -ex
44

5-
# CircleCI doesn't give CIRCLE_PR_NUMBER in the environment for non-forked PRs. Wonderful.
6-
# In this case, we just need to do some ~shell magic~ to strip it out of the PULL_REQUEST URL.
7-
echo 'export CIRCLE_PR_NUMBER="${CIRCLE_PR_NUMBER:-${CIRCLE_PULL_REQUEST##*/}}"' >> $BASH_ENV
8-
source $BASH_ENV
5+
if [[ "$BUILDKITE_BRANCH" =~ ^(develop|master|dinsic|shhs|release-.*)$ ]]; then
6+
echo "Not merging forward, as this is a release branch"
7+
exit 0
8+
fi
99

10-
if [[ -z "${CIRCLE_PR_NUMBER}" ]]
11-
then
12-
echo "Can't figure out what the PR number is! Assuming merge target is develop."
10+
if [[ -z $BUILDKITE_PULL_REQUEST_BASE_BRANCH ]]; then
11+
echo "Not a pull request, or hasn't had a PR opened yet..."
1312

1413
# It probably hasn't had a PR opened yet. Since all PRs land on develop, we
1514
# can probably assume it's based on it and will be merged into it.
1615
GITBASE="develop"
1716
else
1817
# Get the reference, using the GitHub API
19-
GITBASE=`wget -O- https://api.github.com/repos/matrix-org/synapse/pulls/${CIRCLE_PR_NUMBER} | jq -r '.base.ref'`
18+
GITBASE=$BUILDKITE_PULL_REQUEST_BASE_BRANCH
2019
fi
2120

2221
# Show what we are before

.buildkite/pipeline.yml

Lines changed: 115 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ env:
22
CODECOV_TOKEN: "2dd7eb9b-0eda-45fe-a47c-9b5ac040045f"
33

44
steps:
5+
56
- command:
67
- "python -m pip install tox"
78
- "tox -e pep8"
@@ -36,8 +37,6 @@ steps:
3637
image: "python:3.6"
3738
propagate-environment: true
3839

39-
- wait
40-
4140
- command:
4241
- "python -m pip install tox"
4342
- "tox -e check-sampleconfig"
@@ -46,6 +45,26 @@ steps:
4645
- docker#v3.0.1:
4746
image: "python:3.6"
4847

48+
- wait
49+
50+
51+
- command:
52+
- "python -m pip install tox"
53+
- "tox -e py35-old,codecov"
54+
label: ":python: 3.5 / SQLite / Old Deps"
55+
env:
56+
TRIAL_FLAGS: "-j 2"
57+
plugins:
58+
- docker#v3.0.1:
59+
image: "python:3.5"
60+
propagate-environment: true
61+
retry:
62+
automatic:
63+
- exit_status: -1
64+
limit: 2
65+
- exit_status: 2
66+
limit: 2
67+
4968
- command:
5069
- "python -m pip install tox"
5170
- "tox -e py35,codecov"
@@ -56,6 +75,12 @@ steps:
5675
- docker#v3.0.1:
5776
image: "python:3.5"
5877
propagate-environment: true
78+
retry:
79+
automatic:
80+
- exit_status: -1
81+
limit: 2
82+
- exit_status: 2
83+
limit: 2
5984

6085
- command:
6186
- "python -m pip install tox"
@@ -67,6 +92,12 @@ steps:
6792
- docker#v3.0.1:
6893
image: "python:3.6"
6994
propagate-environment: true
95+
retry:
96+
automatic:
97+
- exit_status: -1
98+
limit: 2
99+
- exit_status: 2
100+
limit: 2
70101

71102
- command:
72103
- "python -m pip install tox"
@@ -78,17 +109,12 @@ steps:
78109
- docker#v3.0.1:
79110
image: "python:3.7"
80111
propagate-environment: true
81-
82-
- label: ":python: 3.5 / :postgres: 9.4"
83-
env:
84-
TRIAL_FLAGS: "-j 4"
85-
command:
86-
- "bash -c 'python -m pip install tox && python -m tox -e py35-postgres,codecov'"
87-
plugins:
88-
- docker-compose#v2.1.0:
89-
run: testenv
90-
config:
91-
- .buildkite/docker-compose.py35.pg94.yaml
112+
retry:
113+
automatic:
114+
- exit_status: -1
115+
limit: 2
116+
- exit_status: 2
117+
limit: 2
92118

93119
- label: ":python: 3.5 / :postgres: 9.5"
94120
env:
@@ -100,6 +126,12 @@ steps:
100126
run: testenv
101127
config:
102128
- .buildkite/docker-compose.py35.pg95.yaml
129+
retry:
130+
automatic:
131+
- exit_status: -1
132+
limit: 2
133+
- exit_status: 2
134+
limit: 2
103135

104136
- label: ":python: 3.7 / :postgres: 9.5"
105137
env:
@@ -111,6 +143,12 @@ steps:
111143
run: testenv
112144
config:
113145
- .buildkite/docker-compose.py37.pg95.yaml
146+
retry:
147+
automatic:
148+
- exit_status: -1
149+
limit: 2
150+
- exit_status: 2
151+
limit: 2
114152

115153
- label: ":python: 3.7 / :postgres: 11"
116154
env:
@@ -122,3 +160,67 @@ steps:
122160
run: testenv
123161
config:
124162
- .buildkite/docker-compose.py37.pg11.yaml
163+
retry:
164+
automatic:
165+
- exit_status: -1
166+
limit: 2
167+
- exit_status: 2
168+
limit: 2
169+
170+
171+
- label: "SyTest - :python: 3.5 / SQLite / Monolith"
172+
agents:
173+
queue: "medium"
174+
command:
175+
- "bash .buildkite/merge_base_branch.sh"
176+
- "bash .buildkite/synapse_sytest.sh"
177+
plugins:
178+
- docker#v3.0.1:
179+
image: "matrixdotorg/sytest-synapse:py35"
180+
propagate-environment: true
181+
retry:
182+
automatic:
183+
- exit_status: -1
184+
limit: 2
185+
- exit_status: 2
186+
limit: 2
187+
188+
- label: "SyTest - :python: 3.5 / :postgres: 9.6 / Monolith"
189+
agents:
190+
queue: "medium"
191+
env:
192+
POSTGRES: "1"
193+
command:
194+
- "bash .buildkite/merge_base_branch.sh"
195+
- "bash .buildkite/synapse_sytest.sh"
196+
plugins:
197+
- docker#v3.0.1:
198+
image: "matrixdotorg/sytest-synapse:py35"
199+
propagate-environment: true
200+
retry:
201+
automatic:
202+
- exit_status: -1
203+
limit: 2
204+
- exit_status: 2
205+
limit: 2
206+
207+
- label: "SyTest - :python: 3.5 / :postgres: 9.6 / Workers"
208+
agents:
209+
queue: "medium"
210+
env:
211+
POSTGRES: "1"
212+
WORKERS: "1"
213+
command:
214+
- "bash .buildkite/merge_base_branch.sh"
215+
- "bash .buildkite/synapse_sytest.sh"
216+
plugins:
217+
- docker#v3.0.1:
218+
image: "matrixdotorg/sytest-synapse:py35"
219+
propagate-environment: true
220+
soft_fail: true
221+
retry:
222+
automatic:
223+
- exit_status: -1
224+
limit: 2
225+
- exit_status: 2
226+
limit: 2

0 commit comments

Comments
 (0)