Skip to content
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

chore(ci): deck integration tests fail CI on test failure #13475

Merged
merged 1 commit into from
Aug 20, 2024

Conversation

samugi
Copy link
Member

@samugi samugi commented Aug 8, 2024

Summary

when deck integration tests fail, a request for changes was created in the PR. This was often ignored: let's fail CI instead.

Checklist

  • The Pull Request has tests
  • A changelog file has been created under changelog/unreleased/kong or skip-changelog label added on PR if changelog is unnecessary. README.md
  • There is a user-facing docs PR against https://github.com/Kong/docs.konghq.com - PUT DOCS PR HERE

Issue reference

KAG-5058

@github-actions github-actions bot added the chore Not part of the core functionality of kong, but still needed label Aug 8, 2024
@samugi samugi marked this pull request as draft August 8, 2024 13:56
github-actions[bot]

This comment was marked as outdated.

@github-actions github-actions bot added core/admin-api cherry-pick kong-ee schedule this PR for cherry-picking to kong/kong-ee labels Aug 8, 2024
@samugi samugi force-pushed the fix/deck-integration-tests-dismiss-review branch 2 times, most recently from 0c5a8a3 to 43604b8 Compare August 14, 2024 07:12
@samugi samugi force-pushed the fix/deck-integration-tests-dismiss-review branch from f2fffbf to ada229e Compare August 16, 2024 14:29
@pull-request-size pull-request-size bot added size/M and removed size/S labels Aug 16, 2024
@samugi samugi changed the title fix(ci): deck integration tests dismiss review chore(ci): deck integration tests fail CI on test failure Aug 16, 2024
when deck integration tests fail, a request for changes was created in
the PR. This was often ignored: let's fail CI instead.
@samugi samugi force-pushed the fix/deck-integration-tests-dismiss-review branch from ada229e to 97c42fe Compare August 16, 2024 14:34
@samugi samugi force-pushed the fix/deck-integration-tests-dismiss-review branch from 0f80744 to 97c42fe Compare August 16, 2024 14:52
@samugi samugi requested a review from fffonion August 16, 2024 14:54
@samugi samugi marked this pull request as ready for review August 16, 2024 14:54
@samugi samugi merged commit c2cfc82 into master Aug 20, 2024
45 of 53 checks passed
@samugi samugi deleted the fix/deck-integration-tests-dismiss-review branch August 20, 2024 15:19
@team-gateway-bot
Copy link
Collaborator

Cherry-pick failed for master, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally.

git remote add upstream https://github.com/kong/kong-ee
git fetch upstream master
git worktree add -d .worktree/cherry-pick-13475-to-master-to-upstream upstream/master
cd .worktree/cherry-pick-13475-to-master-to-upstream
git checkout -b cherry-pick-13475-to-master-to-upstream
ancref=$(git merge-base e61c4dd77d64d75b91f5dd03c17ffe55586bbdaa 97c42fea45b0104891184b32a54900bb29b6a37e)
git cherry-pick -x $ancref..97c42fea45b0104891184b32a54900bb29b6a37e

@github-actions github-actions bot added the incomplete-cherry-pick A cherry-pick was incomplete and needs manual intervention label Aug 20, 2024
@samugi samugi removed the incomplete-cherry-pick A cherry-pick was incomplete and needs manual intervention label Aug 20, 2024
@samugi
Copy link
Member Author

samugi commented Sep 6, 2024

/prdiff #13606

Copy link
Contributor

github-actions bot commented Sep 6, 2024

📝 Diff from #13606

Click to expand
--- /dev/fd/63	2024-09-06 14:25:00.557064487 +0000
+++ /dev/fd/62	2024-09-06 14:25:00.557064487 +0000
@@ -0,0 +1,38 @@
+--- a/.github/workflows/deck-integration.yml    # [PR: 13475]
++++ b/.github/workflows/deck-integration.yml    # [PR: 13475]
+-        continue-on-error: true
+-
+-      - name: Find review if exists
+-        id: find-review
+-        uses: actions/github-script@v7
+-        with:
+-          result-encoding: json
+-          retries: 3
+-          script: |
+-            const reviews = await github.paginate(github.rest.pulls.listReviews, {
+-              owner: context.repo.owner,
+-              repo: context.repo.repo,
+-              pull_number: context.issue.number,
+-            });
+-
+-            const botReview = reviews.reverse().find(review => {
+-              return review.user.login === "github-actions[bot]" && review.body.includes("decK integration tests");
+-            });
+-
+-            if (botReview && botReview.state === "CHANGES_REQUESTED") {
+-              return { "review_id": botReview.id };
+-            } else {
+-              return { "review_id": "" };
+-            }
+-
+-      - name: Request changes if failures are detected
+-        if: ${{ fromJson(steps.find-review.outputs.result).review_id == '' && steps.deck_tests.outcome != 'success' }}
+-        uses: actions/github-script@v7
+-        with:
+-          script: |
+-            github.rest.pulls.createReview({
+-              owner: context.repo.owner,
+-              repo: context.repo.repo,
+-              pull_number: context.issue.number,
+-              event: 'REQUEST_CHANGES',
+-              body: `## decK integration tests
@@ -1,0 +40,2 @@
+:warning: failure detected. Please check [the workflow logs](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) for more details.`
+-            })

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick kong-ee schedule this PR for cherry-picking to kong/kong-ee chore Not part of the core functionality of kong, but still needed size/M skip-changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants