This is an automated email from the ASF dual-hosted git repository. potiuk pushed a commit to branch v2-3-test in repository https://gitbox.apache.org/repos/asf/airflow.git
commit 4baf1d569a62d43386a260e47ae222543b6c9553 Author: Jarek Potiuk <[email protected]> AuthorDate: Sun Jun 26 11:07:49 2022 +0200 Handle "workflow_run" event properly in selective-check (#24656) Unfortunately testing workflow_run is a bit difficult because the changes are only effective after merging them. Fixing (hopefully) yet another mistake in the workflow run where commit hash was passed as event name (?) We are going to handle "workflow_run" as valid event type so this should now work without passing any event. (cherry picked from commit e83e7c85c1bc3e634ad8a97224090028c0fd81b9) --- .../workflows/label_when_reviewed_workflow_run.yml | 2 +- dev/breeze/src/airflow_breeze/global_constants.py | 1 + images/breeze/output-commands-hash.txt | 2 +- images/breeze/output-selective-check.svg | 96 +++++++++++----------- 4 files changed, 51 insertions(+), 50 deletions(-) diff --git a/.github/workflows/label_when_reviewed_workflow_run.yml b/.github/workflows/label_when_reviewed_workflow_run.yml index e818e8411a..b84ab34a79 100644 --- a/.github/workflows/label_when_reviewed_workflow_run.yml +++ b/.github/workflows/label_when_reviewed_workflow_run.yml @@ -96,7 +96,7 @@ jobs: env: PR_LABELS: "${{ steps.source-run-info.outputs.pullRequestLabels }}" COMMIT_REF: "${{ steps.source-run-info.outputs.targetCommitSha }}" - run: breeze selective-check --github-event-name "${{ steps.source-run-info.outputs.targetCommitSha }}" + run: breeze selective-check - name: "Label when approved by committers for PRs that require full tests" uses: ./.github/actions/label-when-approved-action id: label-full-test-prs-when-approved-by-commiters diff --git a/dev/breeze/src/airflow_breeze/global_constants.py b/dev/breeze/src/airflow_breeze/global_constants.py index 41acd12e45..8dedc191f7 100644 --- a/dev/breeze/src/airflow_breeze/global_constants.py +++ b/dev/breeze/src/airflow_breeze/global_constants.py @@ -298,6 +298,7 @@ class GithubEvents(Enum): PULL_REQUEST_TARGET = "pull_request_target" PUSH = "push" SCHEDULE = "schedule" + WORKFLOW_RUN = "workflow_run" @lru_cache(maxsize=None) diff --git a/images/breeze/output-commands-hash.txt b/images/breeze/output-commands-hash.txt index 194d9690d8..e7e333b83e 100644 --- a/images/breeze/output-commands-hash.txt +++ b/images/breeze/output-commands-hash.txt @@ -2,4 +2,4 @@ # This file is automatically generated by pre-commit. If you have a conflict with this file # Please do not solve it but run `breeze regenerate-command-images`. # This command should fix the conflict and regenerate help images that you have conflict with. -b5c4ae62f5ac472a83af3a8eca75ed9b +60ea24df0a84c6739fc5f06197cdd201 diff --git a/images/breeze/output-selective-check.svg b/images/breeze/output-selective-check.svg index 3ea08a5bf7..67bc6c5253 100644 --- a/images/breeze/output-selective-check.svg +++ b/images/breeze/output-selective-check.svg @@ -19,113 +19,113 @@ font-weight: 700; } - .terminal-3258521135-matrix { + .terminal-417995322-matrix { font-family: Fira Code, monospace; font-size: 20px; line-height: 24.4px; font-variant-east-asian: full-width; } - .terminal-3258521135-title { + .terminal-417995322-title { font-size: 18px; font-weight: bold; font-family: arial; } - .terminal-3258521135-r1 { fill: #c5c8c6;font-weight: bold } -.terminal-3258521135-r2 { fill: #c5c8c6 } -.terminal-3258521135-r3 { fill: #d0b344;font-weight: bold } -.terminal-3258521135-r4 { fill: #868887 } -.terminal-3258521135-r5 { fill: #68a0b3;font-weight: bold } -.terminal-3258521135-r6 { fill: #8d7b39 } -.terminal-3258521135-r7 { fill: #98a84b;font-weight: bold } + .terminal-417995322-r1 { fill: #c5c8c6;font-weight: bold } +.terminal-417995322-r2 { fill: #c5c8c6 } +.terminal-417995322-r3 { fill: #d0b344;font-weight: bold } +.terminal-417995322-r4 { fill: #868887 } +.terminal-417995322-r5 { fill: #68a0b3;font-weight: bold } +.terminal-417995322-r6 { fill: #8d7b39 } +.terminal-417995322-r7 { fill: #98a84b;font-weight: bold } </style> <defs> - <clipPath id="terminal-3258521135-clip-terminal"> + <clipPath id="terminal-417995322-clip-terminal"> <rect x="0" y="0" width="1463.0" height="438.2" /> </clipPath> - <clipPath id="terminal-3258521135-line-0"> + <clipPath id="terminal-417995322-line-0"> <rect x="0" y="1.5" width="1464" height="24.65"/> </clipPath> -<clipPath id="terminal-3258521135-line-1"> +<clipPath id="terminal-417995322-line-1"> <rect x="0" y="25.9" width="1464" height="24.65"/> </clipPath> -<clipPath id="terminal-3258521135-line-2"> +<clipPath id="terminal-417995322-line-2"> <rect x="0" y="50.3" width="1464" height="24.65"/> </clipPath> -<clipPath id="terminal-3258521135-line-3"> +<clipPath id="terminal-417995322-line-3"> <rect x="0" y="74.7" width="1464" height="24.65"/> </clipPath> -<clipPath id="terminal-3258521135-line-4"> +<clipPath id="terminal-417995322-line-4"> <rect x="0" y="99.1" width="1464" height="24.65"/> </clipPath> -<clipPath id="terminal-3258521135-line-5"> +<clipPath id="terminal-417995322-line-5"> <rect x="0" y="123.5" width="1464" height="24.65"/> </clipPath> -<clipPath id="terminal-3258521135-line-6"> +<clipPath id="terminal-417995322-line-6"> <rect x="0" y="147.9" width="1464" height="24.65"/> </clipPath> -<clipPath id="terminal-3258521135-line-7"> +<clipPath id="terminal-417995322-line-7"> <rect x="0" y="172.3" width="1464" height="24.65"/> </clipPath> -<clipPath id="terminal-3258521135-line-8"> +<clipPath id="terminal-417995322-line-8"> <rect x="0" y="196.7" width="1464" height="24.65"/> </clipPath> -<clipPath id="terminal-3258521135-line-9"> +<clipPath id="terminal-417995322-line-9"> <rect x="0" y="221.1" width="1464" height="24.65"/> </clipPath> -<clipPath id="terminal-3258521135-line-10"> +<clipPath id="terminal-417995322-line-10"> <rect x="0" y="245.5" width="1464" height="24.65"/> </clipPath> -<clipPath id="terminal-3258521135-line-11"> +<clipPath id="terminal-417995322-line-11"> <rect x="0" y="269.9" width="1464" height="24.65"/> </clipPath> -<clipPath id="terminal-3258521135-line-12"> +<clipPath id="terminal-417995322-line-12"> <rect x="0" y="294.3" width="1464" height="24.65"/> </clipPath> -<clipPath id="terminal-3258521135-line-13"> +<clipPath id="terminal-417995322-line-13"> <rect x="0" y="318.7" width="1464" height="24.65"/> </clipPath> -<clipPath id="terminal-3258521135-line-14"> +<clipPath id="terminal-417995322-line-14"> <rect x="0" y="343.1" width="1464" height="24.65"/> </clipPath> -<clipPath id="terminal-3258521135-line-15"> +<clipPath id="terminal-417995322-line-15"> <rect x="0" y="367.5" width="1464" height="24.65"/> </clipPath> -<clipPath id="terminal-3258521135-line-16"> +<clipPath id="terminal-417995322-line-16"> <rect x="0" y="391.9" width="1464" height="24.65"/> </clipPath> </defs> - <rect fill="#292929" stroke="rgba(255,255,255,0.35)" stroke-width="1" x="1" y="1" width="1480" height="487.2" rx="8"/><text class="terminal-3258521135-title" fill="#c5c8c6" text-anchor="middle" x="740" y="27">Command: selective-check</text> + <rect fill="#292929" stroke="rgba(255,255,255,0.35)" stroke-width="1" x="1" y="1" width="1480" height="487.2" rx="8"/><text class="terminal-417995322-title" fill="#c5c8c6" text-anchor="middle" x="740" y="27">Command: selective-check</text> <g transform="translate(26,22)"> <circle cx="0" cy="0" r="7" fill="#ff5f57"/> <circle cx="22" cy="0" r="7" fill="#febc2e"/> <circle cx="44" cy="0" r="7" fill="#28c840"/> </g> - <g transform="translate(9, 41)" clip-path="url(#terminal-3258521135-clip-terminal)"> + <g transform="translate(9, 41)" clip-path="url(#terminal-417995322-clip-terminal)"> - <g class="terminal-3258521135-matrix"> - <text class="terminal-3258521135-r2" x="1464" y="20" textLength="12.2" clip-path="url(#terminal-3258521135-line-0)"> -</text><text class="terminal-3258521135-r3" x="12.2" y="44.4" textLength="85.4" clip-path="url(#terminal-3258521135-line-1)">Usage: </text><text class="terminal-3258521135-r1" x="97.6" y="44.4" textLength="390.4" clip-path="url(#terminal-3258521135-line-1)">breeze selective-check [OPTIONS]</text><text class="terminal-3258521135-r2" x="1464" y="44.4" textLength="12.2" clip-path="url(#terminal-3258521135-line-1)"> -</text><text class="terminal-3258521135-r2" x="1464" y="68.8" textLength="12.2" clip-path="url(#terminal-3258521135-line-2)"> -</text><text class="terminal-3258521135-r2" x="12.2" y="93.2" textLength="768.6" clip-path="url(#terminal-3258521135-line-3)">Checks what kind of tests should be run for an incoming commit.</text><text class="terminal-3258521135-r2" x="1464" y="93.2" textLength="12.2" clip-path="url(#terminal-3258521135-line-3)"> -</text><text class="terminal-3258521135-r2" x="1464" y="117.6" textLength="12.2" clip-path="url(#terminal-3258521135-line-4)"> -</text><text class="terminal-3258521135-r4" x="0" y="142" textLength="24.4" clip-path="url(#terminal-3258521135-line-5)">╭─</text><text class="terminal-3258521135-r4" x="24.4" y="142" textLength="1415.2" clip-path="url(#terminal-3258521135-line-5)"> Selective check flags ─────────────────────────────────────────────────────────────────────────────────────────────</text><text class="terminal-3258521135-r4" x="1439.6" y="142" textLength="24.4" clip-path="url(#terminal-3 [...] -</text><text class="terminal-3258521135-r4" x="0" y="166.4" textLength="12.2" clip-path="url(#terminal-3258521135-line-6)">│</text><text class="terminal-3258521135-r5" x="24.4" y="166.4" textLength="12.2" clip-path="url(#terminal-3258521135-line-6)">-</text><text class="terminal-3258521135-r5" x="36.6" y="166.4" textLength="85.4" clip-path="url(#terminal-3258521135-line-6)">-commit</text><text class="terminal-3258521135-r5" x="122" y="166.4" textLength="48.8" clip-path="url(#terminal-325 [...] -</text><text class="terminal-3258521135-r4" x="0" y="190.8" textLength="12.2" clip-path="url(#terminal-3258521135-line-7)">│</text><text class="terminal-3258521135-r5" x="24.4" y="190.8" textLength="12.2" clip-path="url(#terminal-3258521135-line-7)">-</text><text class="terminal-3258521135-r5" x="36.6" y="190.8" textLength="36.6" clip-path="url(#terminal-3258521135-line-7)">-pr</text><text class="terminal-3258521135-r5" x="73.2" y="190.8" textLength="85.4" clip-path="url(#terminal-325852 [...] -</text><text class="terminal-3258521135-r4" x="0" y="215.2" textLength="12.2" clip-path="url(#terminal-3258521135-line-8)">│</text><text class="terminal-3258521135-r5" x="24.4" y="215.2" textLength="12.2" clip-path="url(#terminal-3258521135-line-8)">-</text><text class="terminal-3258521135-r5" x="36.6" y="215.2" textLength="97.6" clip-path="url(#terminal-3258521135-line-8)">-default</text><text class="terminal-3258521135-r5" x="134.2" y="215.2" textLength="85.4" clip-path="url(#terminal- [...] -</text><text class="terminal-3258521135-r4" x="0" y="239.6" textLength="12.2" clip-path="url(#terminal-3258521135-line-9)">│</text><text class="terminal-3258521135-r5" x="24.4" y="239.6" textLength="12.2" clip-path="url(#terminal-3258521135-line-9)">-</text><text class="terminal-3258521135-r5" x="36.6" y="239.6" textLength="85.4" clip-path="url(#terminal-3258521135-line-9)">-github</text><text class="terminal-3258521135-r5" x="122" y="239.6" textLength="134.2" clip-path="url(#terminal-32 [...] -</text><text class="terminal-3258521135-r4" x="0" y="264" textLength="12.2" clip-path="url(#terminal-3258521135-line-10)">│</text><text class="terminal-3258521135-r6" x="305" y="264" textLength="927.2" clip-path="url(#terminal-3258521135-line-10)">(pull_request | pull_request_review | pull_request_target | push | schedule)</text><text class="terminal-3258521135-r4" x="1451.8" y="264" textLength="12.2" clip-path="url(#terminal-3258521135-line-10)">│ [...] -</text><text class="terminal-3258521135-r4" x="0" y="288.4" textLength="12.2" clip-path="url(#terminal-3258521135-line-11)">│</text><text class="terminal-3258521135-r4" x="305" y="288.4" textLength="927.2" clip-path="url(#terminal-3258521135-line-11)">[default: pull_request]                                   &# [...] -</text><text class="terminal-3258521135-r4" x="0" y="312.8" textLength="1464" clip-path="url(#terminal-3258521135-line-12)">╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯</text><text class="terminal-3258521135-r2" x="1464" y="312.8" textLength="12.2" clip-path="url(#terminal-3258521135-line-12)"> -</text><text class="terminal-3258521135-r4" x="0" y="337.2" textLength="24.4" clip-path="url(#terminal-3258521135-line-13)">╭─</text><text class="terminal-3258521135-r4" x="24.4" y="337.2" textLength="1415.2" clip-path="url(#terminal-3258521135-line-13)"> Options ───────────────────────────────────────────────────────────────────────────────────────────────────────────</text><text class="terminal-3258521135-r4" x="1439.6" y="337.2" textLength="24.4" clip-path="url(#terminal-325 [...] -</text><text class="terminal-3258521135-r4" x="0" y="361.6" textLength="12.2" clip-path="url(#terminal-3258521135-line-14)">│</text><text class="terminal-3258521135-r5" x="24.4" y="361.6" textLength="12.2" clip-path="url(#terminal-3258521135-line-14)">-</text><text class="terminal-3258521135-r5" x="36.6" y="361.6" textLength="97.6" clip-path="url(#terminal-3258521135-line-14)">-verbose</text><text class="terminal-3258521135-r7" x="158.6" y="361.6" textLength="24.4" clip-path="url(#termin [...] -</text><text class="terminal-3258521135-r4" x="0" y="386" textLength="12.2" clip-path="url(#terminal-3258521135-line-15)">│</text><text class="terminal-3258521135-r5" x="24.4" y="386" textLength="12.2" clip-path="url(#terminal-3258521135-line-15)">-</text><text class="terminal-3258521135-r5" x="36.6" y="386" textLength="48.8" clip-path="url(#terminal-3258521135-line-15)">-dry</text><text class="terminal-3258521135-r5" x="85.4" y="386" textLength="48.8" clip-path="url(#terminal-3258521135 [...] -</text><text class="terminal-3258521135-r4" x="0" y="410.4" textLength="12.2" clip-path="url(#terminal-3258521135-line-16)">│</text><text class="terminal-3258521135-r5" x="24.4" y="410.4" textLength="12.2" clip-path="url(#terminal-3258521135-line-16)">-</text><text class="terminal-3258521135-r5" x="36.6" y="410.4" textLength="61" clip-path="url(#terminal-3258521135-line-16)">-help</text><text class="terminal-3258521135-r7" x="158.6" y="410.4" textLength="24.4" clip-path="url(#terminal-32 [...] -</text><text class="terminal-3258521135-r4" x="0" y="434.8" textLength="1464" clip-path="url(#terminal-3258521135-line-17)">╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯</text><text class="terminal-3258521135-r2" x="1464" y="434.8" textLength="12.2" clip-path="url(#terminal-3258521135-line-17)"> + <g class="terminal-417995322-matrix"> + <text class="terminal-417995322-r2" x="1464" y="20" textLength="12.2" clip-path="url(#terminal-417995322-line-0)"> +</text><text class="terminal-417995322-r3" x="12.2" y="44.4" textLength="85.4" clip-path="url(#terminal-417995322-line-1)">Usage: </text><text class="terminal-417995322-r1" x="97.6" y="44.4" textLength="390.4" clip-path="url(#terminal-417995322-line-1)">breeze selective-check [OPTIONS]</text><text class="terminal-417995322-r2" x="1464" y="44.4" textLength="12.2" clip-path="url(#terminal-417995322-line-1)"> +</text><text class="terminal-417995322-r2" x="1464" y="68.8" textLength="12.2" clip-path="url(#terminal-417995322-line-2)"> +</text><text class="terminal-417995322-r2" x="12.2" y="93.2" textLength="768.6" clip-path="url(#terminal-417995322-line-3)">Checks what kind of tests should be run for an incoming commit.</text><text class="terminal-417995322-r2" x="1464" y="93.2" textLength="12.2" clip-path="url(#terminal-417995322-line-3)"> +</text><text class="terminal-417995322-r2" x="1464" y="117.6" textLength="12.2" clip-path="url(#terminal-417995322-line-4)"> +</text><text class="terminal-417995322-r4" x="0" y="142" textLength="24.4" clip-path="url(#terminal-417995322-line-5)">╭─</text><text class="terminal-417995322-r4" x="24.4" y="142" textLength="1415.2" clip-path="url(#terminal-417995322-line-5)"> Selective check flags ─────────────────────────────────────────────────────────────────────────────────────────────</text><text class="terminal-417995322-r4" x="1439.6" y="142" textLength="24.4" clip-path="url(#terminal-417995 [...] +</text><text class="terminal-417995322-r4" x="0" y="166.4" textLength="12.2" clip-path="url(#terminal-417995322-line-6)">│</text><text class="terminal-417995322-r5" x="24.4" y="166.4" textLength="12.2" clip-path="url(#terminal-417995322-line-6)">-</text><text class="terminal-417995322-r5" x="36.6" y="166.4" textLength="85.4" clip-path="url(#terminal-417995322-line-6)">-commit</text><text class="terminal-417995322-r5" x="122" y="166.4" textLength="48.8" clip-path="url(#terminal-417995322- [...] +</text><text class="terminal-417995322-r4" x="0" y="190.8" textLength="12.2" clip-path="url(#terminal-417995322-line-7)">│</text><text class="terminal-417995322-r5" x="24.4" y="190.8" textLength="12.2" clip-path="url(#terminal-417995322-line-7)">-</text><text class="terminal-417995322-r5" x="36.6" y="190.8" textLength="36.6" clip-path="url(#terminal-417995322-line-7)">-pr</text><text class="terminal-417995322-r5" x="73.2" y="190.8" textLength="85.4" clip-path="url(#terminal-417995322-lin [...] +</text><text class="terminal-417995322-r4" x="0" y="215.2" textLength="12.2" clip-path="url(#terminal-417995322-line-8)">│</text><text class="terminal-417995322-r5" x="24.4" y="215.2" textLength="12.2" clip-path="url(#terminal-417995322-line-8)">-</text><text class="terminal-417995322-r5" x="36.6" y="215.2" textLength="97.6" clip-path="url(#terminal-417995322-line-8)">-default</text><text class="terminal-417995322-r5" x="134.2" y="215.2" textLength="85.4" clip-path="url(#terminal-4179953 [...] +</text><text class="terminal-417995322-r4" x="0" y="239.6" textLength="12.2" clip-path="url(#terminal-417995322-line-9)">│</text><text class="terminal-417995322-r5" x="24.4" y="239.6" textLength="12.2" clip-path="url(#terminal-417995322-line-9)">-</text><text class="terminal-417995322-r5" x="36.6" y="239.6" textLength="85.4" clip-path="url(#terminal-417995322-line-9)">-github</text><text class="terminal-417995322-r5" x="122" y="239.6" textLength="134.2" clip-path="url(#terminal-417995322 [...] +</text><text class="terminal-417995322-r4" x="0" y="264" textLength="12.2" clip-path="url(#terminal-417995322-line-10)">│</text><text class="terminal-417995322-r6" x="305" y="264" textLength="1110.2" clip-path="url(#terminal-417995322-line-10)">(pull_request | pull_request_review | pull_request_target | push | schedule | workflow_run)</text><text class="terminal-417995322-r4" x="1451.8" y="264" textLength="12.2" clip-path="url(#terminal-4 [...] +</text><text class="terminal-417995322-r4" x="0" y="288.4" textLength="12.2" clip-path="url(#terminal-417995322-line-11)">│</text><text class="terminal-417995322-r4" x="305" y="288.4" textLength="1110.2" clip-path="url(#terminal-417995322-line-11)">[default: pull_request]                                     [...] +</text><text class="terminal-417995322-r4" x="0" y="312.8" textLength="1464" clip-path="url(#terminal-417995322-line-12)">╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯</text><text class="terminal-417995322-r2" x="1464" y="312.8" textLength="12.2" clip-path="url(#terminal-417995322-line-12)"> +</text><text class="terminal-417995322-r4" x="0" y="337.2" textLength="24.4" clip-path="url(#terminal-417995322-line-13)">╭─</text><text class="terminal-417995322-r4" x="24.4" y="337.2" textLength="1415.2" clip-path="url(#terminal-417995322-line-13)"> Options ───────────────────────────────────────────────────────────────────────────────────────────────────────────</text><text class="terminal-417995322-r4" x="1439.6" y="337.2" textLength="24.4" clip-path="url(#terminal-41799532 [...] +</text><text class="terminal-417995322-r4" x="0" y="361.6" textLength="12.2" clip-path="url(#terminal-417995322-line-14)">│</text><text class="terminal-417995322-r5" x="24.4" y="361.6" textLength="12.2" clip-path="url(#terminal-417995322-line-14)">-</text><text class="terminal-417995322-r5" x="36.6" y="361.6" textLength="97.6" clip-path="url(#terminal-417995322-line-14)">-verbose</text><text class="terminal-417995322-r7" x="158.6" y="361.6" textLength="24.4" clip-path="url(#terminal-4179 [...] +</text><text class="terminal-417995322-r4" x="0" y="386" textLength="12.2" clip-path="url(#terminal-417995322-line-15)">│</text><text class="terminal-417995322-r5" x="24.4" y="386" textLength="12.2" clip-path="url(#terminal-417995322-line-15)">-</text><text class="terminal-417995322-r5" x="36.6" y="386" textLength="48.8" clip-path="url(#terminal-417995322-line-15)">-dry</text><text class="terminal-417995322-r5" x="85.4" y="386" textLength="48.8" clip-path="url(#terminal-417995322-line-15 [...] +</text><text class="terminal-417995322-r4" x="0" y="410.4" textLength="12.2" clip-path="url(#terminal-417995322-line-16)">│</text><text class="terminal-417995322-r5" x="24.4" y="410.4" textLength="12.2" clip-path="url(#terminal-417995322-line-16)">-</text><text class="terminal-417995322-r5" x="36.6" y="410.4" textLength="61" clip-path="url(#terminal-417995322-line-16)">-help</text><text class="terminal-417995322-r7" x="158.6" y="410.4" textLength="24.4" clip-path="url(#terminal-417995322 [...] +</text><text class="terminal-417995322-r4" x="0" y="434.8" textLength="1464" clip-path="url(#terminal-417995322-line-17)">╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯</text><text class="terminal-417995322-r2" x="1464" y="434.8" textLength="12.2" clip-path="url(#terminal-417995322-line-17)"> </text> </g> </g>
