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

CI/CD - always build the docker image & rely on docker build in logic #123

Closed
ArjaanBuijk opened this issue Jun 21, 2021 · 5 comments
Closed
Assignees
Labels
CI/CD Related to the CI/CD pipeline

Comments

@ArjaanBuijk
Copy link
Contributor

The CI/CD pipeline checks if it needs to build the action server docker image or not.
It does this by checking if any of the changed files of the most recent commits require a re-build.

This is not good for two reasons:

  1. It is not fail safe, because it could be that there are no model changes in the current commit, but there were in the previous commit, and if the build during the previous commit failed, the docker image that is stored on ECR is old.
  2. We're duplicating logic, because docker build & docker push already include all the required logic to build or push changes.

It is proposed that we simply always build & push the action server image, and rely on smarts available in the docker cli to build & push anything that needs to be updated.

@ArjaanBuijk ArjaanBuijk self-assigned this Jun 21, 2021
@ArjaanBuijk
Copy link
Contributor Author

ArjaanBuijk commented Jun 21, 2021

@b-quachtran
Can you also let me know what you think about this proposal?
It is related to #122 , which is for training of models, while this is issue for building the action server image. I created two separate issues, because the solution is different for each.

@ArjaanBuijk ArjaanBuijk added the CI/CD Related to the CI/CD pipeline label Jun 21, 2021
@b-quachtran
Copy link
Contributor

@ArjaanBuijk In this proposal, would images be built & pushed irrespective of changes to actions/ or is it still conditioned on changes to actions/ where the build process will run on every commit?

@ArjaanBuijk
Copy link
Contributor Author

@b-quachtran
It would always run, because even if during the current commit there are not changes in the actions/, that does not guarantee that the docker image in ECR is the latest, because the CI/CD pipeline could have failed during a previous commit.

@b-quachtran
Copy link
Contributor

Hmm, what about changing the check to be on pull_request and checking for changes in actions/ in that case? That way builds can only succeed / fail when there are relevant changes present and they'll happen on every commit for a given PR that requires a new image build.

@ArjaanBuijk
Copy link
Contributor Author

Done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/CD Related to the CI/CD pipeline
Projects
None yet
Development

No branches or pull requests

2 participants