-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
chore: Use GH Checks API for manual e2e tests #3071
Conversation
Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es>
Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es>
Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es>
Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es>
Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es>
How do we get it passing if we don't run the tests? Can we override it with a label? |
Maybe we should have an additional check where our The workflow would check for changes to labels and do this when it gets an - name: Set status success
uses: LouisBrunner/checks-action@v1.1.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
sha: ${{ needs.triage.outputs.commit_sha }}
name: e2e tests
conclusion: skipped by maintainer
details_url: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}} |
I like this |
WDYT about an extra step in the |
I'm not sure I would label it with ok-to-merge then given I might want to run the e2e tests later on, based on recent changes - Or is this just me? |
it can be, skip-e2e for instance |
Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es>
the label to skip e2e in current commit (and future commits in the PR) is |
Signed-off-by: Jorge Turrado Ferrero <jorge.turrado@docplanner.com>
Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es>
@JorTurFer so we no longer call this label |
At this point I think that skip-e2e makes more sense, but I'm open to change it. |
As discussed previously, is ok-to-merge not better given we could add more criteria to it later on that goes beyond e2e? For example, if the changelog is not done I'd like to block the PR |
Sorry but I'm not getting your point. Do you want to use this check for more things than e2e tests? As you said, |
I want the current checking on |
I'd say that it's not possible, for doing complex things we need to keep the checkid stored for updating them properly. Without a real backend, we are a bit limited in what things we can to. For instance, once the check for the commit has finished (it's concluded), we cannot create another check in the same commit with the same name, we have to update it or the change will not be reflected. For that case, we could just create another different CI/job that checks for another different label like |
Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es>
Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es>
Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es>
After dozens of tries (trust me xD), I have discovered how to keep the check alive despite the s***y implementation of checks on GH side. For achieving this, I have to create one workflow just for creating the check (it must be split to keep the check-run visible because on every execution, the check created on-the-fly is lost), and another workflow which monitors labels and modifies the previously created check. I can all another extra step in this latest CI (label triggers) and just fail in case of existing any label like I think that with it, we can achieve both goals, having a semantic label to skip e2e test ( With this approach, once the gap is fixed, you can just remove the label and then, this check will be green so if others (including e2e test check) are green, the PR is mergeable. Could this fit with your ideas @kedacore/keda-contributors ? |
Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es>
Awesome job on this @JorTurFer !!! This is huge |
let's wait till @tomkerkhove thoughts about #3071 (comment) to implement it in this PR |
If both of you are OK, then I am as well. |
Thanks a ton! |
Lol, the change for blocking the PR with the label |
Signed-off-by: Jorge Turrado jorge_turrado@hotmail.es
Instead of using labels/emojis for the e2e on PR, this PR updates the workflow to use Github's check API. The main changes are:
pull_request_target
trigger creates an empty check on every new commit inqueued
statusin-progress
when we start to build the image and setting tocomplated
+success/failure
at the end of the e2e execution.skip-e2e
.You can check how it works just opening a PR to this repository and commenting
/run-e2e
in the PR (it doesn't check author permissions, only the command)NOTE: I have noticed that the test suite seems not idempotent, so there is a possibility of not doing anything if we try to execute more than once e2e tests for the same commit
Checklist
Fixes #2567