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

Remove actions/cache to improve workflow speed / Refactoring docker-build workflows #957

Merged
merged 5 commits into from
Jan 28, 2021

Conversation

rinx
Copy link
Contributor

@rinx rinx commented Jan 27, 2021

Signed-off-by: Rintaro Okamura rintaro.okamura@gmail.com

Description:

  • Removed cache docker layers step from docker build workflows because it doesn't make builds so faster.

For agent-ngt builds,

layer cache platforms duration log
without amd64 4m38s https://github.com/vdaas/vald/actions/runs/513797778
without amd64, arm64 24m0s https://github.com/vdaas/vald/actions/runs/513821869
with (first time) amd64 7m2s https://github.com/vdaas/vald/actions/runs/513884200
with (first time) amd64, arm64 23m55s https://github.com/vdaas/vald/actions/runs/513922698
with (second time) amd64 4m8s https://github.com/vdaas/vald/actions/runs/513900837
with (second time) amd64, arm64 17m13s https://github.com/vdaas/vald/actions/runs/513966632
  • Added internal action template for docker build workflows.

Related Issue:

nothing

How Has This Been Tested?:

nothing

Environment:

  • Go Version: 1.15.7
  • Docker Version: 19.03.8
  • Kubernetes Version: 1.18.2
  • NGT Version: 1.13.1

Types of changes:

  • Bug fix [type/bug]
  • New feature [type/feature]
  • Add tests [type/test]
  • Security related changes [type/security]
  • Add documents [type/documentation]
  • Refactoring [type/refactoring]
  • Update dependencies [type/dependency]
  • Update benchmarks and performances [type/bench]
  • Update CI [type/ci]

Changes to Core Features:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your core changes, as applicable?
  • Have you successfully ran tests with your changes locally?

Checklist:

  • I have read the CONTRIBUTING document.
  • I have checked open Pull Requests for the similar feature or fixes?
  • I have added tests and benchmarks to cover my changes.
  • I have ensured all new and existing tests passed.
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation accordingly.

@vdaas-ci
Copy link
Collaborator

[CHATOPS:HELP] ChatOps commands.

  • 🙆‍♀️ /approve - approve
  • 💌 /changelog - add changelog comment
  • 🍱 /format - format codes and add licenses
  • /gen-test - generate test codes
  • 🏷️ /label - add labels
  • /rebase - rebase master
  • 🔚 2️⃣ 🔚 /label actions/e2e-deploy - run E2E deploy & integration test

@rinx rinx force-pushed the ci/docker/remove-actions-cache-to-improve-speed branch 16 times, most recently from 6fbff21 to 9b621b7 Compare January 27, 2021 08:52
@rinx rinx changed the title Experimental: Remove actions/cache to improve workflow speed Remove actions/cache to improve workflow speed / Refactoring docker-build workflows Jan 27, 2021
Signed-off-by: Rintaro Okamura <rintaro.okamura@gmail.com>
Signed-off-by: Rintaro Okamura <rintaro.okamura@gmail.com>

:pencil2: Remove blankline

Signed-off-by: Rintaro Okamura <rintaro.okamura@gmail.com>

:bug: Fix uses statement

Signed-off-by: Rintaro Okamura <rintaro.okamura@gmail.com>

:pencil2: Fix typo

Signed-off-by: Rintaro Okamura <rintaro.okamura@gmail.com>

:pencil2: Fix typo

Signed-off-by: Rintaro Okamura <rintaro.okamura@gmail.com>

:sparkles: Add logs

Signed-off-by: Rintaro Okamura <rintaro.okamura@gmail.com>

:green_heart: Fix bug on if-else

Signed-off-by: Rintaro Okamura <rintaro.okamura@gmail.com>
Signed-off-by: Rintaro Okamura <rintaro.okamura@gmail.com>
Signed-off-by: Rintaro Okamura <rintaro.okamura@gmail.com>
Signed-off-by: Rintaro Okamura <rintaro.okamura@gmail.com>
@rinx rinx force-pushed the ci/docker/remove-actions-cache-to-improve-speed branch from 9b621b7 to f6fef2d Compare January 27, 2021 09:04
@rinx rinx marked this pull request as ready for review January 27, 2021 09:05
@rinx rinx requested a review from kpango January 27, 2021 09:05
Copy link
Collaborator

@kpango kpango left a comment

Choose a reason for hiding this comment

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

Looks excellent to me.
I have 1 question, can we remove golang-busert dependency from docker containers?
I mean can we use base's golang binary ?

@rinx
Copy link
Contributor Author

rinx commented Jan 28, 2021

Thanks for reviewing.
As I told to you before, if we remove the golang:buster image from the each Dockerfiles, when the GO_VERSION file is updated, the newer version is not reflected at the first build of the PR. It is a risk of that removal.
We can write a shell script such as wait-for-base-build, but it will take few more minutes to build each image.
So the current Dockerfiles and workflows are the safer and faster way of building, I think.

@kpango kpango merged commit 488dd4a into master Jan 28, 2021
@kpango kpango deleted the ci/docker/remove-actions-cache-to-improve-speed branch January 28, 2021 05:09
@vdaas-ci vdaas-ci mentioned this pull request Jan 29, 2021
18 tasks
@kpango kpango mentioned this pull request Feb 2, 2021
11 tasks
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.

3 participants