Skip to content

fix(deployment): Pin Presto image tags to versioned defaults and allow overrides via env vars (fixes #2072).#2073

Merged
junhaoliao merged 5 commits into
y-scope:mainfrom
junhaoliao:always-pull-presto
Mar 12, 2026
Merged

fix(deployment): Pin Presto image tags to versioned defaults and allow overrides via env vars (fixes #2072).#2073
junhaoliao merged 5 commits into
y-scope:mainfrom
junhaoliao:always-pull-presto

Conversation

@junhaoliao

@junhaoliao junhaoliao commented Mar 5, 2026

Copy link
Copy Markdown
Member

Description

The Presto docker-compose.yaml hardcodes :dev image tags for both the presto-coordinator and presto-worker services:

image: "ghcr.io/y-scope/presto/coordinator:dev"

image: "ghcr.io/y-scope/presto/prestissimo-worker:dev"

This causes a problem: it's impossible to pin specific image versions on release branches, and the mutable :dev tag can silently change underneath users.

This PR:

  • Replaces the hardcoded :dev tags with configurable environment variables that default to
    clp-v0.10.0:
    • CLP_PRESTO_COORDINATOR_IMAGE_TAG (default: clp-v0.10.0) for the coordinator service.
    • CLP_PRESTO_WORKER_IMAGE_TAG (default: clp-v0.10.0) for the worker service.

The versioned default (clp-v0.10.0) follows the convention used by other third-party services in the project that pin specific version tags (e.g., redis:7.2.4, mongo:7.0.1, rabbitmq:3.9.8).
The configurable env var approach follows the existing convention where Docker image references are overridable (e.g., CLP_DB_CONTAINER_IMAGE_REF in docker-compose-all.yaml).

Checklist

  • The PR satisfies the [contribution guidelines][yscope-contrib-guidelines].
  • This is a breaking change and that has been indicated in the PR title, OR this isn't a
    breaking change.
  • Necessary docs have been updated, OR no docs need to be updated.

Validation performed

Scenario 1: Default image tags (no env vars set)

Task: Verify that with no env vars set, both images resolve to the :clp-v0.10.0 tag and no
pull_policy is configured (matching how other third-party services are defined).

Command:

cd tools/deployment/presto-clp
touch .env
docker compose config 2>&1 | grep -E "(image:|pull_policy:)"
rm .env

Output:

    image: ghcr.io/y-scope/presto/coordinator:clp-v0.10.0
    image: ghcr.io/y-scope/presto/prestissimo-worker:clp-v0.10.0

Explanation: Both services correctly default to :clp-v0.10.0. No pull_policy is present,
which matches the convention used by other third-party services (redis, mongo, rabbitmq).
Since the version tag is immutable, Docker's default pull_policy: missing is sufficient.

Scenario 2: Custom image tags via environment variables

Task: Verify that setting CLP_PRESTO_COORDINATOR_IMAGE_TAG and CLP_PRESTO_WORKER_IMAGE_TAG
overrides the default tag.

Command:

cd tools/deployment/presto-clp
echo -e "CLP_PRESTO_COORDINATOR_IMAGE_TAG=clp-v0.9.0\nCLP_PRESTO_WORKER_IMAGE_TAG=clp-v0.9.0" > .env
docker compose config 2>&1 | grep -E "(image:|pull_policy:)"
rm .env

Output:

    image: ghcr.io/y-scope/presto/coordinator:clp-v0.9.0
    image: ghcr.io/y-scope/presto/prestissimo-worker:clp-v0.9.0

Explanation: Both services correctly use the custom tag clp-v0.9.0, confirming that release
branches can pin specific image versions via these environment variables.
[yscope-contrib-guidelines]: https://docs.yscope.com/dev-guide/contrib-guides-overview.html

Summary by CodeRabbit

  • Chores
    • Updated Presto deployment to use environment-driven image versioning for coordinator and worker services.
    • Enables specifying image tags at deploy time and ensures images refresh automatically during deployments.

@junhaoliao junhaoliao requested a review from a team as a code owner March 5, 2026 18:46
@coderabbitai

coderabbitai Bot commented Mar 5, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

Docker Compose for Presto was modified to parameterize coordinator and prestissimo-worker image tags using environment variables with defaults set to clp-v0.10.0; no other service configuration was changed.

Changes

Cohort / File(s) Summary
Docker Compose
tools/deployment/presto-clp/docker-compose.yaml
Replaced static image tags with env-var driven tags: ghcr.io/y-scope/presto/coordinator:${CLP_PRESTO_COORDINATOR_IMAGE_TAG:-clp-v0.10.0} and ghcr.io/y-scope/presto/prestissimo-worker:${CLP_PRESTO_WORKER_IMAGE_TAG:-clp-v0.10.0}. No other service fields changed.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related issues

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately reflects the main changes in the PR: pinning Presto image tags to versioned defaults (clp-v0.10.0) and allowing overrides via environment variables.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@junhaoliao junhaoliao added this to the March 2026 milestone Mar 5, 2026
@junhaoliao junhaoliao marked this pull request as draft March 9, 2026 18:16
@junhaoliao

Copy link
Copy Markdown
Member Author

Converting this to draft until I confirm the changes are working with the latest code

@hoophalab @20001020ycx i'll ping you when it's ready for review. thanks in advance

@junhaoliao junhaoliao marked this pull request as ready for review March 10, 2026 16:52
hoophalab
hoophalab previously approved these changes Mar 10, 2026

@hoophalab hoophalab 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.

LGTM. Though I'm not sure if pull_policy: always is needed. The user should decide whether to pull a new image of same tag.

@junhaoliao

Copy link
Copy Markdown
Member Author

LGTM. Though I'm not sure if pull_policy: always is needed. The user should decide whether to pull a new image of same tag.

i think the using the latest tag with the always pull policy is fine on the main branch as it's supposed to be a staging (for development) than a release branch.

that said, using the latest tag does differ from the specifications of other third-party images where fixed version tags are used. the plan going forward is to allow "presto" to be configurable in the clpConfig.bundled[] and therefore the Presto services should be consider "third-party" from the CLP package's perspective, and i think their handling should match. how do you feel about replacing the latest tag with a version tag then?

cc @kirkrodrigues

@kirkrodrigues

Copy link
Copy Markdown
Member

how do you feel about replacing the latest tag with a version tag then?

Seems reasonable. I guess by latest, you really mean dev in this context?

@junhaoliao

Copy link
Copy Markdown
Member Author

how do you feel about replacing the latest tag with a version tag then?

Seems reasonable. I guess by latest, you really mean dev in this context?

right i meant dev. sorry


i'll update the PR to use the version tag then

@junhaoliao junhaoliao changed the title fix(deployment): Allow Presto image tags to be configurable and always pull latest images (fixes #2072). fix(deployment): Pin Presto image tags to versioned defaults and allow overrides via env vars (fixes #2072). Mar 12, 2026
@junhaoliao junhaoliao requested a review from hoophalab March 12, 2026 17:48
@junhaoliao junhaoliao merged commit b27425a into y-scope:main Mar 12, 2026
21 checks passed
@junhaoliao junhaoliao deleted the always-pull-presto branch May 7, 2026 19:46
junhaoliao added a commit to junhaoliao/clp that referenced this pull request May 17, 2026
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