Skip to content

Use master as fallback for non-existent branches#99

Merged
MartinNowak merged 3 commits intodlang:masterfrom
wilzbach:master-default
Dec 26, 2017
Merged

Use master as fallback for non-existent branches#99
MartinNowak merged 3 commits intodlang:masterfrom
wilzbach:master-default

Conversation

@wilzbach
Copy link
Contributor

When a PR is made directly from an upstream branch or to a different
branch than master or stable, the respective branch at the other two
repositories might not exist. So let's better check beforehand and
softly fallback to master otherwise. The same procedure is e.g. used
for CircleCi.

Note: I'm doing this more or less blind :/

@dlang-bot
Copy link
Collaborator

Thanks for your pull request, @wilzbach!

@wilzbach
Copy link
Contributor Author

@wilzbach wilzbach force-pushed the master-default branch 2 times, most recently from 6248688 to 8b602d3 Compare December 24, 2017 09:59
When a PR is made directly from an upstream branch or to a different
branch than `master` or `stable`, the respective branch at the other two
repositories might not exist. So let's better check beforehand and
softly fallback to `master` otherwise. The same procedure is e.g. used
for CircleCi.
@MartinNowak
Copy link
Member

The failing test is a bad example, it's running a test for the revert branch in dlang/dmd, not for the PR.
The PR test is here https://ci.dlang.io/blue/organizations/jenkins/dlang-org%2Fdmd/detail/PR-7505/1/pipeline and doesn't fail.

Limit branch tests wouldn't work with feature branches. In fact https://ci.dlang.io/job/dlang-org/job/dmd/configure already uses Exclude branches that are also filed as PRs, so the branch shouldn't have been tested separately. Also I think using GH's revert button used to work correctly, maybe the PR hook arrived after the branch hook? Did GH link to the branch test or to the PR test?

[Sun Dec 24 09:35:54 UTC 2017] Finished processing Push event to branch revert-7416-fix18053 in repository dlang/dmd CREATED event from 10.23.2.1 ⇒ https://ci.dlang.io:8080/github-webhook/ with timestamp Sun Dec 24 09:35:48 UTC 2017. Matched 1.
[Sun Dec 24 09:36:54 UTC 2017] Received Pull request #7505 opened in repository dlang/dmd CREATED event from 10.23.2.1 ⇒ https://ci.dlang.io:8080/github-webhook/ with timestamp Sun Dec 24 09:36:49 UTC 2017
Found match against dlang-org/dmd (new branch PR-7505)
[Sun Dec 24 09:36:56 UTC 2017] Finished processing Pull request #7505 opened in repository dlang/dmd CREATED event from 10.23.2.1 ⇒ https://ci.dlang.io:8080/github-webhook/ with timestamp Sun Dec 24 09:36:49 UTC 2017. Matched 1.
[Mon Dec 25 21:22:14 UTC 2017] Received Pull request #7505 closed in repository dlang/dmd REMOVED event from 10.23.2.1 ⇒ https://ci.dlang.io:8080/github-webhook/ with timestamp Mon Dec 25 21:22:09 UTC 2017
[Mon Dec 25 21:22:16 UTC 2017] Finished processing Pull request #7505 closed in repository dlang/dmd REMOVED event from 10.23.2.1 ⇒ https://ci.dlang.io:8080/github-webhook/ with timestamp Mon Dec 25 21:22:09 UTC 2017. Matched 1.
[Mon Dec 25 21:22:20 UTC 2017] Received Push event to branch revert-7416-fix18053 in repository dlang/dmd REMOVED event from 10.23.2.1 ⇒ https://ci.dlang.io:8080/github-webhook/ with timestamp Mon Dec 25 21:22:15 UTC 2017
[Mon Dec 25 21:22:21 UTC 2017] Finished processing Push event to branch revert-7416-fix18053 in repository dlang/dmd REMOVED event from 10.23.2.1 ⇒ https://ci.dlang.io:8080/github-webhook/ with timestamp Mon Dec 25 21:22:15 UTC 2017. Matched 1.

While we do have fallbacks for non-existing branch targets, this whole mechanism is to support feature branches. While working on the ctfe feature, we figured, it's better to create feature branches for all dlang repos, to pin them. But anyhow adding the fallbacks simplifies a few things, so let's add them to jenkins.

@wilzbach
Copy link
Contributor Author

Did GH link to the branch test or to the PR test?

Yes, that's why I submitted the PR in the first place. I have seen it a couple of times before in the past, e.g. if someone created a branch under dlang directly via GitHub.

While we do have fallbacks for non-existing branch targets, this whole mechanism is to support feature branches. While working on the ctfe feature, we figured, it's better to create feature branches for all dlang repos, to pin them.

Feature branches were an awesome idea!

anyhow adding the fallbacks simplifies a few things, so let's add them to jenkins.

I am currently on my phone and see this is still failing. I will have a look at it soon.

@MartinNowak
Copy link
Member

I am currently on my phone and see this is still failing. I will have a look at it soon.

Already on it ;).

@MartinNowak MartinNowak force-pushed the master-default branch 3 times, most recently from e97cdb7 to 80096e7 Compare December 26, 2017 15:39
- fixes changelog display in jenkins
@MartinNowak MartinNowak merged commit e7bd12d into dlang:master Dec 26, 2017
@wilzbach wilzbach deleted the master-default branch December 26, 2017 16:35
@wilzbach
Copy link
Contributor Author

Thanks!

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.

3 participants