Skip to content

Test rpm package _before_ pushing to remote repo - #373

Open
JackPGreen wants to merge 3 commits into
masterfrom
test-local-rpm
Open

JackPGreen wants to merge 3 commits into
masterfrom
test-local-rpm

Conversation

@JackPGreen

@JackPGreen JackPGreen commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Currently (for both regular builds and PRs) we:

  • repackage distribution into RPM package
  • sign package
  • upload to remote repository
  • download/install from remote repo
  • test installed package

This has two issues:

Instead, we should test rpm package before pushing to remote repo - which sidesteps the whole availability issue.

Changes:

  • install from the RPM package we eventually upload, before upload
  • re-ordered steps
  • inline the contents of build-hazelcast-rpm-package.sh to allow (local) RPM package location to be derived
  • break up build step into discrete steps to improve observability

@JackPGreen JackPGreen changed the title test-local-rpm Test rpm package _before_ pushing to remote repo Sep 15, 2026
Comment thread .github/workflows/publish-rpm-package.yml

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.

we should enable JFrog cache again?

@ldziedziul agreed?

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 think it's still a bit racy and I'd suggest leaving it as-is.

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.

I think only when you fetch immediately after update metadata but not sure
moreover, the disabling of cache hasn't helped so we should revert
for some reason there was no issue with deb and I believe because it uses local (not virtual)

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.

@ldziedziul WDYT?
also happens in sandbox #373 (comment)
both envs use local repos so no a cache issue

Comment thread .github/workflows/publish-rpm-package.yml
Comment thread .github/workflows/publish-rpm-package.yml
Comment thread .github/workflows/publish-rpm-package.yml
Comment thread .github/workflows/publish-rpm-package.yml
Comment thread .github/workflows/publish-rpm-package.yml
Comment thread .github/workflows/publish-rpm-package.yml
- name: Calculate YUM Repository Metadata
run: |
# https://docs.jfrog.com/artifactory/reference/calculateyumrepositorymetadata
jf api --method POST "/artifactory/api/yum/${RPM_REPO}"

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.

With this we don't test the install from the remote repo at all anymore (.repo file, recalculated metadata, repo_gpgcheck). Fair enough for gating the upload, but shouldn't we keep it as a non-blocking step at the end (continue-on-error: true, maybe with a short retry loop) so a broken repo is still visible in the run? WDYT?

@nishaatr nishaatr Sep 16, 2026

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.

fyi https://hazelcast.atlassian.net/browse/DI-853
eventually remote will be tested
no harm keeping it here though but if its intermittent, then might be confusing
may be install from rpm-local?
I thought issue was with virtual repo

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.

With this we don't test the install from the remote repo at all anymore (.repo file, recalculated metadata, repo_gpgcheck). Fair enough for gating the upload, but shouldn't we keep it as a non-blocking step at the end (continue-on-error: true, maybe with a short retry loop) so a broken repo is still visible in the run? WDYT?

I agree it would be nice to validate the image is actually usable - but we don't do that in Docker, simply trust our publishing tooling.

However, if we don't have stable tooling in place to support publish-and-test we'll end up with a flakey, often-failing, always-ignored test that adds no value... even if it's flagging a real problem.

fyi https://hazelcast.atlassian.net/browse/DI-853

I have concerns about this - lets discuss in refinement next time.

if its intermittent, then might be confusing may be install from rpm-local? I thought issue was with virtual repo

Unfortunately, we don't know what the cause is - only that I can't reproduce in sandbox.

I've noticed the repository metadata recalculation takes variable amounts of time - <1 minute in sandbox, <3 minutes in sandbox when a genuinely new package is pushed, and >4 minutes in live when a new package is pushed.

I suspect the problem is that there's some background task that takes longer with a larger/longer-lived repo and that doesn't complete in time, leading to the out-of-date metadata. But without being able to reproduce, it's just speculation.

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.

I checked and we are using rpm-local in live
metadata update request is synchronous so likely some (recent) bug/issue on JFrog side. Its been working before

Comment thread .github/workflows/publish-rpm-package.yml
./build-hazelcast-rpm-package.sh
env:
JAVA_VERSION: ${{ inputs.JAVA_VERSION }}
source ./common.sh

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.

Why delete the script rather than just drop jf rt upload from it and have it write echo "file=${RPM_FILE}" >> "${GITHUB_OUTPUT}"? The path is derivable from common.sh anyway. deb and brew still use build-hazelcast-*.sh, so rpm becomes the odd one out. WDYT?

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.

Why delete the script rather than just drop jf rt upload from it and have it write echo "file=${RPM_FILE}" >> "${GITHUB_OUTPUT}"?

This was my first approach, but for some reason the variable wasn't accessible.
But I think my new approach is easier to reason - both while developing, or reading logs.

The path is derivable from common.sh anyway. deb and brew still use build-hazelcast-*.sh, so rpm becomes the odd one out. WDYT?

I think those should change too, but trying to avoid changing everything at once.


jf rt upload \
"${{ steps.create-rpm-package.outputs.file }}" \
"${RPM_REPO}/${RELEASE_CHANNEL}/${HZ_DISTRIBUTION}-${RPM_PACKAGE_VERSION}.noarch.rpm"

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.

nit: we already have the filename in the step output, couldn't we use $(basename "${{ steps.create-rpm-package.outputs.file }}") here (and in the delete step) instead of rebuilding it?

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 think it would be better if it was a constant env, but that blends into refactoring away common.sh which I'm trying to avoid doing at the same time.

@sonarqubecloud

Copy link
Copy Markdown

This branch was successfully deployed

1 active deployment
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