-
Notifications
You must be signed in to change notification settings - Fork 2k
fix(ci): address issues in integration test suite workflow #17928
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -46,25 +46,10 @@ jobs: | |
| int_tests: true | ||
| secrets: inherit | ||
|
|
||
| detect-user: | ||
| name: Detect user team membership | ||
| runs-on: ubuntu-latest | ||
| outputs: | ||
| IS_TEAM_MEMBER: ${{ steps.author.outputs.isTeamMember }} | ||
| steps: | ||
| - name: Get PR author | ||
| if: github.event_name == 'pull_request' | ||
| id: author | ||
| uses: tspascoal/get-user-teams-membership@v2 | ||
| with: | ||
| username: ${{ github.actor }} | ||
| team: 'Vector' | ||
| GITHUB_TOKEN: ${{ secrets.GH_PAT_ORG }} | ||
|
|
||
| integration-tests: | ||
| name: Integration Tests | ||
| runs-on: [linux, ubuntu-20.04-4core] | ||
| needs: [changes, detect-user] | ||
| needs: changes | ||
| if: always() && ( | ||
| github.event_name == 'merge_group' || ( | ||
| needs.changes.outputs.all-int == 'true' | ||
|
|
@@ -110,6 +95,17 @@ jobs: | |
|
|
||
| - run: docker image prune -af ; docker container prune -f | ||
|
|
||
| - name: Determine if secrets are defined (PR author is team member). | ||
neuronull marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| if: github.event_name == 'pull_request' | ||
| env: | ||
| GH_PAT_ORG: ${{ secrets.GH_PAT_ORG }} | ||
| run: | | ||
| if [[ "$GH_PAT_ORG" != "" ]] ; then | ||
| echo "PR_HAS_ACCESS_TO_SECRETS=true" >> "$GITHUB_ENV" | ||
| else | ||
| echo "PR_HAS_ACCESS_TO_SECRETS=false" >> "$GITHUB_ENV" | ||
| fi | ||
|
|
||
| - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.amqp == 'true' }} | ||
| name: amqp | ||
| uses: nick-fields/retry@v2 | ||
|
|
@@ -119,7 +115,7 @@ jobs: | |
| command: bash scripts/ci-integration-test.sh amqp | ||
|
|
||
| - if: (github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.appsignal == 'true') && | ||
| (github.event_name != 'pull_request' || needs.detect-user.outputs.IS_TEAM_MEMBER == 'true') | ||
| (github.event_name != 'pull_request' || env.PR_HAS_ACCESS_TO_SECRETS == 'true') | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We don't need to change this now, but I'm thinking we could have actually had each integration test step that needed access to a given secret to just check access for that particular secret.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, that is better. If we move back to this workflow using a matrix (like when we get caching going) , that would still work, it would just be condensed. |
||
| name: appsignal | ||
| uses: nick-fields/retry@v2 | ||
| with: | ||
|
|
@@ -136,7 +132,7 @@ jobs: | |
| command: bash scripts/ci-integration-test.sh aws | ||
|
|
||
| - if: (github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.axiom == 'true') && | ||
| (github.event_name != 'pull_request' || needs.detect-user.outputs.IS_TEAM_MEMBER == 'true') | ||
| (github.event_name != 'pull_request' || env.PR_HAS_ACCESS_TO_SECRETS == 'true') | ||
| name: axiom | ||
| uses: nick-fields/retry@v2 | ||
| with: | ||
|
|
@@ -161,7 +157,7 @@ jobs: | |
| command: bash scripts/ci-integration-test.sh clickhouse | ||
|
|
||
| - if: (github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.databend == 'true') && | ||
| (github.event_name != 'pull_request' || needs.detect-user.outputs.IS_TEAM_MEMBER == 'true') | ||
| (github.event_name != 'pull_request' || env.PR_HAS_ACCESS_TO_SECRETS == 'true') | ||
| name: databend | ||
| uses: nick-fields/retry@v2 | ||
| with: | ||
|
|
@@ -170,7 +166,7 @@ jobs: | |
| command: bash scripts/ci-integration-test.sh databend | ||
|
|
||
| - if: (github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.datadog == 'true') && | ||
| (github.event_name != 'pull_request' || needs.detect-user.outputs.IS_TEAM_MEMBER == 'true') | ||
| (github.event_name != 'pull_request' || env.PR_HAS_ACCESS_TO_SECRETS == 'true') | ||
| name: datadog-agent | ||
| uses: nick-fields/retry@v2 | ||
| with: | ||
|
|
@@ -179,7 +175,7 @@ jobs: | |
| command: bash scripts/ci-integration-test.sh datadog-agent | ||
|
|
||
| - if: (github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.datadog == 'true') && | ||
| (github.event_name != 'pull_request' || needs.detect-user.outputs.IS_TEAM_MEMBER == 'true') | ||
| (github.event_name != 'pull_request' || env.PR_HAS_ACCESS_TO_SECRETS == 'true') | ||
| name: datadog-logs | ||
| uses: nick-fields/retry@v2 | ||
| with: | ||
|
|
@@ -188,7 +184,7 @@ jobs: | |
| command: bash scripts/ci-integration-test.sh datadog-logs | ||
|
|
||
| - if: (github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.datadog == 'true') && | ||
| (github.event_name != 'pull_request' || needs.detect-user.outputs.IS_TEAM_MEMBER == 'true') | ||
| (github.event_name != 'pull_request' || env.PR_HAS_ACCESS_TO_SECRETS == 'true') | ||
| name: datadog-metrics | ||
| uses: nick-fields/retry@v2 | ||
| with: | ||
|
|
@@ -197,7 +193,7 @@ jobs: | |
| command: bash scripts/ci-integration-test.sh datadog-metrics | ||
|
|
||
| - if: (github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.datadog == 'true') && | ||
| (github.event_name != 'pull_request' || needs.detect-user.outputs.IS_TEAM_MEMBER == 'true') | ||
| (github.event_name != 'pull_request' || env.PR_HAS_ACCESS_TO_SECRETS == 'true') | ||
| name: datadog-traces | ||
| uses: nick-fields/retry@v2 | ||
| with: | ||
|
|
@@ -398,6 +394,7 @@ jobs: | |
| runs-on: ubuntu-latest | ||
| if: always() | ||
| needs: | ||
| - changes | ||
| - integration-tests | ||
| env: | ||
| FAILED: ${{ contains(needs.*.result, 'failure') }} | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -127,7 +127,7 @@ jobs: | |
| name: Test Suite | ||
| runs-on: ubuntu-20.04 | ||
| if: always() | ||
| needs: checks | ||
| needs: [changes, checks] | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. note that that I believe the only other workflow with this issue is the integration comment trigger one- the fix is less simple than this so omitting that from this PR, plus it isn't part of the merge queue, the issue only manifests as a failure to properly update the PR status check. |
||
| env: | ||
| FAILED: ${{ contains(needs.*.result, 'failure') }} | ||
| steps: | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.