Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ADR 41: Konflux should emit cloud events. #206

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ggallen
Copy link

@ggallen ggallen commented Sep 24, 2024

No description provided.

Copy link
Member

@gbenhaim gbenhaim 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 just want to mention that Tekton has a feature for emitting cloud event (https://tekton.dev/vault/pipelines-v0.50.x-lts/additional-configs/#configuring-cloudevents-notifications), so at least reacting to the Konflux' pipelineruns and taskruns is already possible today.

@ggallen
Copy link
Author

ggallen commented Oct 10, 2024

so at least reacting to the Konflux' pipelineruns and taskruns is already possible today.

The functionality is there in Tekton, but I don't believe it is enabled by default. But one of the first things to do should this ADR be accepted is to turn on that functionality.

they can use these cloud events to create their own product-specific infrastructure to support their build
and release process.

To support this, all Konflux components should be required to emit cloud events for signicant events. These
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's consider if "should be required to emit" is too strong of a statement. I believe "should emit" better describes the intent.

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree on the "softening"

Copy link
Author

Choose a reason for hiding this comment

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

Why? I actually don't agree. This should be a requirement. If not, you end up with a system that has no consistency. Some tools may emit events while other do not. This does not make a for a consistent, or good, user experience.

The intent of the ADR is to have Konflux emit events for everything that makes sense.

Copy link
Contributor

Choose a reason for hiding this comment

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

In this case, I do not agree with the ADR. It's too early to make such a call. We should first experiment with emitting some cloud events. Then, once the value has been proved, we can make a follow up ADR to actually apply this across the board.

Copy link
Author

Choose a reason for hiding this comment

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

It's too early to make such a call.

To early in what sense?

Tekton already provides cloud events, so they have done this "experiment" and have determined it is worthwhile.

I am working on getting together some use cases.

Copy link
Contributor

@lcarva lcarva Jan 13, 2025

Choose a reason for hiding this comment

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

To early in what sense?

I'm thinking of the Konflux-specific components, e.g. release/integration service. I'd like to see things like that emitting cloud events for some time before requiring everything in Konflux to emit cloud events.

@lcarva
Copy link
Contributor

lcarva commented Oct 15, 2024

The functionality is there in Tekton, but I don't believe it is enabled by default. But one of the first things to do should this ADR be accepted is to turn on that functionality.

However, the ADR mentions:

Cloud event generation could be optional and that option could default to off.

Are you talking about turning on that functionality on a specific deployment of Konflux? That is perhaps outside the scope of these ADRs. As I see it, these are about the Konflux project, not necessarily any one deployment of Konflux.


## Consequences

Product teams can more easily build product-specific build and release infrastructure in Konflux.
Copy link
Member

Choose a reason for hiding this comment

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

Can you add more to this section to make it more clear how, when, and why cloudevents would be used as opposed to extending build, test, or release pipelines?

Copy link
Author

Choose a reason for hiding this comment

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

@ralphbean, please see the section of use cases that I just added.

@ralphbean
Copy link
Member

Some notes from the architecture call today.

  • It should be possible to turn this off (and perhaps default to off) for the upstream installer to keep the footprint small.
  • Tekton already exposes CloudEvents. Turning that on should just be a configuration option that someone running the platform can do today.
  • There was some confusion about who the target audience for CloudEvents is. After discussion in the call (and some more afterwards) the intended audience is the end-user; the developer using Konflux to build their software.
  • There's a note already in the architecture constraints that says "Use tekton for anything that should be extended by the user (building, testing, releasing)." If the purpose here is to give the end user a way to extend the system, that line needs to be revised.
  • If we're revising that constraint, then we need some explanation of why, when, and how a user would choose to use cloudevents rather than extend their build, test, and release pipelines.

Arguably, anything a user might do with cloudevents they might also be able to do by extending their build, test, or release pipelines. If the idea here is that using cloudevents can be simpler for that user, I'd like to see in the Consequences section some elaboration on how that will work (what resources does the user need to create to take advantage of this, what RBAC do they need to achieve this).


## Consequences

Product teams can more easily build product-specific build and release infrastructure in Konflux.
Copy link
Member

Choose a reason for hiding this comment

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

If this is a path we want to pursue, that likely entails UI support. If we recommend users extend our platform by way of cloudevents, then their sinks and triggers should all get some representation in the UI to visualize what they've assembled and its runtime status.

If that makes sense, then that deserves some elaboration in the Consequences section here.

Copy link
Author

Choose a reason for hiding this comment

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

I don't envision the UI being involved here at all. The emission of cloud events just allows users to monitor and react to any event they deem important. It similar to a CLI, and in that case I wouldn't expect the UI to display anything about any client that uses the CLI.

@scoheb
Copy link
Contributor

scoheb commented Oct 16, 2024

I think this ADR could benefit from the use cases or examples of situations where cloudevents would be helpful to users. What do you envision the users wanting to do?

I believe this would help with the question I ask myself ... "why not develop whatever feature the users is resorting to using cloudevents for?"

@arewm arewm changed the title Konflux should emit cloud events. ADR 41: Konflux should emit cloud events. Nov 6, 2024
ADR/0039-send-cloud-events.md Outdated Show resolved Hide resolved
@ggallen
Copy link
Author

ggallen commented Jan 22, 2025

Cloud event generation could be optional and that option could default to off.

Are you talking about turning on that functionality on a specific deployment of Konflux? That is perhaps outside the scope of these ADRs. As I see it, these are about the Konflux project, not necessarily any one deployment of Konflux.

Konflux should allow users to turn on or turn off the emission of cloud events. Turning it on would then turn on emitting cloud events in all Konflux components. The same for turning it off.

In other words, this should be provided as a Konflux configuration option, to be turned on or off in any Konflux deployment.

@ggallen
Copy link
Author

ggallen commented Jan 22, 2025

I think this ADR could benefit from the use cases or examples of situations where cloudevents would be helpful to users. What do you envision the users wanting to do?

I believe this would help with the question I ask myself ... "why not develop whatever feature the users is resorting to using cloudevents for?"

@scoheb, I just added a section of use cases.

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.

7 participants