|
72 | 72 | type: string |
73 | 73 | required: false |
74 | 74 | default: http://localhost:3000/ |
| 75 | + grafana-timeout: |
| 76 | + description: | |
| 77 | + Seconds to wait for the HTTP endpoint check before timing out. |
| 78 | + This maps to wait-for-grafana's `timeout` input. |
| 79 | + type: number |
| 80 | + required: false |
| 81 | + default: 60 |
| 82 | + grafana-startup-timeout: |
| 83 | + description: | |
| 84 | + Seconds to wait for Grafana startup before beginning endpoint checks. |
| 85 | + This maps to wait-for-grafana's `startupTimeout` input. |
| 86 | + type: number |
| 87 | + required: false |
| 88 | + default: 60 |
| 89 | + max-parallel: |
| 90 | + description: | |
| 91 | + Maximum number of matrix jobs to run in parallel. |
| 92 | + Defaults to 256 effectively unbounded. Lower values stagger Docker image pulls and Grafana |
| 93 | + startup across runners, which can avoid wait-for-grafana flakes. |
| 94 | + required: false |
| 95 | + type: number |
| 96 | + default: 256 |
75 | 97 | node-version: |
76 | 98 | description: Node.js version to use |
77 | 99 | type: string |
@@ -114,6 +136,7 @@ jobs: |
114 | 136 | timeout-minutes: 60 |
115 | 137 | strategy: |
116 | 138 | fail-fast: false |
| 139 | + max-parallel: ${{ inputs.max-parallel }} |
117 | 140 | matrix: |
118 | 141 | GRAFANA_IMAGE: ${{fromJson(needs.resolve-versions.outputs.matrix)}} |
119 | 142 | name: e2e ${{ matrix.GRAFANA_IMAGE.name }}@${{ matrix.GRAFANA_IMAGE.VERSION }} |
@@ -249,9 +272,26 @@ jobs: |
249 | 272 | DOCKER_COMPOSE_FILE: ${{ inputs.docker-compose-file }} |
250 | 273 |
|
251 | 274 | - name: Wait for Grafana to start |
252 | | - uses: grafana/plugin-actions/wait-for-grafana@wait-for-grafana/v1.0.2 |
| 275 | + id: wait-for-grafana |
| 276 | + uses: grafana/plugin-actions/wait-for-grafana@wait-for-grafana/v1.0.3 |
253 | 277 | with: |
254 | 278 | url: "${{ inputs.grafana-url }}" |
| 279 | + timeout: "${{ inputs.grafana-timeout }}" |
| 280 | + startupTimeout: "${{ inputs.grafana-startup-timeout }}" |
| 281 | + |
| 282 | + - name: Capture Grafana logs on startup failure |
| 283 | + if: ${{ failure() && steps.wait-for-grafana.outcome == 'failure' }} |
| 284 | + shell: bash |
| 285 | + working-directory: ${{ inputs.plugin-directory }} |
| 286 | + run: | |
| 287 | + echo "::group::docker compose ps" |
| 288 | + docker compose ${DOCKER_COMPOSE_FILE:+-f "$DOCKER_COMPOSE_FILE"} ps -a || true |
| 289 | + echo "::endgroup::" |
| 290 | + echo "::group::docker compose logs" |
| 291 | + docker compose ${DOCKER_COMPOSE_FILE:+-f "$DOCKER_COMPOSE_FILE"} logs --no-color --tail 500 || true |
| 292 | + echo "::endgroup::" |
| 293 | + env: |
| 294 | + DOCKER_COMPOSE_FILE: ${{ inputs.docker-compose-file }} |
255 | 295 |
|
256 | 296 | - name: Run Playwright tests |
257 | 297 | id: run-tests |
|
0 commit comments