-
Notifications
You must be signed in to change notification settings - Fork 45
Introduce a transient Docker image (SPOC-250). #216
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
Conversation
jason-lynch
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The overall idea makes sense to me! I've left a couple of minor suggestions, but, apart from making Codacy happy, it's nothing that I would block on.
| @@ -0,0 +1,62 @@ | |||
| name: Update base OS image | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we going to use this image across multiple jobs? If not, you could keep skip publishing the image and use the gha cache to cut down on rebuilds.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My idea was to re-use it between all the products, no only in Spock. Saving of computational resources is my addiction ;).
007ad20 to
e1da461
Compare
pct960
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I think the eventual goal to make this pipeline efficient would be to have A) cached base Docker image for dev/testing --> B) base image A + cached image with pgedge installed --> C) base image B + cached image with pg patches applied and compiled --> D) base image C + final image with latest spock changes.
Image A gets updated manually. Image B gets updated when there is a new release at https://downloads.pgedge.com/platform/repos/download/, and image C gets updated when the patch files are modified in a PR. Image D is always built.
Some of this might be overkill for our needs, but separating these out will help us save on actions storage and minutes, with, of course, the nice side effect of fast test runs.
|
e1da461 to
47dd0d1
Compare
Not really. We only rebuild the last image to compile and install Spock. All other images are cached. In fact, we could combine the pgEdge and (patched) Postgres images and call it
If we're not worried about the
We can configure github actions to selectively run a job if the |
That is the key to why I have stopped here. We have no guarantee this job will be executed before any other testing job that may cause failure. It is just not flexible enough to design a proper YAML script. I personally don't like such false positives because they waste hours of scrutiny. Unfortunately, it must be checked at each script file, and each job in these scripts should verify that, at least, while we don't want to test each commit. Anyway, I'm no welder when it comes to this stuff. So, if you have ideas, I would be glad to discover the schema with code samples - Miro diagrams are a good place for such things. |
To avoid repeating the process of refreshing the OS image required for Spock testing, prepare it once, store it at ghcr.io, and reuse it to build a Docker image with a patched Postgres and Spock extension. No automatic check of the cached entry is necessary; re-run the workflow manually in GitHub Actions if the image appears slightly stale. TODO: It makes sense to cache a Docker image with a patched Postgres branch for supported versions on top of a basic Docker image, as we don't frequently change our patches. There will be some checks necessary to ensure that the patch set hasn't been changed since the last image creation, as well as the 'install.py' script.
47dd0d1 to
db170d3
Compare
|
One last thing- I think we should delete Dockerfile.el9 if it is no longer being used. |
db170d3 to
1bb6f9b
Compare
Done |
* Introduce a transient Docker image. To avoid repeating the process of refreshing the OS image required for Spock testing, prepare it once, store it at ghcr.io, and reuse it to build a Docker image with a patched Postgres and Spock extension. No automatic check of the cached entry is necessary; re-run the workflow manually in GitHub Actions if the image appears slightly stale. TODO: It makes sense to cache a Docker image with a patched Postgres branch for supported versions on top of a basic Docker image, as we don't frequently change our patches. There will be some checks necessary to ensure that the patch set hasn't been changed since the last image creation, as well as the 'install.py' script. (cherry picked from commit 56c362d)
* Introduce a transient Docker image. To avoid repeating the process of refreshing the OS image required for Spock testing, prepare it once, store it at ghcr.io, and reuse it to build a Docker image with a patched Postgres and Spock extension. No automatic check of the cached entry is necessary; re-run the workflow manually in GitHub Actions if the image appears slightly stale. TODO: It makes sense to cache a Docker image with a patched Postgres branch for supported versions on top of a basic Docker image, as we don't frequently change our patches. There will be some checks necessary to ensure that the patch set hasn't been changed since the last image creation, as well as the 'install.py' script. (cherry picked from commit 56c362d)
* Introduce a transient Docker image. To avoid repeating the process of refreshing the OS image required for Spock testing, prepare it once, store it at ghcr.io, and reuse it to build a Docker image with a patched Postgres and Spock extension. No automatic check of the cached entry is necessary; re-run the workflow manually in GitHub Actions if the image appears slightly stale. TODO: It makes sense to cache a Docker image with a patched Postgres branch for supported versions on top of a basic Docker image, as we don't frequently change our patches. There will be some checks necessary to ensure that the patch set hasn't been changed since the last image creation, as well as the 'install.py' script.
To avoid repeating the process of refreshing the OS image required for Spock testing, prepare it once, store it at ghcr.io, and reuse it to build a Docker image with a patched Postgres and Spock extension.
No automatic check of the cached entry is necessary; re-run the workflow manually in GitHub Actions if the image appears slightly stale.
TODO:
It makes sense to cache a Docker image with a patched Postgres branch for supported versions on top of a basic Docker image, as we don't frequently change our patches. There will be some checks necessary to ensure that the patch set hasn't been changed since the last image creation, as well as the 'install.py' script.