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

Add retry to docker_run #6514

Merged
merged 1 commit into from
Apr 29, 2020
Merged

Add retry to docker_run #6514

merged 1 commit into from
Apr 29, 2020

Conversation

AlexandreYang
Copy link
Member

@AlexandreYang AlexandreYang commented Apr 28, 2020

What does this PR do?

Add retry to docker_run. Can be used for cases where the docker-compose up might be flaky. Example:

  • Image download fail due to network issue

Example usage: #6515

Motivation

Useful for retrying flaky docker-compose up. Example:

            )
E           SubprocessError: Command: ['docker-compose', '-f', '/home/vsts/work/1/s/oracle/tests/docker/docker-compose.yaml', 'up', '-d']
E           Exit code: 1
E           Captured Output:

../datadog_checks_dev/datadog_checks/dev/subprocess.py:78: SubprocessError
---------------------------- Captured stdout setup -----------------------------
Attaching to 
---------------------------- Captured stderr setup -----------------------------
Creating network "docker_default" with the default driver
Pulling oracle (container-registry.oracle.com/database/enterprise:12.2.0.1-slim)...
Get https://container-registry-phx.oracle.com/v2/database/enterprise/manifests/12.2.0.1-slim: Get https://container-registry.oracle.com/auth?account=dev%40datadoghq.com&scope=repository%3Adatabase%2Fenterprise%3Apull&service=Oracle+Registry: net/http: request canceled (Client.Timeout exceeded while awaiting headers)
=========================== 1 error in 16.32 seconds ===========================

Additional Notes

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • PR title must be written as a CHANGELOG entry (see why)
  • Files changes must correspond to the primary purpose of the PR as described in the title (small unrelated changes should have their own PR)
  • PR must have changelog/ and integration/ labels attached

@AlexandreYang AlexandreYang merged commit 8b3c375 into master Apr 29, 2020
@AlexandreYang AlexandreYang deleted the alex/docker_run_add_retry branch April 29, 2020 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants