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

Add JUnit summaries to CircleCI as well as merged runs #3704

Merged
merged 19 commits into from Sep 12, 2018

Conversation

Projects
None yet
3 participants
@hawkowl
Contributor

hawkowl commented Aug 16, 2018

No description provided.

hawkowl added some commits Aug 16, 2018

@hawkowl

This comment has been minimized.

Contributor

hawkowl commented Aug 16, 2018

Accompanying change: matrix-org/sytest#485

@hawkowl hawkowl requested a review from matrix-org/synapse-core Aug 16, 2018

@@ -0,0 +1,22 @@
echo 'export CIRCLE_PR_NUMBER="${CIRCLE_PR_NUMBER:-${CIRCLE_PULL_REQUEST##*/}}"' >> $BASH_ENV

This comment has been minimized.

@richvdh

richvdh Aug 20, 2018

Member

shebang / comment / set -e, please

This comment has been minimized.

@richvdh

richvdh Aug 20, 2018

Member

also chmod +x ?

This comment has been minimized.

@hawkowl

hawkowl Aug 20, 2018

Contributor

fixed

git fetch -u origin ${FETCH_REFS}
# Checkout PR merge ref.
git checkout -qf "pr/${CIRCLE_PR_NUMBER}/merge"

This comment has been minimized.

@richvdh

richvdh Aug 20, 2018

Member

I think that conflicting PRs don't get a /merge ref, so this will fail, and the next command is a bit strange. what is your thinking here?

This comment has been minimized.

@hawkowl

hawkowl Aug 20, 2018

Contributor

I have no idea -- to be honest, this is just cargo culting. I haven't had any luck finding ANY documentation on the /merge ref, or the pr/ refset at all on GitHub -- my google-fu has failed me unfortunately. This is just the method that was recommended on the CircleCI forums (because Circle doesn't have a "merge before run" functionality like Travis).

@hawkowl hawkowl requested a review from richvdh Aug 21, 2018

git checkout -qf "pr/${CIRCLE_PR_NUMBER}/merge"
# Test for merge conflicts.
git branch --merged | grep "pr/${CIRCLE_PR_NUMBER}/head" > /dev/null

This comment has been minimized.

@erikjohnston

erikjohnston Sep 4, 2018

Member

So a comment to explain how this works is going to be necessary. I think this works by:

  • The git checkout above will fail if there is no merge branch, and so we'll bail out due to set -e
  • If it does exist, git branch --merged will list all branches that are merged into it. The grep will succeed if pr/.../head branch is merged into it, and fail if it isn't (and therefore bail out).
  • If pr/../head is merged in then that means pr/../merge must be an up to date merge commit, and so we're done.
# Test for merge conflicts.
git branch --merged | grep "pr/${CIRCLE_PR_NUMBER}/head" > /dev/null
fi

This comment has been minimized.

@erikjohnston

erikjohnston Sep 4, 2018

Member

If we can't find a CIRCLE_PR_NUMBER then we should probably bail out, rather than pretending we succeeded doing a merge build

This comment has been minimized.

@hawkowl

hawkowl Sep 12, 2018

Contributor

we'll bail out upwards (we check if CIRCLE_PR_NUMBER is defined)

This comment has been minimized.

@erikjohnston

erikjohnston Sep 12, 2018

Member

Then why do we have an if guard?

This comment has been minimized.

@hawkowl

hawkowl Sep 12, 2018

Contributor

because it also runs on master/develop

This comment has been minimized.

@erikjohnston

erikjohnston Sep 12, 2018

Member

oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooh

This comment has been minimized.

@erikjohnston

erikjohnston Sep 12, 2018

Member

Comment maybe for us slow people at the back? 0:-)

@erikjohnston

See comments

hawkowl added some commits Sep 12, 2018

@hawkowl hawkowl merged commit 65cd8cc into develop Sep 12, 2018

9 of 10 checks passed

Synapse Sytest Postgres (Merged PR) Build started sha1 is merged.
Details
Synapse Sytest Postgres (Commit) Build #6973 origin/hawkowl/junit-circleci succeeded in 8 min 16 sec
Details
Synapse Sytest SQLite (Commit) Build #7179 origin/hawkowl/junit-circleci succeeded in 3 min 46 sec
Details
Synapse Sytest SQLite (Merged PR) Build finished.
Details
ci/circleci: sytestpy2 Your tests passed on CircleCI!
Details
ci/circleci: sytestpy2merged Your tests passed on CircleCI!
Details
ci/circleci: sytestpy2postgres Your tests passed on CircleCI!
Details
ci/circleci: sytestpy2postgresmerged Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@hawkowl hawkowl deleted the hawkowl/junit-circleci branch Sep 12, 2018

hawkowl added a commit that referenced this pull request Sep 24, 2018

Merge tag 'v0.33.5'
Features
--------

- Python 3.5 and 3.6 support is now in beta.
([\#3576](#3576))
- Implement `event_format` filter param in `/sync`
([\#3790](#3790))
- Add synapse_admin_mau:registered_reserved_users metric to expose
number of real reaserved users
([\#3846](#3846))

Bugfixes
--------

- Remove connection ID for replication prometheus metrics, as it creates
a large number of new series.
([\#3788](#3788))
- guest users should not be part of mau total
([\#3800](#3800))
- Bump dependency on pyopenssl 16.x, to avoid incompatibility with
recent Twisted.
([\#3804](#3804))
- Fix existing room tags not coming down sync when joining a room
([\#3810](#3810))
- Fix jwt import check
([\#3824](#3824))
- fix VOIP crashes under Python 3 (#3821)
([\#3835](#3835))
- Fix manhole so that it works with latest openssh clients
([\#3841](#3841))
- Fix outbound requests occasionally wedging, which can result in
federation breaking between servers.
([\#3845](#3845))
- Show heroes if room name/canonical alias has been deleted
([\#3851](#3851))
- Fix handling of redacted events from federation
([\#3859](#3859))
-  ([\#3874](#3874))
- Mitigate outbound federation randomly becoming wedged
([\#3875](#3875))

Internal Changes
----------------

- CircleCI tests now run on the potential merge of a PR.
([\#3704](#3704))
- http/ is now ported to Python 3.
([\#3771](#3771))
- Improve human readable error messages for threepid
registration/account update
([\#3789](#3789))
- Make /sync slightly faster by avoiding needless copies
([\#3795](#3795))
- handlers/ is now ported to Python 3.
([\#3803](#3803))
- Limit the number of PDUs/EDUs per federation transaction
([\#3805](#3805))
- Only start postgres instance for postgres tests on Travis CI
([\#3806](#3806))
- tests/ is now ported to Python 3.
([\#3808](#3808))
- crypto/ is now ported to Python 3.
([\#3822](#3822))
- rest/ is now ported to Python 3.
([\#3823](#3823))
- add some logging for the keyring queue
([\#3826](#3826))
- speed up lazy loading by 2-3x
([\#3827](#3827))
- Improved Dockerfile to remove build requirements after building
reducing the image size.
([\#3834](#3834))
- Disable lazy loading for incremental syncs for now
([\#3840](#3840))
- federation/ is now ported to Python 3.
([\#3847](#3847))
- Log when we retry outbound requests
([\#3853](#3853))
- Removed some excess logging messages.
([\#3855](#3855))
- Speed up purge history for rooms that have been previously purged
([\#3856](#3856))
- Refactor some HTTP timeout code.
([\#3857](#3857))
- Fix running merged builds on CircleCI
([\#3858](#3858))
- Fix typo in replication stream exception.
([\#3860](#3860))
- Add in flight real time metrics for Measure blocks
([\#3871](#3871))
- Disable buffering and automatic retrying in treq requests to prevent
timeouts. ([\#3872](#3872))
- mention jemalloc in the README
([\#3877](#3877))
- Remove unmaintained "nuke-room-from-db.sh" script
([\#3888](#3888))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment