Skip to content

Fix Semaphore stable branch detection#8560

Merged
wilzbach merged 1 commit intodlang:stablefrom
wilzbach:fix-stable
Aug 14, 2018
Merged

Fix Semaphore stable branch detection#8560
wilzbach merged 1 commit intodlang:stablefrom
wilzbach:fix-stable

Conversation

@wilzbach
Copy link
Contributor

The previously used detection didn't work which lead to the current problems of the wrong branch being checked out.

The GitHub API is rate-limited and thus this isn't ideal, but we already use the same workaround for the CircleCI:

dmd/.circleci/run.sh

Lines 84 to 88 in ecde30e

if [ -n "${CIRCLE_PR_NUMBER:-}" ]; then
base_branch=$((curl -fsSL https://api.github.com/repos/dlang/$CIRCLE_PROJECT_REPONAME/pulls/$CIRCLE_PR_NUMBER || echo) | jq -r '.base.ref')
else
base_branch=$CIRCLE_BRANCH
fi

@dlang-bot
Copy link
Contributor

dlang-bot commented Aug 13, 2018

Thanks for your pull request, @wilzbach!

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub fetch digger
dub run digger -- build "stable + dmd#8560"

@wilzbach wilzbach changed the base branch from master to stable August 13, 2018 16:04
@wilzbach wilzbach added the Review:Blocking Other Work review and pulling should be a priority label Aug 13, 2018
@wilzbach
Copy link
Contributor Author

++ curl -fsSL https://api.github.com/repos/dlang/dmd/pulls/8560
++ jq -r .base.ref
+ BRANCH=stable
+ git ls-remote --exit-code --heads https://github.com/dlang/dmd.git stable
+ export BRANCH

...

+ for proj in druntime phobos
+ '[' stable '!=' master ']'
+ '[' stable '!=' stable ']'
+ clone https://github.com/dlang/druntime.git ../druntime stable
+ local url=https://github.com/dlang/druntime.git
+ local path=../druntime
+ local branch=stable
+ for i in '{0..4}'
+ git clone --depth=1 --branch stable https://github.com/dlang/druntime.git ../druntime --quiet
+ break
+ for proj in druntime phobos
+ '[' stable '!=' master ']'
+ '[' stable '!=' stable ']'
+ clone https://github.com/dlang/phobos.git ../phobos stable

works as expected :)

@wilzbach
Copy link
Contributor Author

The DAutoTest failure is unrelated, see e.g. dlang/dlang.org#2432

@wilzbach
Copy link
Contributor Author

Could we maybe prioritize this PR? It seems that SemaphoreCI has become a bit flaky and this should hopefully fix the red check we experienced on a few PRs over the last days.

Once this is merged into stable, I will also do a merge_stable, s.t. this commit is also in master.

@PetarKirov
Copy link
Member

@wilzbach LGTM as well. Feel free to force merge.

@wilzbach wilzbach merged commit 1484059 into dlang:stable Aug 14, 2018
@wilzbach wilzbach deleted the fix-stable branch August 14, 2018 12:10
@wilzbach
Copy link
Contributor Author

Once this is merged into stable, I will also do a merge_stable, s.t. this commit is also in master.

#8564

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Merge:auto-merge Review:Blocking Other Work review and pulling should be a priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants