-
Notifications
You must be signed in to change notification settings - Fork 7
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
Github Actions integration #14
Comments
This sounds good to me! In regards to building Vector, I would check out these docs (select the "Docker" tab). We have Docker images available for building Vector which should simplify that process. |
I was looking more into our build and packaging system, and I figured we can just build the |
If someone's interested, the experiments are underway at https://github.com/timberio/vector-test-harness-github-actions-test-repo |
Nice! I assume the changes here will be merged into the test harness itself? |
I'm still thinking about how to split the logic and where to put the interface boundary. Most likely the code from here will be moved to the |
We've been in contact with some folks from Github about larger/custom runners. :) Will report back when we hear from them. |
I'm at the point where test run finally passes as I want it! |
Very cool! This is a great start. I want to play around a little more, but this looks to be simple enough to extend (accept |
Yeah, I've had a lot of trouble with the Github Actions, eventually ended up looking at their runner code here. One thing it particular is the env var initialization and expression evaluation order are intertwined, and different for one action type to another (docker action vs node action). I've had other minor surprises too. |
There are a few things to polish before we merge it in:
Everything else can be addressed later. |
This ticket's concerns are superseded by our soak testing infrastructure. Any future iteration of test-harness work will use the basic infrastructure of that work. |
Design plan so far:
Trigger a Github Action on issue comment.
Check the context:
/test
commandwrite
access to a repoAbort if any of the above are not fulfilled.
Clone the PR branch and build
vector
from it.This needs verification since there's a concern that standard Github Action runner might not have
sufficient resources to build
vector
.Note we can get the Pull Request info from the event file at
$GITHUB_EVENT_PATH
.An alternative approach is building the
vector
at the test harness VM. It might be easier too, aswe'll be able to perform the standard
cargo install
fromgit
:cargo install --git https://github.com/timberio/vector --rev "<PR_COMMIT_SHA>"
Note that to determine the commit hash, we'll have to perform some Github API calls.
We can avoid doing that if we just use the PR branch:
pull/<PR_ID>/head
.cargo install --git https://github.com/timberio/vector --branch "pull/<PR_ID>/head"
Invoke the
vector-test-harness
docker image.We'll have to add support for using the
vector
executable built on a previous step - probablyadd a way to upload it into the test VM and replace the preinstalled
vector
instance.The command sequence we'll need to run is something like this:
bin/test -t some_test
bin/compare -t some_test > "$GITHUB_WORKSPACE/output"
We place the whatever output we want to respond with at
$GITHUB_WORKSPACE/output
.Finally, we take the contents of
$GITHUB_WORKSPACE/output
and post it as a comment to the PR. We should also provide a link to the Github Action execution in the said comment, so additional context is easily available at hand.Failure handling:
The text was updated successfully, but these errors were encountered: