-
Notifications
You must be signed in to change notification settings - Fork 4
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
Allow user to specify branch of systemtests being triggered by trigger_systemtests.py #143
Draft
BenjaminRodenberg
wants to merge
3
commits into
develop
Choose a base branch
from
i_141
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
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.
This conditional branch that contains this line is only ever reached in the following case:
Some external repository, let's say fenics-adapter, commits something that triggers Travis to execute the
.travis.yml
file. This file contains the crucial linepython trigger_systemtests.py --adapter fenics
, which triggers a build on systemtests (and with this PR merged, on a specific branch of it). Note that the--wait
argument is omitted, meaning that the fenics-adapter build on Travis will just send the request and instantly return as success.A systemtests build is launched to run the test that was requested. If this test now fails we reach the after_failure_action
systemtests/trigger_systemtests.py
Lines 105 to 106 in 55ffcc0
So, the systemtests build will send a request back to fenics-adapter which originally triggered the whole sequence.
At this point we have reached the highlighted line 282.
systemtests/trigger_systemtests.py
Line 282 in 55ffcc0
Because of this, we have to be careful with which branch we choose here, as this must not be a branch of systemtests. Currently, this mock build would always run on the master branch of the fenics-adapter. It would be nice to have this actually run on the specific branch that was originally commited to in point 1. Note that this is again a different branch than the systemtests branch that will be adjustable with this PR.
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.
Since the mock request is generated on systemtests, we would need it to have received information in some way about which branch of the outside repository triggered it. One way might be to have the original request contain the following as after failure action
This way, when systemtests is executing
trigger_systemtests.py
as a result of a failed test, it will have received anargs.branch
value that correctly contains the branch of the outside repo that originally issued the test. Then we could actually callgenerate_failure_callback(branch=args.branch)
This way of formatting seems rather ugly, but it doesn't interfere with the formatting step done later on in
systemtests/trigger_systemtests.py
Lines 158 to 160 in 55ffcc0
We also don't require any further variables this way.
Suggestions?