Skip to content

Use registry images instead of building - #98

Merged
szachovy merged 3 commits into
masterfrom
use-registry-images
Apr 8, 2026
Merged

Use registry images instead of building#98
szachovy merged 3 commits into
masterfrom
use-registry-images

Conversation

@szachovy

@szachovy szachovy commented Apr 8, 2026

Copy link
Copy Markdown
Owner

Summary

Add a publish workflow to push images to GHCR on master merge, and add pull-first with build fallback logic to the deployment source code.

Changes

  • New publish.yml workflow: Triggers on push to master, builds all three service images (mysql-server, mysql-mgmt, superset-service) in parallel via a matrix strategy, and pushes them to GHCR under the latest tag.
  • Source code (container.py): Added pull_or_build_image static method to ContainerConnection that tries pulling from GHCR first and falls back to local docker build. Applied to MySQLServer, MySQLMgmt, and Superset container runs.
  • Updated tests.yml workflow: Always builds images locally since tests validate the latest code, not published images.
  • Updated CHANGELOG.md with the new entries.

Closes #97

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR shifts deployments to prefer pulling pre-built service images from GHCR (with a local build fallback), and adds CI automation to publish those images on merges to master.

Changes:

  • Add a new publish.yml workflow that builds and pushes the three service images to GHCR under the latest tag on pushes to master.
  • Update deployment code to pull images first and build from local context only if the pull fails.
  • Simplify the test workflow to always build :latest images locally for reproducibility against the current code.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
src/container.py Adds pull_or_build_image and applies it to mysql-server, mysql-mgmt, and superset deployment paths.
CHANGELOG.md Documents the new publish workflow and pull-first deployment behavior.
.github/workflows/tests.yml Removes branch-tag logic; always builds and loads :latest images locally in CI tests.
.github/workflows/publish.yml New workflow to build and push :latest images to GHCR via a matrix job.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/container.py Outdated
Comment thread src/container.py
szachovy and others added 3 commits April 8, 2026 12:08
Add publish workflow that builds and pushes service images to GHCR
on master merge. Update test workflow to pull pre-built images from
the registry with a local build fallback when pull fails.

Closes #97

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add pull_or_build_image static method to ContainerConnection that
tries to pull images from GHCR first and falls back to local build.
Apply it to MySQLServer, MySQLMgmt, and Superset container runs.
Revert test workflow to always build images locally since tests
validate the latest code, not published images.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Catch docker.errors.DockerException and requests.exceptions.RequestException
in pull_or_build_image to handle connection-level failures during pull.
Pass outer ContainerConnection client to MySQLMgmt instead of creating
a fresh docker.from_env() instance.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@szachovy
szachovy force-pushed the use-registry-images branch from 97943e9 to de1dadf Compare April 8, 2026 10:09
@szachovy
szachovy merged commit 0ab8ce7 into master Apr 8, 2026
13 checks passed
@szachovy
szachovy deleted the use-registry-images branch April 8, 2026 10:46
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.

Use registry images instead of building

2 participants