Skip to content

Conversation

@marko-bekhta
Copy link
Member


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on licensing, please check here.


Signed-off-by: marko-bekhta <marko.prykladna@gmail.com>
Comment on lines +153 to +163
- name: Notify the build failure
if: ${{ failure() && github.repository == 'hibernate/hibernate-validator'}}
uses: zulip/github-actions-zulip/send-message@e4c8f27c732ba9bd98ac6be0583096dea82feea5 # v1.0.2
with:
api-key: ${{ secrets.ZULIP_GITHUB_WORKFLOW_NOTIFICATION_API_KEY }}
email: ${{ secrets.ZULIP_GITHUB_WORKFLOW_NOTIFICATION_EMAIL }}
organization-url: "https://hibernate.zulipchat.com"
type: "stream"
to: "hibernate-validator-dev"
topic: "GitHub workflow failures"
content: "The GitHub [build #${{github.run_id}}](https://github.com/hibernate/hibernate-validator/actions/runs/${{github.run_id}}) failed and requires your attention :warning:"
Copy link
Member Author

Choose a reason for hiding this comment

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

hey @yrodiere
since validator workflows are relatively the fastest ones to run 😃 I thought I'd test things out on them first...
I've added a scheduler to trigger the builds on the branches we have in a limited support state and then this extra step to send a zulip notification if things go wrong. But we'd need to setup a new zulip bot to get that working.
That is, of course 🙂, if you think that this ^ makes sense 🫣 🙂

Copy link
Member

Choose a reason for hiding this comment

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

I would have preferred email notifications since this is not something we can/should drop everything else to work on, but... we don't have appropriate mailing lists for that for now, and I don't think Commonhaus is ready to provide any (yet).

So the only thing I would ask is: can we somehow move this to a shared action/workflow that we could update independently, avoiding the need to push to every single branch next time we want to change this (e.g. to switch to emails)?

For Jenkins I believe we can do that by moving the notification stuff to a custom function in the pipeline helpers. For GitHub actions I think shared workflows are our only option...

Copy link
Member Author

Choose a reason for hiding this comment

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

ok, let me try that out ... we might be able to leverage https://docs.github.com/en/actions/tutorials/create-actions/create-a-composite-action
I'm thinking that the hibernate-jenkins-pipeline-helpers could be a place for this shared action ?

the problem with the email notification is ... that it's not a built in functionality, and I didn't see some reputable send-an-email action, that's how I ended up with the zulip idea...

Copy link
Member

Choose a reason for hiding this comment

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

I'm thinking that the hibernate-jenkins-pipeline-helpers could be a place for this shared action ?

I would have put it in https://github.com/hibernate/.github/?

Copy link
Member Author

Choose a reason for hiding this comment

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

hmm yeah .. I thought about this one initially ... but then thought that the .github one is more of a "special" repository and we'd be bettter with the action/workflow in some CI related repository 🙂
but if you think .github is the place for it 👍🏻 🙂

btw the idea with the shared action didn't play out as I'd wish it to... since for it to work we need to pass the secrets to the action when we use it .. so it means we'd be changing the workflows if we decide to send notifications somewhere else... I'll try the workflow next, but it would probably require some orther changes (e.g. the "current repository" might be not the one from which we've called the workflow 🫣 🙂 and I've used that in the action to decrease the # of input parameters)

Copy link
Member

Choose a reason for hiding this comment

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

At the end of the day, whatever works. But the Quarkus team seems the .github repo is a decent place for shared GitHub Actions workflows, at least: https://github.com/quarkusio/.github/tree/main/.github/workflows

@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 3, 2025

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.

2 participants