Skip to content
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

Correctly fetch same-named homeserver branches #1129

Merged
merged 8 commits into from
Sep 8, 2021
Merged

Conversation

DMRobertson
Copy link
Contributor

@DMRobertson DMRobertson commented Sep 6, 2021

In #1115 I didn't correctly handle the situation where there's a corresponding synapse/dendrite branch to fetch. #1128 fell victim to this.

Fix: reuse the shell script from matrix-org/synapse#10160.

@DMRobertson DMRobertson changed the title Dummy to run tests Correctly fetch same-named homeserver branches Sep 6, 2021
@DMRobertson
Copy link
Contributor Author

Slightly anxious that dendrite fails on GHA but doesn't on BK. Flakey test?

@DMRobertson DMRobertson requested a review from a team September 6, 2021 13:36
@DMRobertson DMRobertson marked this pull request as ready for review September 6, 2021 13:36
Copy link
Member

@anoadragon453 anoadragon453 left a comment

Choose a reason for hiding this comment

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

Slightly anxious that dendrite fails on GHA but doesn't on BK. Flakey test?

I haven't seen that test flake yet, but I suppose see what happens after another run.

# 2. Attempt to use the base branch, e.g. when merging into release-vX.Y
# (GITHUB_BASE_REF for pull requests).
# 3. Use the default synapse branch ("develop").
for BRANCH_NAME in "$GITHUB_HEAD_REF" "$GITHUB_BASE_REF" "${GITHUB_REF#refs/heads/}" "develop"; do
Copy link
Member

Choose a reason for hiding this comment

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

Since we had an issue with "${GITHUB_REF#refs/heads/}" due to PR numbers, is it even worth including it on this list?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

GITHUB_HEAD_REF and GITHUB_BASE_REF only exist when the action is triggered by a pull request. https://docs.github.com/en/actions/reference/environment-variables#default-environment-variables. This action runs on specific branches too, outside of the context of pull requests:

name: Run sytest
on:
  push:
    branches: ["develop", "release-*"]
  pull_request

(but note that's only there because I copied it from synapse's CI file)

Assuming it's meaningful to run sytest on develop and release branches, I think we do still want to read GITHUB_REF.

Copy link
Member

Choose a reason for hiding this comment

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

Aha, I see. So in the case of a pull request, it's unlikely that we'll end up using "${GITHUB_REF#refs/heads/}". But it's useful on develop / release-*.

Yes, I think it's worthwhile to run Sytest on those branches.

Comment on lines +63 to +64
# TODO the shell script below is nicked from complement. We use this pattern
# in a few places. Can we make this an Action so it's easier to reuse?
Copy link
Member

Choose a reason for hiding this comment

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

+1

.github/workflows/pipeline.yml Outdated Show resolved Hide resolved
Co-authored-by: Andrew Morgan <[email protected]>
@DMRobertson
Copy link
Contributor Author

Slightly anxious that dendrite fails on GHA but doesn't on BK. Flakey test?

I haven't seen that test flake yet, but I suppose see what happens after another run.

Most recent run seems to have fallen over with workers. Maybe the blacklist is still wrong?

@DMRobertson DMRobertson self-assigned this Sep 6, 2021
@DMRobertson
Copy link
Contributor Author

Those failures seem to be replicated on buildkite. Maybe I need to update the corresponding synapse branch to pull in a fix there? /shrug

@DMRobertson
Copy link
Contributor Author

That looks happier.

Slightly anxious that dendrite fails on GHA but doesn't on BK. Flakey test?

I haven't seen that test flake yet, but I suppose see what happens after another run.

There we were talking about a dendrite failure (#458: Local device key changes appear in /keys/changes) in https://github.com/matrix-org/sytest/runs/3524830553.

Later we had https://github.com/matrix-org/sytest/runs/3527019236 where all dendrite tests suceeded.

The most recent run is https://github.com/matrix-org/sytest/runs/3527233610 where that dendrite failure reoccurred.

In both failure cases it was Dendrite with Postgres but without Full HTTP APIs that saw this. Some kind of race?

Copy link
Member

@anoadragon453 anoadragon453 left a comment

Choose a reason for hiding this comment

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

In both failure cases it was Dendrite with Postgres but without Full HTTP APIs that saw this. Some kind of race?

Hmm, it does look that way, though I can't quickly tell you why that might be.

Perhaps worth raising on issue on the Dendrite repo. Otherwise I think this PR as it stands is good to go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants