Skip to content

Introduce pre-prod for homebrew [DI-707]#317

Merged
JackPGreen merged 11 commits intomasterfrom
DI-707
Mar 4, 2026
Merged

Introduce pre-prod for homebrew [DI-707]#317
JackPGreen merged 11 commits intomasterfrom
DI-707

Conversation

@JackPGreen
Copy link
Collaborator

@JackPGreen JackPGreen commented Jan 9, 2026

Updates Homebrew to "stage" releasing of production ("stable", non SNAPSHOT). This allows the option of synchronizing the actual release with other operations.

Specifically, routes homebrew metadata updates via a PR (example) (credit to @ldziedziul for the idea).

The PR can then be subsequently merged by the orchestrator via promotion.

I am unable to test this in sandbox due to use of private repository for sandbox artifacts, and brews lack of support for private repos.

Fixes: DI-707


- name: Commit changes & Push to ${{ env.BREW_GIT_REPO_NAME }} repo
working-directory: ${{ env.BREW_GIT_REPO_LOCATION }}
- name: Create PR for changes in ${{ vars.BREW_GIT_REPO_NAME }} repo
Copy link
Contributor

Choose a reason for hiding this comment

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

How this will work now, without a build promotion orchestrator?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

How this will work now, without a build promotion orchestrator?

We haven't properly discussed how the promotion orchestrator hook into staged PRs, but when we breifly discussed it we said were happy with a manual PR merge.

One of the "post-merge" actions is to update the release docs to note that a generated PR will need to be merged.

Copy link
Contributor

Choose a reason for hiding this comment

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

To avoid disturbing the release process maybe we could automatically trigger artifacts promotion for now?

@JackPGreen
Copy link
Collaborator Author

@nishaatr @ldziedziul are you able to review, please?

Copy link
Contributor

@nishaatr nishaatr left a comment

Choose a reason for hiding this comment

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

LGTM

I am not sure about manual PR merge. Just adds extra step during release that could do without. Currently, we push directly and never had issues

I will raise this in next stand-up as currently Release Pipeline does commit a few times and if the trend is to manually merge PRs then best we have a discussion in general. I for one prefer not to manually deal with PRs (it will only introduce delays) and we should rely on automation to do its thing!

@JackPGreen
Copy link
Collaborator Author

LGTM

I am not sure about manual PR merge. Just adds extra step during release that could do without. Currently, we push directly and never had issues

This is part of our (incubating!) pre-prod/promotion pipeline. I'm not saying it will be automated, but adding an extra step is a desirable outcome of this work.

@JackPGreen
Copy link
Collaborator Author

This is part of our (incubating!) pre-prod/promotion pipeline. I'm not saying it will be automated, but adding an extra step is a desirable outcome of this work.

Actually, I think maybe automating it is is sensible. I will have a think and ping you if I get somewhere concrete.

@JackPGreen
Copy link
Collaborator Author

JackPGreen commented Jan 26, 2026

This is part of our (incubating!) pre-prod/promotion pipeline. I'm not saying it will be automated, but adding an extra step is a desirable outcome of this work.

Actually, I think maybe automating it is is sensible. I will have a think and ping you if I get somewhere concrete.

I've added a promoter - 19df782

I will test it later but should work.


- name: Commit changes & Push to ${{ env.BREW_GIT_REPO_NAME }} repo
working-directory: ${{ env.BREW_GIT_REPO_LOCATION }}
- name: Create PR for changes in ${{ vars.BREW_GIT_REPO_NAME }} repo
Copy link
Contributor

Choose a reason for hiding this comment

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

To avoid disturbing the release process maybe we could automatically trigger artifacts promotion for now?


# Only auto-promote SNAPSHOTs
brew-ee-promote:
if: needs.prepare.outputs.release_channel == 'snapshot'
Copy link
Contributor

Choose a reason for hiding this comment

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

@JackPGreen
Copy link
Collaborator Author

This is part of our (incubating!) pre-prod/promotion pipeline. I'm not saying it will be automated, but adding an extra step is a desirable outcome of this work.

Actually, I think maybe automating it is is sensible. I will have a think and ping you if I get somewhere concrete.

I've added a promoter - 19df782

I will test it later but should work.

I've updated and it tested it and it works. But at the moment the merge is still manual, but I've laid some groundwork for future automerging.

I think we need more architecture in place - e.g. for the tagging logic to be within hazelcast-packaging - for this to be incorporated. Or we just comment out the "if SNAPSHOT" check and always stage/promote. But that renders this PR a bit pointless...

@JackPGreen
Copy link
Collaborator Author

Or we just comment out the "if SNAPSHOT" check and always stage/promote. But that renders this PR a bit pointless...

It sounds like @ldziedziul has the same concern.

Maybe we should pause this until we've got the groundwork in place?

@nishaatr
Copy link
Contributor

Or we just comment out the "if SNAPSHOT" check and always stage/promote. But that renders this PR a bit pointless...

It sounds like @ldziedziul has the same concern.

Maybe we should pause this until we've got the groundwork in place?

can you list the groundworks i.e. git tag + ....??

From release perspective its ok to do manual PR merge once we have that in the instructions

but we did auto promote with Docker so feels like we should do the same here...may be!

@nishaatr
Copy link
Contributor

PR still in DRAFT!

@JackPGreen
Copy link
Collaborator Author

PR still in DRAFT!

This PR is blocked by getting pre-prod working for Docker. Once that's done, and I've had a chance to test in sandbox, I will re-open for comments.

@JackPGreen
Copy link
Collaborator Author

can you list the groundwork

Groundwork is having a release orchestrator that works. Which we are now very close to.

@JackPGreen
Copy link
Collaborator Author

@ldziedziul @nishaatr

I've updated this PR to automate some of the concerns from last time, specifically for a release, the promotion orchestrator will be responsible for merging the PRs

Note:

I am unable to test this in sandbox due to use of private repository for sandbox artifacts, and brews lack of support for private repos.

PR_URLS=$(
gh pr list \
--repo "${{ vars.BREW_GIT_REPO_NAME }}" \
--search "'Hazelcast Homebrew Package ${HZ_VERSION} ${HZ_DISTRIBUTION} release' in:title author:${USERNAME}" \
Copy link
Contributor

Choose a reason for hiding this comment

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

We rely on this message, maybe add a rererence to the place we set it

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good idea, centralised

3e3ca60

JackPGreen and others added 2 commits March 4, 2026 11:08
Co-authored-by: Nishaat Rajabali <12186256+nishaatr@users.noreply.github.com>
@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 4, 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