Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move from Buildkite to GitHub Actions #1115
Move from Buildkite to GitHub Actions #1115
Changes from 48 commits
469707c
74bef07
4c86c1a
f68bbe4
6f8197f
c4afc4f
40e9979
ed0d9d7
3142295
f93a663
78814e0
47ae955
f9ac100
d87a25e
1e98e8d
4a66f6d
d87f6a8
7436223
1e8f5ad
04329ae
06f684b
bc453ba
0567858
1171129
b8a7175
8ff4b2d
5ed4665
2302479
5aab2fe
ec135d6
2f0c6d2
cfb8729
b78fad2
0862c20
45cbb1a
ccd4e89
7eafc11
66f1ac5
d2e27df
58aabb9
c74afbd
13f9000
bc2b9ce
aec7fa6
1a6a46c
cfda89b
0dc6a18
03a59bf
fd51fc4
2984f8f
9e4a8f3
b5350ec
dd7b896
06e00d5
8589838
ea25d7a
7a9ca4b
0994d0c
ce29fb2
5692410
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is
&& 1
a trick to say that this should be enabled by default?Why don't we do the same for dendrite's runs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The script always sets up postgres. Some other bits of perl then determine if we're going to actually use postgres. Need to ensure $POSTGRES is non-empty iff we want to use SQLite.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, not sure if I understand. If
POSTGRES
is empty, then we set it to true/1 instead...?Is the same required for
BLACKLIST
andAPI
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm. I think I wrote out a larger comment but that seems to have disappeared.
I think it might be helpful to work through the details from scratch.
What the vars actually do
POSTGRES
POSTGRES
is handled differently for synapse and dendrite.synapse_sytest.sh
we only readPOSTGRES
in tests[ -n "$POSTGRES" ]
. We needPOSTGRES
to be empty or not set for SQLite, and nonempty to use postgres.Dendrite.pm
we test ifPOSTGRES
is not defined or equal to'0'
, and use SQLlite otherwise.Taking both behaviours into account:
POSTGRES
to any non-empty string other than'0'
POSTGRES
WORKERS
Synapse only. Tested with
[ -n "$WORKERS" ]
.API
Only for dendrite. If
$ENV{'API'} == '1'
inDendrite.pm
, we'll pass-api
to dendrite. Not sure how that will handle the var being undefined.BLACKLIST
Only for synapse. If
"$BLACKLIST"
is empty (test -z
) then we setBLACKLIST=sytest-blacklist
. It ends up getting passed torun-tests.pl
via-B
.GitHub Actions' expression language
The language is typed, but presumably
${{ expr }}
convertsexpr
to a string before substituting it into the yaml.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found the best way to experiment was to run a dummy action here: https://github.com/DMRobertson/gha-test/
As far as I can tell,
a && b
returnsa
ifa
is falsey, otherwiseb
. No type conversion done on the value that gets returned.The two cases then:
when
postgres
isn't included in the strategy matrixmatrix.postgres
isnull
null && 1
evaluates to null.${{ null }}
subsitutes the textnull
into the yaml file.POSTGRES: null
POSTGRES
"when
postgres: postgres
is in the strategy matrixmatrix.postgres
is'postgres'
'postgres && 1
is1
${{ 1 }}
substitutes the textnull
into the yaml filePOSTGRES: 1
POSTGRES
env var to the string1
I'm about to add a commit which confirms this by dumping the environment before we call the bootstrap script.