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

pathogen-repo-build: always generate AWS Batch Job ID & summary #76

Merged
merged 2 commits into from
Mar 9, 2024

Conversation

joverlee521
Copy link
Contributor

@joverlee521 joverlee521 commented Mar 8, 2024

Description of proposed changes

Ran into a workflow run where the run-build step failed and the job exited without generating the AWS Batch Job ID or summary.¹

This commit updates the condition to always try to generate the AWS Batch ID as long as the runtime is aws-batch and the build.log file exists. This then allows the workflow to always generate the AWS Batch Job summary even if the build failed.

¹ https://github.com/nextstrain/forecasts-ncov/actions/runs/8203385071

Related issue(s)

Checklist

  • Checks pass
  • Test workflow where build fails but still outputs AWS Batch summary

Ran into a workflow run where the `run-build` step failed and the job
exited without generating the AWS Batch Job ID or summary.¹

This commit updates the condition to always try to generate the AWS
Batch ID as long as the runtime is `aws-batch` and the `build.log` file
exists. This then allows the workflow to always generate the AWS Batch
Job summary even if the build failed.

¹ https://github.com/nextstrain/forecasts-ncov/actions/runs/8203385071
Makes it easier to debug what the value of the `AWS_BATCH_JOB_ID`
variable is being set to if it's output to stdout and visible in the
GitHub Action logs.
@joverlee521
Copy link
Contributor Author

Huh, a8d9f4e did not fix the issue, the CI run still does not include the AWS Batch summary... 🤔

@joverlee521
Copy link
Contributor Author

OH right, 6f69e71 wouldn't work because the setup-nextstrain-cli action now uses the standalone installation.

@joverlee521
Copy link
Contributor Author

Tracking the weird CI behavior in #77 since I've run out of ideas...

The test run of the issue I was trying to fix worked well, so I'm merging this for now.

@joverlee521 joverlee521 requested a review from a team March 9, 2024 01:20
@joverlee521 joverlee521 merged commit 5cd0ba1 into master Mar 9, 2024
39 of 41 checks passed
@joverlee521 joverlee521 deleted the pathogen-repo-build-summary branch March 9, 2024 01:20
Copy link
Member

@victorlin victorlin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

- if: ${{ inputs.runtime == 'aws-batch' }}
# Attempt to get the AWS Batch ID even if the run build command failed
# as long as the runtime is `aws-batch` and the `build.log` file exists
- if: ${{ always() && inputs.runtime == 'aws-batch' && hashFiles('build.log') != '' }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, cute file existence check!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants