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

Split out signalflow into separate module #332

Merged
merged 9 commits into from
May 9, 2023
Merged

Conversation

breedx-splk
Copy link
Contributor

This modularizes the code quite a bit. There are some tangled dependencies, so 2 additional modules also needed to be factored out: signalfx-connection and signalfx-endpoint.

The dependency graph is basically:

graph TD;
    signalfx-connection-->signalfx-endpoint;
    signalfx-signalflow-->signalfx-endpoint;
    signalfx-signalflow-->signalfx-connection;
    signalfx-java-->signalfx-connection;
    signalfx-java-->signalfx-endpoint;
    signalfx-java-->signalfx-signalflow;
Loading

There was one code change needed to eliminate cycles there. The SignalFxMetricsException which was an unnecessary (named/tag) subclass of RuntimeException was replaced with just RuntimeException.

While I do think this split helps to better organize and show where dependencies are and to eventually pull out signalflow, it also highlights that signalflow still has some dependencies on this common stuff.

@breedx-splk breedx-splk requested review from a team as code owners May 4, 2023 22:41
Copy link
Contributor

@mateuszrzeszutek mateuszrzeszutek left a comment

Choose a reason for hiding this comment

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

Awesome!

Comment on lines +63 to +66
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
</dependency>
Copy link
Contributor

Choose a reason for hiding this comment

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

That's defined as a compile dependency in the parent pom

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think the parent just sets up the versions...so this is definitely required, I confirmed that removing it breaks the build.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think the parent just sets up the versions...so this is definitely required, I confirmed that removing it breaks the build.

I'm not saying that it's not required; I'm saying that if it's a test dep it needs <scope>test</scope>

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, that doesn't work because it's used by the RetryStrategy and RetryHandler which are production classes.

signalfx-connection/pom.xml Show resolved Hide resolved
pom.xml Outdated Show resolved Hide resolved
signalfx-signalflow/pom.xml Outdated Show resolved Hide resolved
signalfx-java/pom.xml Outdated Show resolved Hide resolved
breedx-splk and others added 2 commits May 5, 2023 10:18
Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
@breedx-splk
Copy link
Contributor Author

ready for another look @mateuszrzeszutek thanks!

Copy link
Contributor

@mateuszrzeszutek mateuszrzeszutek left a comment

Choose a reason for hiding this comment

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

🎉

@breedx-splk breedx-splk merged commit f490f10 into main May 9, 2023
2 checks passed
@mateuszrzeszutek mateuszrzeszutek deleted the split_out_signalflow branch May 10, 2023 05:54
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.

None yet

2 participants