-
Notifications
You must be signed in to change notification settings - Fork 227
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
follow-up work for TAV tests now being in GH Actions #3227
Comments
Thanks for this, it was something in my TODO list :)
Yep, I agree. Let me create a sample github repository with the different alternatives so we can agree which one is the best. To add more clarity, there are some caveats, for instance, GitHub comments should trigger builds if they are coming from an Elastician user, but IIRC, the existing GITHUB TOKEN created on the fly does not have permissions to access the Elastic org, hence we might need to use some GH PAT secrets and that's not supported when using the
Something is not right with GH actions, likely some of the existing degraded issues that happened today... See https://github.com/elastic/apm-agent-nodejs/actions/runs/4552294471 is the one for that particular commit |
Note that I'm fine if there isn't a way to start this via a GitHub PR comment. For example if it is a separate
Yah, hopefully. We'll see in coming days. |
https://github.com/elastic-robots/gh-actions-interactions/blob/main/.github/workflows/ci-command.yml is the minimal proposal to use GitHub commands
Tasks:
What are your thoughts? |
This looks great.
|
They are showing now. |
#3246 is the one supporting running tav modules individually as discussed in #3227 (comment) |
A follow-up on #3232. An issue with using From a separate discussion some alternative ideas:
I played around a little more. The event we can use here is actually Here is a starter "tav-command.yml" used for the above examples: # Dev notes:
# - An edge case: When I was adding a pull request review for a commit, and
# a new commit was added to the PR before I submitted it... this did *NOT*
# result in a `pull_request_review` event. So I guess a "/test tav" will not
# happen for non-latest commit on the PR. I can live with that.
name: tav-command
on:
pull_request_review:
types: [submitted]
# XXX Do we need both of these permissions any more? Because the GitHub checks
# UI shows progress, we don't need reactions anymore, I don't think.
# permissions:
# contents: write
# pull-requests: write
jobs:
command-validation:
runs-on: ubuntu-latest
if: startsWith(github.event.review.body, '/test tav')
steps:
- name: XXX Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: |
echo "$GITHUB_CONTEXT"
# XXX This does NOT work on the pull_request_review event data. We will need to support that.
# - name: Validate github comment
# uses: elastic/apm-pipeline-library/.github/actions/validate-github-comment@current
- uses: actions/checkout@v3
- run: echo "..." |
This replaces a similar script used for when CI was in Jenkins. Refs: #3227
I've started #3267 for this. |
This replaces a similar script used for when CI was in Jenkins. Refs: #3227
This part is done in #3267 |
This part is done in #3246 And I tested with #3334 (review) which triggered https://github.com/elastic/apm-agent-nodejs/actions/runs/4933718927 |
#3340 for the remaining item |
This checks that .ci/tav.json is correct: both that it covers all the modules in all the .tav.yml files in the repo, and that it never results in a TAV test matrix greater than the GH Actions 256 limit. This is part of `npm run lint` which is run by the lint CI workflow. This also drops the body-parser TAV tests: we don't instrument it, just use it in some tests. Refs: #3227 (item 3)
This checks that .ci/tav.json is correct: both that it covers all the modules in all the .tav.yml files in the repo, and that it never results in a TAV test matrix greater than the GH Actions 256 limit. This is part of `npm run lint` which is run by the lint CI workflow. This also drops the body-parser TAV tests: we don't instrument it, just use it in some tests. Refs: #3227 (item 3)
…ic#3267) This replaces a similar script used for when CI was in Jenkins. Refs: elastic#3227
This checks that .ci/tav.json is correct: both that it covers all the modules in all the .tav.yml files in the repo, and that it never results in a TAV test matrix greater than the GH Actions 256 limit. This is part of `npm run lint` which is run by the lint CI workflow. This also drops the body-parser TAV tests: we don't instrument it, just use it in some tests. Refs: elastic#3227 (item 3)
#3127 moved our TAV tests CI runs from Jenkins to GH Actions. There are a few things to follow-up on with this:
.ci/scripts/test.sh -b "release" -t "${{ module }}" "${{node }}"
on my dev machine. However, it is useful to have check results reflected on a PR. Also for community PRs it is nice to run relevant TAV tests and have the results available via the PR. Before, when using Jenkins, we had therun module tests for <modules>
GH comment. It doesn't need to be a GitHub comment. See action: tav #3127 (comment) for earlier discussion on this..tav.yml
module/group names for all ".tav.yml" files in the repo (currently there are two)./cc @v1v (Victor, I'm not suggesting you need to do these things. I'll do some of them. Mostly I would appreciate suggestions/advice on the first item.)
The text was updated successfully, but these errors were encountered: