Skip to content

feat: expose event source metadata #1617

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

Merged
merged 7 commits into from
Nov 25, 2022
Merged

feat: expose event source metadata #1617

merged 7 commits into from
Nov 25, 2022

Conversation

metacosm
Copy link
Collaborator

No description provided.

@metacosm metacosm self-assigned this Nov 22, 2022
@metacosm metacosm requested a review from csviri November 22, 2022 10:03
@metacosm metacosm marked this pull request as ready for review November 23, 2022 12:58
@csviri
Copy link
Collaborator

csviri commented Nov 23, 2022

Could you pls make a summary what is the problem being solved with this PR?


private final EventSource original;
private final String name;
private final AssociatedDependentMetadata dependentMetadata;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Porbably not fully understand the PR, but really don't like this part. The event sources should have no knowledge at all about dependent resources.

@metacosm metacosm requested a review from csviri November 24, 2022 15:14

import io.javaoperatorsdk.operator.processing.event.source.EventSource;

public interface EventSourceMetadata {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Shouldn't we just simply expose NamedEventSource ?
This is not really metadata, it is THE event source with name.
Or rename it to EventSourceWithMetadata.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I debated only using NamedEventSource, don't recall why I didn't actually… 😅

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ah yes, didn't want to expose start / stop but since the EventSource is exposed… 🤷🏼
The alternative would be to expose only what's needed from the EventSource via another interface.

@metacosm metacosm requested a review from csviri November 24, 2022 17:33
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 4 Code Smells

56.5% 56.5% Coverage
0.0% 0.0% Duplication

Copy link
Collaborator

@csviri csviri left a comment

Choose a reason for hiding this comment

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

LGMT

@metacosm metacosm merged commit b81a192 into main Nov 25, 2022
@metacosm metacosm deleted the event-source-metadata branch November 25, 2022 08:36
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