Skip to content

Commit

Permalink
Hide internals of some groupped workflows (#38604)
Browse files Browse the repository at this point in the history
When the whole workflow can be skipped and it's one of the workflows
than nothing depends on, we can skip the whole workflow rather than
individual jobs - then the workflow will not be shown as unfolded
with all the jobs skipped but as a single skipped workflow.

This is what we do for Additional CI image tests and Finalize tests
& special tests.

(cherry picked from commit 3f4872b)
  • Loading branch information
potiuk authored and ephraimbuddy committed Apr 16, 2024
1 parent 4727b4b commit 40c1cf8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/additional-ci-image-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ jobs:
use-uv: "true"
include-success-outputs: ${{ inputs.include-success-outputs }}
docker-cache: ${{ inputs.docker-cache }}
if: inputs.canary-run == 'true' && inputs.branch == 'main'
if: inputs.branch == 'main'

# Check that after earlier cache push, breeze command will build quickly
check-that-image-builds-quickly:
Expand All @@ -127,7 +127,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_USERNAME: ${{ github.actor }}
VERBOSE: "true"
if: inputs.canary-run == 'true' && inputs.branch == 'main'
if: inputs.branch == 'main'
steps:
- name: "Cleanup repo"
shell: bash
Expand Down Expand Up @@ -168,4 +168,3 @@ jobs:
use-uv: "true"
upgrade-to-newer-dependencies: ${{ inputs.upgrade-to-newer-dependencies }}
docker-cache: ${{ inputs.docker-cache }}
if: inputs.canary-run == 'true'
9 changes: 7 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ jobs:
name: "Additional CI image checks"
needs: [build-info, wait-for-ci-images]
uses: ./.github/workflows/additional-ci-image-checks.yml
if: needs.build-info.outputs.canary-run == 'true'
with:
runs-on-as-json-default: ${{ needs.build-info.outputs.runs-on-as-json-default }}
runs-on-as-json-public: ${{ needs.build-info.outputs.runs-on-as-json-public }}
Expand Down Expand Up @@ -441,6 +442,11 @@ jobs:
contents: read
packages: read
secrets: inherit
if: >
needs.build-info.outputs.run-tests == 'true' &&
(needs.build-info.outputs.canary-run == 'true' ||
needs.build-info.outputs.upgrade-to-newer-dependencies != 'false' ||
needs.build-info.outputs.full-tests-needed == 'true')
with:
runs-on-as-json-default: ${{ needs.build-info.outputs.runs-on-as-json-default }}
image-tag: ${{ needs.build-info.outputs.image-tag }}
Expand All @@ -451,7 +457,6 @@ jobs:
canary-run: ${{ needs.build-info.outputs.canary-run }}
upgrade-to-newer-dependencies: ${{ needs.build-info.outputs.upgrade-to-newer-dependencies }}
debug-resources: ${{ needs.build-info.outputs.debug-resources }}
if: needs.build-info.outputs.run-tests == 'true'

tests-integration:
name: Integration Tests
Expand Down Expand Up @@ -601,8 +606,8 @@ jobs:
- tests-mysql
- tests-postgres
- tests-non-db
- tests-special
- tests-integration
- tests-special
uses: ./.github/workflows/finalize-tests.yml
with:
runs-on-as-json-public: ${{ needs.build-info.outputs.runs-on-as-json-public }}
Expand Down
8 changes: 0 additions & 8 deletions .github/workflows/special-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ jobs:
contents: read
packages: read
secrets: inherit
if: inputs.canary-run == 'true' || inputs.upgrade-to-newer-dependencies == 'true'
with:
runs-on-as-json-default: ${{ inputs.runs-on-as-json-default }}
downgrade-sqlalchemy: "true"
Expand All @@ -87,7 +86,6 @@ jobs:
contents: read
packages: read
secrets: inherit
if: inputs.canary-run == 'true' || inputs.upgrade-to-newer-dependencies == 'true'
with:
runs-on-as-json-default: ${{ inputs.runs-on-as-json-default }}
upgrade-boto: "true"
Expand All @@ -110,7 +108,6 @@ jobs:
contents: read
packages: read
secrets: inherit
if: inputs.canary-run == 'true' || inputs.upgrade-to-newer-dependencies == 'true'
with:
runs-on-as-json-default: ${{ inputs.runs-on-as-json-default }}
pydantic: "v1"
Expand All @@ -133,7 +130,6 @@ jobs:
contents: read
packages: read
secrets: inherit
if: inputs.canary-run == 'true' || inputs.upgrade-to-newer-dependencies == 'true'
with:
runs-on-as-json-default: ${{ inputs.runs-on-as-json-default }}
pydantic: "none"
Expand All @@ -156,7 +152,6 @@ jobs:
contents: read
packages: read
secrets: inherit
if: inputs.canary-run == 'true' || inputs.upgrade-to-newer-dependencies == 'true'
with:
runs-on-as-json-default: ${{ inputs.runs-on-as-json-default }}
downgrade-pendulum: "true"
Expand All @@ -179,7 +174,6 @@ jobs:
contents: read
packages: read
secrets: inherit
if: inputs.canary-run == 'true' || inputs.upgrade-to-newer-dependencies == 'true'
with:
runs-on-as-json-default: ${{ inputs.runs-on-as-json-default }}
enable-aip-44: "false"
Expand All @@ -202,7 +196,6 @@ jobs:
contents: read
packages: read
secrets: inherit
if: inputs.canary-run == 'true' || inputs.upgrade-to-newer-dependencies == 'true'
with:
runs-on-as-json-default: ${{ inputs.runs-on-as-json-default }}
test-name: "Postgres"
Expand All @@ -224,7 +217,6 @@ jobs:
contents: read
packages: read
secrets: inherit
if: inputs.canary-run == 'true' || inputs.upgrade-to-newer-dependencies == 'true'
with:
runs-on-as-json-default: ${{ inputs.runs-on-as-json-default }}
test-name: "Postgres"
Expand Down

0 comments on commit 40c1cf8

Please sign in to comment.