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

Retry trigger submission job on artifact not found error #686

Merged
merged 2 commits into from
Nov 26, 2024

Conversation

nid90
Copy link
Member

@nid90 nid90 commented Nov 26, 2024

  • Make all artifact-not-found errors uniform across different CI/CD providers

akin to old step run upload artifact retries - https://github.com/tramlinehq/tramline/blob/main/app/jobs/releases/upload_artifact.rb#L9

- Make all artifact not found errors uniform across different ci/cd providers
@nid90 nid90 requested a review from kitallis November 26, 2024 08:18
workflow_run = WorkflowRun.find(workflow_run_id)
Coordinators::TriggerSubmissions.call(workflow_run)
rescue Installations::Error => ex
raise unless ex.reason == :artifact_not_found
if retry_count > 3
Copy link
Member

Choose a reason for hiding this comment

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

3 is enough?

workflow_run&.triggering_release&.fail!
else
Rails.logger.debug { "Failed to fetch build artifact for workflow run #{workflow_run_id}, retrying in 30 seconds" }
V2::TriggerSubmissionsJob.set(wait_time: 30.seconds).perform_later(workflow_run_id, retry_count + 1)
Copy link
Member

Choose a reason for hiding this comment

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

Should we make the wait time a function of retry count?

new_retry_count * 5.seconds or something.

@nid90 nid90 merged commit 3162c9b into main Nov 26, 2024
4 checks passed
@nid90 nid90 deleted the fix/retry-artifact-download branch November 26, 2024 09:47
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