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

[build][packaging] Add resilience when docker build #22050

Merged

Conversation

v1v
Copy link
Member

@v1v v1v commented Oct 21, 2020

What does this PR do?

Retry to build docker images when something bad happened.

We could potentially include a retry step in the CI but it might add some overhead, another approach could be creating a specific mage goal to run the docker build rather than just using the mage goal for everything.

Why is it important?

Sometimes some third party resources are not accessible temporarily.

Also the Unified Release team will enjoy this particular approach to avoid any issues when pulling docker images or building from scratch.

Related issues

Caused by #21563
Closes #22020

@v1v v1v added Packaging automation Team:Automation Label for the Observability productivity team build-system Issue or change affecting Mage, Make, or build scripts. labels Oct 21, 2020
@v1v v1v self-assigned this Oct 21, 2020
@botelastic botelastic bot added needs_team Indicates that the issue/PR needs a Team:* label Team:Ingest Management and removed needs_team Indicates that the issue/PR needs a Team:* label labels Oct 21, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/ingest-management (Team:Ingest Management)

@v1v v1v requested review from andrewkroh, jsoriano, urso and a team October 21, 2020 14:09
@elasticmachine
Copy link
Collaborator

elasticmachine commented Oct 21, 2020

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: [Pull request #22050 updated]

  • Start Time: 2020-10-22T09:05:26.950+0000

  • Duration: 92 min 42 sec

Test stats 🧪

Test Results
Failed 0
Passed 16369
Skipped 1342
Total 17711

@kuisathaverat
Copy link
Contributor

kuisathaverat commented Oct 21, 2020

probably it resolves also #22020, @jsoriano Do package target uses the same class/function to build the Docker images?

fmt.Printf(">> Building docker images failed using docker-compose (let's try now with docker-compose up --build): %s", stderr.String())
}
}

Copy link
Member

Choose a reason for hiding this comment

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

There are already some retries in the higher-level EnsureUp method, that is the one used out of this package.

Also, we shouldn't add a explicit build here, we should take into account opts.Create.Build and so on.

I think this code is not needed.

Copy link
Member

@jsoriano jsoriano left a comment

Choose a reason for hiding this comment

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

👍

@v1v v1v merged commit 69cddaa into elastic:master Oct 22, 2020
@v1v v1v deleted the feature/support-build-retry-docker-if-error-packaging branch October 22, 2020 10:38
v1v added a commit to v1v/beats that referenced this pull request Oct 22, 2020
v1v added a commit to v1v/beats that referenced this pull request Oct 22, 2020
v1v added a commit to v1v/beats that referenced this pull request Oct 22, 2020
v1v added a commit to v1v/beats that referenced this pull request Oct 22, 2020
* upstream/master: (27 commits)
  chore: use ubuntu 18 as linux agent (elastic#22084)
  docs: Prepare Changelog for 7.9.3 (elastic#22073) (elastic#22075)
  docs: Prepare Changelog for 6.8.13 (elastic#22072) (elastic#22079)
  [build][packaging] Add resilience when docker build (elastic#22050)
  Fix the url of reviewdog (elastic#21981)
  revert WSS process reporting for windows (elastic#22055)
  Fix typo (elastic#19585) (elastic#22061)
  [Ingest Manager] Use ML_SYSTEM to detect if agent is running as a service (elastic#21884)
  Prevent log input from sending duplicate messages due to file renaming (elastic#21911)
  feat: package aliases for snapshots (elastic#21960)
  [DOC] Add firewall as possible troubleshooting issue (elastic#21743)
  [Filebeat] Add max_number_of_messages config parameter for S3 input (elastic#21993)
  [Elastic Agent] Fix missing elastic_agent event data  (elastic#21994)
  Document auditbeat system process module config (elastic#21766)
  Update links (elastic#22012)
  dynamically find librpm (elastic#21936)
  Fix Istio docs (elastic#22019)
  [beats-tester][packaging] store packages in another location (elastic#21903)
  [Kubernetes] Remove redundant dockersock volume mount (elastic#22009)
  [Ingest Manager] Always try snapshot repo for agent upgrade (elastic#21951)
  ...
v1v added a commit to v1v/beats that referenced this pull request Oct 26, 2020
…beats into feature/support-flaky-test-analyser

* 'feature/support-flaky-test-analyser' of github.com:v1v/beats: (40 commits)
  [CI] support windows-10 (elastic#19804)
  Use default config when creating the input (elastic#22126)
  Change x509 mappings from file. to tls.server. (elastic#22097)
  Add fleet settings image (elastic#22065)
  Edit 7.9.3 changelog (elastic#22117)
  Edit 6.8.13 release notes (elastic#22120)
  Incorporate librpm fix feedback (elastic#22098)
  [libbeat] Add more disk queue unit tests and fix a size-check bug (elastic#22107)
  docs: move kerberos include (elastic#22109)
  Check context.Canceled and fix s3 input config (elastic#22036)
  Add max_number_of_messages into aws filebeat fileset vars (elastic#22057)
  Remove suricata.eve.timestamp alias (elastic#22095)
  [Ingest Manager] Use symlink path for reexecutions (elastic#21835)
  chore: use ubuntu 18 as linux agent (elastic#22084)
  docs: Prepare Changelog for 7.9.3 (elastic#22073) (elastic#22075)
  docs: Prepare Changelog for 6.8.13 (elastic#22072) (elastic#22079)
  [build][packaging] Add resilience when docker build (elastic#22050)
  Fix the url of reviewdog (elastic#21981)
  revert WSS process reporting for windows (elastic#22055)
  Fix typo (elastic#19585) (elastic#22061)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automation build-system Issue or change affecting Mage, Make, or build scripts. Packaging Team:Automation Label for the Observability productivity team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CI] improve resilience against Docker pull fails
6 participants