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

Improve artifact list error handling #4

Merged
merged 3 commits into from
Dec 1, 2022

Conversation

ofalvai
Copy link
Contributor

@ofalvai ofalvai commented Dec 1, 2022

Checklist

  • I've read and followed the Contribution Guidelines
  • step.yml and README.md is updated with the changes (if needed)

Version

Requires a MAJOR/MINOR/PATCH version update

Context

Sometimes the step fails with this meaningless error message:

Getting the list of artifacts of 1 builds
Run: failed to list artifacts: failed to get artifact download links for build(s): 

Changes

  • Print the real error to the build logs, not just the build ID it's related to
  • Add an extra validation for empty build IDs. Based on the error message, somehow the build ID ended up empty.

Investigation details

Decisions

@ofalvai ofalvai requested a review from godrei December 1, 2022 13:08
@ofalvai ofalvai marked this pull request as ready for review December 1, 2022 13:08
@@ -77,6 +77,7 @@ func (lister ArtifactLister) ListIntermediateFileDetails(appSlug string, buildSl
for i := 1; i <= len(buildSlugs); i++ {
res := <-listResults
if res.err != nil {
lister.logger.Warnf("Failed to list artifacts for build %s: %w", res.buildSlug, res.err)
Copy link
Contributor

Choose a reason for hiding this comment

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

@ofalvai ofalvai merged commit 92f1e0d into main Dec 1, 2022
@ofalvai ofalvai deleted the SWAT-1057-improve-error-handingl branch December 1, 2022 13:58
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.

2 participants