Skip to content

[MISC] Updated workflows to use github's cache for faster builds#1368

Merged
chandrasekharan-zipstack merged 13 commits into
mainfrom
misc/docker-gha-cache-used-for-workflow-builds
Jun 18, 2025
Merged

[MISC] Updated workflows to use github's cache for faster builds#1368
chandrasekharan-zipstack merged 13 commits into
mainfrom
misc/docker-gha-cache-used-for-workflow-builds

Conversation

@chandrasekharan-zipstack

@chandrasekharan-zipstack chandrasekharan-zipstack commented Jun 16, 2025

Copy link
Copy Markdown
Contributor

What

  • Used Github cache for docker builds in the workflow
  • Previously most of these image builds took 2-3 mins and sometimes it might not even have any changes in it. Now with the cache it'll complete

Why

  • To make better use of docker caching and speed up builds

How

Can this PR break any existing features. If yes, please list possible items. If no, please explain why. (PS: Admins do not merge the PR without this section filled)

  • No. It has been tested by dry running the workflow builds for these Github actions (without pushing to Dockerhub). However we'll have to properly test it with the push enabled too

Relevant Docs

Notes on Testing

Screenshots

image

Checklist

I have read and understood the Contribution Guidelines.

@ritwik-g

Copy link
Copy Markdown
Contributor

Yes, it might break any of the associated cloud builds. It has been tested by dry running the workflow builds for these Github actions (without pushing to Dockerhub). However we'll have to properly test it with the push too

Why would it even break cloud builds? It is a different workflow all together right?

Comment thread .github/workflows/docker-tools-build-push.yaml
Comment thread .github/workflows/production-build.yaml

@hari-kuriakose hari-kuriakose left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@chandrasekharan-zipstack LGTM overall.

Please check comments though.

Comment thread .github/workflows/docker-tools-build-push.yaml
…emoved related fix added to run-platform.sh, updated Github tool build workflow to also use bake
…ofile, removed related fix added to run-platform.sh, updated Github tool build workflow to also use bake"

This reverts commit 9e7fe1c.
@github-actions

Copy link
Copy Markdown
Contributor
filepath function $$\textcolor{#23d18b}{\tt{passed}}$$ SUBTOTAL
$$\textcolor{#23d18b}{\tt{runner/src/unstract/runner/clients/test\_docker.py}}$$ $$\textcolor{#23d18b}{\tt{test\_logs}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{runner/src/unstract/runner/clients/test\_docker.py}}$$ $$\textcolor{#23d18b}{\tt{test\_cleanup}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{runner/src/unstract/runner/clients/test\_docker.py}}$$ $$\textcolor{#23d18b}{\tt{test\_cleanup\_skip}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{runner/src/unstract/runner/clients/test\_docker.py}}$$ $$\textcolor{#23d18b}{\tt{test\_client\_init}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{runner/src/unstract/runner/clients/test\_docker.py}}$$ $$\textcolor{#23d18b}{\tt{test\_get\_image\_exists}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{runner/src/unstract/runner/clients/test\_docker.py}}$$ $$\textcolor{#23d18b}{\tt{test\_get\_image}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{runner/src/unstract/runner/clients/test\_docker.py}}$$ $$\textcolor{#23d18b}{\tt{test\_get\_container\_run\_config}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{runner/src/unstract/runner/clients/test\_docker.py}}$$ $$\textcolor{#23d18b}{\tt{test\_get\_container\_run\_config\_without\_mount}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{runner/src/unstract/runner/clients/test\_docker.py}}$$ $$\textcolor{#23d18b}{\tt{test\_run\_container}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{runner/src/unstract/runner/clients/test\_docker.py}}$$ $$\textcolor{#23d18b}{\tt{test\_get\_image\_for\_sidecar}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{runner/src/unstract/runner/clients/test\_docker.py}}$$ $$\textcolor{#23d18b}{\tt{test\_sidecar\_container}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{TOTAL}}$$ $$\textcolor{#23d18b}{\tt{11}}$$ $$\textcolor{#23d18b}{\tt{11}}$$

@sonarqubecloud

Copy link
Copy Markdown

@chandrasekharan-zipstack chandrasekharan-zipstack merged commit ae0acdf into main Jun 18, 2025
5 checks passed
@chandrasekharan-zipstack chandrasekharan-zipstack deleted the misc/docker-gha-cache-used-for-workflow-builds branch June 18, 2025 05:48
pk-zipstack pushed a commit that referenced this pull request Aug 20, 2025
* [misc] Updated workflows to use github's cache for docker builds

* minor: Updated workflows to not push images for testing

* [MISC] Updated workflow build to use correct Dockerfile for services

* minor: Updated workflows to push images again post testing

* [MISC] Refactored build push workflows to use, marked push to false for testing

* [MISC] Fixed production build workflow issue related to VERSION env and context resolution

* [MISC] Refactored build workflow to simplify tag resolution

* [MISC] Moved commented line in build workflow

* [MISC] Uncomment push option in workflow runs that was added for testing

* [MISC] Updated build definition to add tools in a separate profile, removed related fix added to run-platform.sh, updated Github tool build workflow to also use bake

* [MISC] Updated Dockerfile paths and context for tools to make workflow build easily

* Revert "[MISC] Updated build definition to add tools in a separate profile, removed related fix added to run-platform.sh, updated Github tool build workflow to also use bake"

This reverts commit 9e7fe1c.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants