rust-vmm / rust-vmm-ci

Apache License 2.0
18 stars 33 forks source link

Update test_commit_format.py to work locally #71

Closed andreeaflorescu closed 3 years ago

andreeaflorescu commented 3 years ago

This test is taking a dependency on Buildkite specific infrastructure. Specifically, it expect the following environment variables to be set in order to run the test: BUILDKITE_PULL_REQUEST_BASE_BRANCH and BUILDKITE_REPO.

We need to find good defaults for those environment variables in case they're not set so that we can run the tests locally. The challenge here comes from identifying a good default for the BUILDKITE_PULL_REQUEST_BASE_BRANCH as this is the branch we use for figuring out which commits are part of the PR.

From a short round of thinking, I could not find a perfect solution. A meh solution would be to always assume that the base branch is the master of the configured origin remote. This is a meh solution because it implies that the developer updates their local master branch from the upstream master branch so that the diff in commits is truly what is on the local branch from which they wish to open a PR. This assumes good practices (for example PRs are never opened from the master branch).

Other solutions are welcomed.

lauralt commented 3 years ago

Fixed by #72