Skip to content

HIVE-29463: Publish nightly Docker images#6387

Open
okumin wants to merge 3 commits intoapache:masterfrom
okumin:HIVE-29463-nightly
Open

HIVE-29463: Publish nightly Docker images#6387
okumin wants to merge 3 commits intoapache:masterfrom
okumin:HIVE-29463-nightly

Conversation

@okumin
Copy link
Copy Markdown
Contributor

@okumin okumin commented Mar 22, 2026

What changes were proposed in this pull request?

Add a scheduled workflow that publishes a snapshot image daily.

https://issues.apache.org/jira/browse/HIVE-29463

Why are the changes needed?

  • Hive developers can quickly check the behavior of the latest master branch
  • Hive developers can quickly test new features
  • Hive developers can easily develop container-related features
  • The Docker build pipeline is regularly tested

See also a discussion in the mailing list: https://lists.apache.org/thread/jm0n4n3wz6tkstf1f6v1hzog082p4xq8

Does this PR introduce any user-facing change?

No

How was this patch tested?

I tested the scheduled workflow on my fork: https://github.com/okumin/hive/actions/runs/23972678142
Created images are here: https://hub.docker.com/repository/docker/okumin/hive/tags

on:
create:
schedule:
- cron: '17 3 * * *'
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I chose an odd time, following the guidance.

The schedule event can be delayed during periods of high loads of GitHub Actions workflow runs. High load times include the start of every hour. If the load is sufficiently high enough, some queued jobs may be dropped. To decrease the chance of delay, schedule your workflow to run at a different time of the hour.

run: |
echo "namespace=${{ vars.DOCKER_NAMESPACE || 'apache' }}" >> $GITHUB_ENV
echo "tag=$HIVE_VERSION" | awk '{print tolower($0)}' >> $GITHUB_ENV
echo "tag=$HIVE_VERSION" >> $GITHUB_ENV
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I believe we don't have a case where we have to keep the tolower.

Also, this PR currently assumes we want to replace 4.3.0-SNAPSHOT and standalone-metastore-4.3.0-SNAPSHOT every day. I'd say it is a good starting point; we can add the date or checksum later if we want.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 4, 2026

if [[ "$tag" != *-SNAPSHOT ]]; then
echo "Nightly image tag must end with -SNAPSHOT, got: $tag"
exit 1
fi
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

% cat /tmp/validate.sh                  
#!/bin/bash

tag=$1

if [[ "$tag" != *-SNAPSHOT ]]; then
  echo "Nightly image tag must end with -SNAPSHOT, got: $tag"
  exit 1
fi
% bash /tmp/validate.sh '4.3.0'         
Nightly image tag must end with -SNAPSHOT, got: 4.3.0
% echo $?
1
% bash /tmp/validate.sh '4.3.0-SNAPSHOT'
% echo $?
0

Copy link
Copy Markdown
Member

@deniskuzZ deniskuzZ Apr 5, 2026

Choose a reason for hiding this comment

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

not sure we need version there, how about

apache/hive:4.2.0                        # Hive release
apache/hive:nightly                      # Hive nightly build
apache/hive:standalone-metastore-4.2.0   # HMS release
apache/hive:standalone-metastore-nightly # HMS nightly build

@okumin
Copy link
Copy Markdown
Contributor Author

okumin commented Apr 4, 2026

@deniskuzZ I updated this branch and verified it would work.
https://github.com/okumin/hive/actions/runs/23972678142

@deniskuzZ
Copy link
Copy Markdown
Member

@deniskuzZ I updated this branch and verified it would work. https://github.com/okumin/hive/actions/runs/23972678142

@okumin can't find SNAPSHOTS on Docker Hub

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants