From fe07cd12653cb86e7ac423c6a324b863143efb4c Mon Sep 17 00:00:00 2001 From: Jason Gustafson <12502538+hachikuji@users.noreply.github.com> Date: Mon, 10 Mar 2025 10:46:30 -0700 Subject: [PATCH 1/2] Add action to get antithesis logs from a test run --- .github/workflows/github-e2e-logs.yaml | 42 ++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/github-e2e-logs.yaml diff --git a/.github/workflows/github-e2e-logs.yaml b/.github/workflows/github-e2e-logs.yaml new file mode 100644 index 000000000..23d4b765e --- /dev/null +++ b/.github/workflows/github-e2e-logs.yaml @@ -0,0 +1,42 @@ +name: Download Antithesis Logs +on: + workflow_dispatch: + inputs: + # See here for details on finding these parameters: + # https://antithesis.com/docs/reports/triage/#copy-moment + session-id: + description: 'The session ID of the test run' + type: string + required: true + debug-input-hash: + description: 'The debugging input hash (e.g. "-9067336385060865277")' + type: string + required: true + debug-vtime: + description: 'The debugging vtime (e.g. "45.334635781589895")' + type: string + required: true + +jobs: + callApi: + runs-on: ubuntu-latest + + steps: + # See here for the webhook documentation: + # https://antithesis.com/docs/webhook/get_logs_webhook/?sid=be099.0&sterm=logs + - name: "Call Antithesis GetLogs Webhook" + env: + TENANT: responsive + USERNAME: ${{ secrets.ANTITHESIS_USERNAME }} + PASSWORD: ${{ secrets.ANTITHESIS_PASSWORD }} + TOKEN: ${{ secrets.ANTITHESIS_GH_PAT }} + EMAIL_RECIPIENT: "antithesis-responsive-aaaamurlsqy6e3hxnx6ksnec5y@antithesisgroup.slack.com" + run: | + curl --fail -u "$USERNAME:$PASSWORD" \ + -X POST "https://$TENANT.antithesis.com/api/v1/launch/get_logs" \ + -d "{\"params\": { + \"antithesis.debugging.session_id\":\"${{ inputs.session-id }}\", + \"antithesis.debugging.input_hash\":\"${{ inputs.debug-input-hash }}\" , + \"antithesis.debugging.vtime\":\"${{ inputs.debug-vtime }}\", + \"antithesis.report.recipients\":\"$EMAIL_RECIPIENT\" + }}" From f017783ccd8ab57b3ab8c7d28d8011e02bf4e49c Mon Sep 17 00:00:00 2001 From: Jason Gustafson <12502538+hachikuji@users.noreply.github.com> Date: Mon, 10 Mar 2025 11:01:00 -0700 Subject: [PATCH 2/2] Remove unused token in webhook call --- .github/workflows/github-e2e-logs.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/github-e2e-logs.yaml b/.github/workflows/github-e2e-logs.yaml index 23d4b765e..8641e5ea9 100644 --- a/.github/workflows/github-e2e-logs.yaml +++ b/.github/workflows/github-e2e-logs.yaml @@ -29,7 +29,6 @@ jobs: TENANT: responsive USERNAME: ${{ secrets.ANTITHESIS_USERNAME }} PASSWORD: ${{ secrets.ANTITHESIS_PASSWORD }} - TOKEN: ${{ secrets.ANTITHESIS_GH_PAT }} EMAIL_RECIPIENT: "antithesis-responsive-aaaamurlsqy6e3hxnx6ksnec5y@antithesisgroup.slack.com" run: | curl --fail -u "$USERNAME:$PASSWORD" \