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

Allow the docker build CI jobs to be retried #10774

Merged
merged 1 commit into from
Feb 4, 2022
Merged

Allow the docker build CI jobs to be retried #10774

merged 1 commit into from
Feb 4, 2022

Conversation

L3n41c
Copy link
Member

@L3n41c L3n41c commented Feb 4, 2022

What does this PR do?

Allow the docker build CI jobs to be retried to workaround temporary network failures.

Motivation

We regularly receive notifications of GitLab job failures, including on the main branch and, when we look at them, it’s quite common that it’s because of temporary network failures like:

Step 11/19 : FROM ubuntu:21.10
Get https://registry-1.docker.io/v2/: dial tcp: lookup registry-1.docker.io: Temporary failure in name resolution
ERROR: Job failed: exit code 1

or

$ docker push $TARGET_TAG
The push refers to repository [486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/datadog-agent/agent]
Get https://486234852809.dkr.ecr.us-east-1.amazonaws.com/v2/: dial tcp: lookup 486234852809.dkr.ecr.us-east-1.amazonaws.com: Temporary failure in name resolution
ERROR: Job failed: exit code 1

Additional Notes

Possible Drawbacks / Trade-offs

Describe how to test/QA your changes

Reviewer's Checklist

  • If known, an appropriate milestone has been selected; otherwise the Triage milestone is set.
  • The appropriate team/.. label has been applied, if known.
  • Use the major_change label if your change either has a major impact on the code base, is impacting multiple teams or is changing important well-established internals of the Agent. This label will be use during QA to make sure each team pay extra attention to the changed behavior. For any customer facing change use a releasenote.
  • A release note has been added or the changelog/no-changelog label has been applied.
  • Changed code has automated tests for its functionality.
  • Adequate QA/testing plan information is provided if the qa/skip-qa label is not applied.
  • If applicable, docs team has been notified or an issue has been opened on the documentation repo.
  • If applicable, the need-change/operator and need-change/helm labels have been applied.
  • If applicable, the config template has been updated.

@L3n41c L3n41c added team/containers changelog/no-changelog [deprecated] qa/skip-qa - use other qa/ labels [DEPRECATED] Please use qa/done or qa/no-code-change to skip creating a QA card labels Feb 4, 2022
@L3n41c L3n41c added this to the 7.35.0 milestone Feb 4, 2022
@L3n41c L3n41c requested review from a team as code owners February 4, 2022 09:32
@@ -20,6 +20,8 @@
- docker build --build-arg CIBUILD=true $BUILD_ARG --file $BUILD_CONTEXT/$ARCH/Dockerfile --pull --tag ${TARGET_TAG}-unsquashed $BUILD_CONTEXT
- docker-squash ${TARGET_TAG}-unsquashed -t ${TARGET_TAG}
- docker push $TARGET_TAG
# Workaround for temporary network failures
retry: 1
Copy link
Contributor

Choose a reason for hiding this comment

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

IMHO we can push that to 2 or 3

Copy link
Member

@mx-psi mx-psi left a comment

Choose a reason for hiding this comment

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

Have you reported these errors to #build? this looks like an infra problem that we should report

@@ -20,6 +20,8 @@
- docker build --build-arg CIBUILD=true $BUILD_ARG --file $BUILD_CONTEXT/$ARCH/Dockerfile --pull --tag ${TARGET_TAG}-unsquashed $BUILD_CONTEXT
- docker-squash ${TARGET_TAG}-unsquashed -t ${TARGET_TAG}
- docker push $TARGET_TAG
# Workaround for temporary network failures
retry: 3
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

I changed it to 2.

to workaround temporary network failures.
@L3n41c L3n41c merged commit 666d557 into main Feb 4, 2022
@L3n41c L3n41c deleted the lenaic/ci_retry branch February 4, 2022 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog/no-changelog [deprecated] qa/skip-qa - use other qa/ labels [DEPRECATED] Please use qa/done or qa/no-code-change to skip creating a QA card team/containers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants