[RELAND] .circleci: Improve docker image build workflow#38279
[RELAND] .circleci: Improve docker image build workflow#38279seemethere wants to merge 1 commit intopytorch:masterfrom
Conversation
This reverts commit 7c2853b.
💊 CI failures summary and remediationsAs of commit 49daeb8 (more details on the Dr. CI page):
1 failure not recognized by patterns:
🚧 3 fixed upstream failures:These were probably caused by upstream breakages that were already fixed.
Please rebase on the
|
facebook-github-bot
left a comment
There was a problem hiding this comment.
@seemethere is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
| name: dynamically generate tags to keep | ||
| no_output_timeout: "1h" | ||
| command: | | ||
| GENERATED_IMAGE_TAG=$(\ |
There was a problem hiding this comment.
As @ezyang suggested in original PR, can you add some explanation on what this command is doing?
I.e. generated image tag is SHA sum of last commit that touched .circleci/docker folder.
|
Is there any difference between this PR and #37976 |
Summary: Previous attempts to get this right: * #38335 * #38279 * #37976 This tag kept getting deleted before the docker image ci workflow could be merged causing it to have upstream breakages. It'd be best to make sure the garbage collector just doesnt garbage collect it. This is a pre-step to merge #38484 Signed-off-by: Eli Uriegas <eliuriegas@fb.com> Pull Request resolved: #38483 Differential Revision: D21577359 Pulled By: seemethere fbshipit-source-id: c4e0709bd8fff8f24a988b60eaa9f8c01576ef2f
Summary: closes #37855 Relies on #38483 Previous attempts to get this right: * #38335 * #38279 * #37976 This reverts commit 8063960. Improves the docker image build workflow from many steps to basically transparent from a user's perspective. To update docker images now all one has to do is edit the .circleci/docker folder and it will update automatically and also dynamically add the tags to the list of tags to keep from the garbage collector. Adding a new image will currently stay the same but we can explore doing that dynamically as well. How the build workflow works: - Docker tags are determined by the hash defined from git for the .circleci/docker sub-directory (extracted using git rev-parse) - Images are only built if the computed hash is not found in ecr and the hash is different than the previously computed hash. The previously computed hash is found using the same process as before but subbing out HEAD for the merge base between HEAD and the base git revision - That tag is then passed through the jobs using a shared workspace which is added to downstream jobs using the circleci ${BASH_ENV} How the new garbage collection works: - Tags to keep are generated by stepping through all of the commits in in the .circleci/docker subdirectory Signed-off-by: Eli Uriegas <eliuriegas@fb.com> Pull Request resolved: #38484 Differential Revision: D21585458 Pulled By: seemethere fbshipit-source-id: 37792a1e0f5e5531438c4ae61507639c133aa76d
Summary: This reverts commit 6f02fc3. Pull Request resolved: pytorch#38279 Differential Revision: D21517822 Pulled By: seemethere fbshipit-source-id: 5f705f6c617cbc77a10ab9deb913bc5958ae7439
Summary: Previous attempts to get this right: * pytorch#38335 * pytorch#38279 * pytorch#37976 This tag kept getting deleted before the docker image ci workflow could be merged causing it to have upstream breakages. It'd be best to make sure the garbage collector just doesnt garbage collect it. This is a pre-step to merge pytorch#38484 Signed-off-by: Eli Uriegas <eliuriegas@fb.com> Pull Request resolved: pytorch#38483 Differential Revision: D21577359 Pulled By: seemethere fbshipit-source-id: c4e0709bd8fff8f24a988b60eaa9f8c01576ef2f
Summary: closes pytorch#37855 Relies on pytorch#38483 Previous attempts to get this right: * pytorch#38335 * pytorch#38279 * pytorch#37976 This reverts commit 46bc26c. Improves the docker image build workflow from many steps to basically transparent from a user's perspective. To update docker images now all one has to do is edit the .circleci/docker folder and it will update automatically and also dynamically add the tags to the list of tags to keep from the garbage collector. Adding a new image will currently stay the same but we can explore doing that dynamically as well. How the build workflow works: - Docker tags are determined by the hash defined from git for the .circleci/docker sub-directory (extracted using git rev-parse) - Images are only built if the computed hash is not found in ecr and the hash is different than the previously computed hash. The previously computed hash is found using the same process as before but subbing out HEAD for the merge base between HEAD and the base git revision - That tag is then passed through the jobs using a shared workspace which is added to downstream jobs using the circleci ${BASH_ENV} How the new garbage collection works: - Tags to keep are generated by stepping through all of the commits in in the .circleci/docker subdirectory Signed-off-by: Eli Uriegas <eliuriegas@fb.com> Pull Request resolved: pytorch#38484 Differential Revision: D21585458 Pulled By: seemethere fbshipit-source-id: 37792a1e0f5e5531438c4ae61507639c133aa76d
This reverts commit 7c2853b.