Test Label Trigger - #843
Open
oxve wants to merge 8 commits into
Open
Conversation
Contributor
🤖 Gemini Suggested Commit Message💡 Pro Tips for a Better Commit Message:
|
Contributor
There was a problem hiding this comment.
Code Review
This pull request fixes a syntax error in the print_logs action by adding a missing closing quote to a file path. A review comment identifies a potential logic issue where the source GCS path lacks the matrix configuration variable present in the destination path, which could cause the copy command to fail.
| run: | | ||
| gcloud storage cp "gs://${{ steps.gcs-project.outputs.name }}-test-artifacts/${WORKFLOW}/${GITHUB_RUN_NUMBER}/${{matrix.platform}}/symbols/*" \ | ||
| "${GITHUB_WORKSPACE}/out/${{ matrix.platform }}_${{ matrix.config }}/lib.unstripped/ | ||
| "${GITHUB_WORKSPACE}/out/${{ matrix.platform }}_${{ matrix.config }}/lib.unstripped/" |
Contributor
There was a problem hiding this comment.
The destination path includes ${{ matrix.config }}, but the source GCS path on line 32 only uses ${{matrix.platform}}. This inconsistency will likely cause the command to fail if the artifacts in the GCS bucket are organized by both platform and configuration, which is the standard practice for build symbols.
copybara-service
Bot
force-pushed
the
main
branch
2 times, most recently
from
April 23, 2026 11:19
6367de0 to
239d465
Compare
Problem:
Applying any label to a PR currently retriggers all workflows, causing
unnecessary resource consumption and noise in PR checks.
Solution:
1. **Remove static labeled triggers**: Removed the 'labeled' event from
the 'on.pull_request.types' list in android.yaml, aosp.yaml,
evergreen.yaml, and tvos.yaml.
2. **Central Dispatcher**: Added .github/workflows/workflow_dispatcher.yaml
running on 'pull_request_target' 'labeled' events.
- It dynamically scans the .github/workflows directory for any
workflows calling the shared main.yaml workflow.
- If the triggering label is 'runtest' or 'yts_playback_test', it
reruns the latest run of these detected workflows.
- It handles 'kokoro:run' and 'kokoro:force-run' as a special case,
triggering tvos.yaml (which does not use main.yaml).
3. **Dynamic Label Detection**: Since GHA reruns use the original event
payload (which doesn't have the new label), updated main.yaml to
fetch the current labels dynamically using 'gh pr view' in the
'initialize' job.
4. **Updated Job Conditions**: Updated main.yaml test jobs (e2e-test,
yts-test, yts-playback-test) to use these dynamically fetched
labels to decide if they should run.
This ensures workflows are only rerun when relevant labels are added,
and new workflows using main.yaml are automatically supported without
hardcoding.
TAG=agy
CONV=96b1fa9b-61e9-4116-a9a9-aa7eea25554c
# Conflicts: # .github/workflows/main.yaml
…anup - Cancel active/queued workflow runs before rerunning to ensure GitHub Actions rerun requests succeed. - Defer label cleanup to validate-test-result in main.yaml so parallel workflows can read the label in initialize without race conditions. Bug: 546243560
oxve
force-pushed
the
reuse-build-artifacts_sandbox
branch
from
August 14, 2026 17:01
97286ea to
d01f125
Compare
| GIT_COMMITTER_NAME: "cobalt-github-releaser-bot" | ||
| GIT_COMMITTER_EMAIL: "cobalt-github-releaser-bot@google.com" | ||
| permissions: | ||
| contents: write |
| if: github.event_name == 'workflow_dispatch' || github.event.label.name == 'runtest' || github.event.label.name == 'yts_playback_test' || github.event.label.name == 'kokoro:run' || github.event.label.name == 'kokoro:force-run' | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| actions: write |
| ] | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 |
| pull-requests: write | ||
| steps: | ||
| - name: Check label and trigger PR jobs | ||
| uses: actions/github-script@v8 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Testing label trigger and artifact reuse.