From 2880582cc921c27f192f37607eb737cbfbb2eb75 Mon Sep 17 00:00:00 2001 From: Cian Johnston Date: Fri, 3 Oct 2025 10:01:08 +0100 Subject: [PATCH] ci(.github/workflows/traiage.yaml): remove extraneous cleanup steps (#20154) --- .github/workflows/traiage.yaml | 69 ---------------------------------- 1 file changed, 69 deletions(-) diff --git a/.github/workflows/traiage.yaml b/.github/workflows/traiage.yaml index 483673d2ba..15adf78242 100644 --- a/.github/workflows/traiage.yaml +++ b/.github/workflows/traiage.yaml @@ -25,11 +25,6 @@ on: required: false default: "traiage" type: string - cleanup: - description: "Cleanup workspace after triage." - required: false - default: false - type: boolean jobs: traiage: @@ -70,7 +65,6 @@ jobs: GITHUB_EVENT_NAME: ${{ github.event_name }} GITHUB_EVENT_USER_ID: ${{ github.event.sender.id }} GITHUB_EVENT_USER_LOGIN: ${{ github.event.sender.login }} - INPUTS_CLEANUP: ${{ inputs.cleanup || false }} INPUTS_ISSUE_URL: ${{ inputs.issue_url }} INPUTS_TEMPLATE_NAME: ${{ inputs.template_name || 'traiage' }} INPUTS_TEMPLATE_PRESET: ${{ inputs.template_preset || 'Default'}} @@ -86,9 +80,6 @@ jobs: echo "Using prefix: ${INPUTS_PREFIX}" echo "prefix=${INPUTS_PREFIX}" >> "${GITHUB_OUTPUT}" - echo "Using cleanup: ${INPUTS_CLEANUP}" - echo "cleanup=${INPUTS_CLEANUP}" >> "${GITHUB_OUTPUT}" - # For workflow_dispatch, use the actor who triggered it # For issues events, use the issue author. if [[ "${GITHUB_EVENT_NAME}" == "workflow_dispatch" ]]; then @@ -222,63 +213,3 @@ jobs: fi echo "TASK_NAME=${CODER_USERNAME}/${TASK_NAME}" >> "${GITHUB_OUTPUT}" echo "TASK_NAME=${CODER_USERNAME}/${TASK_NAME}" >> "${GITHUB_ENV}" - - - name: Create and upload archive - id: create-archive - if: steps.determine-inputs.outputs.cleanup == 'true' - env: - BUCKET_PREFIX: "gs://coder-traiage-outputs/traiage" - CODER_USERNAME: ${{ steps.get-coder-username.outputs.coder_username }} - TASK_NAME: ${{ steps.create-task.outputs.TASK_NAME }} - run: | - echo "Waiting for task to complete..." - coder exp task status "${TASK_NAME}" --watch - echo "Creating archive for workspace: ${TASK_NAME}" - ./scripts/traiage.sh archive - echo "archive_url=${BUCKET_PREFIX%%/}/$TASK_NAME.tar.gz" >> "${GITHUB_OUTPUT}" - - - name: Generate a summary of the changes and post a comment on GitHub. - id: generate-summary - if: steps.determine-inputs.outputs.cleanup == 'true' - env: - ARCHIVE_URL: ${{ steps.create-archive.outputs.archive_url }} - BUCKET_PREFIX: "gs://coder-traiage-outputs/traiage" - CODER_USERNAME: ${{ steps.get-coder-username.outputs.coder_username }} - CONTEXT_KEY: ${{ steps.extract-context.outputs.context_key }} - GH_TOKEN: ${{ github.token }} - GITHUB_REPOSITORY: ${{ github.repository }} - ISSUE_URL: ${{ steps.determine-inputs.outputs.issue_url }} - TASK_NAME: ${{ steps.create-task.outputs.TASK_NAME }} - run: | - SUMMARY_FILE=$(mktemp) - trap 'rm -f "${SUMMARY_FILE}"' EXIT - AUTO_SUMMARY=$(./scripts/traiage.sh summary) - { - echo "## TrAIage Results" - echo "- **Issue URL:** ${ISSUE_URL}" - echo "- **Context Key:** ${CONTEXT_KEY}" - echo "- **Workspace:** ${TASK_NAME}" - echo "- **Archive URL:** ${ARCHIVE_URL}" - echo - echo "${AUTO_SUMMARY}" - echo - echo "To fetch the output to your own workspace:" - echo - echo '```bash' - echo "BUCKET_PREFIX=${BUCKET_PREFIX} TASK_NAME=${TASK_NAME} ./scripts/traiage.sh resume" - echo '```' - echo - } >> "${SUMMARY_FILE}" - - if [[ "${ISSUE_URL}" == "https://github.com/${GITHUB_REPOSITORY}"* ]]; then - gh issue comment "${ISSUE_URL}" --body-file "${SUMMARY_FILE}" --create-if-none --edit-last - else - echo "Skipping comment on other repo." - fi - cat "${SUMMARY_FILE}" >> "${GITHUB_STEP_SUMMARY}" - - - name: Cleanup task - if: steps.determine-inputs.outputs.cleanup == 'true' && steps.create-task.outputs.TASK_NAME != '' && steps.create-archive.outputs.archive_url != '' - run: | - echo "Cleaning up task: $TASK_NAME" - ./scripts/traiage.sh delete || true