-
Notifications
You must be signed in to change notification settings - Fork 32
Conversation
9175cc9
to
cacbdc9
Compare
} | ||
|
||
private static String readFloRunnerVersion() { | ||
final String resource = "/com/spotify/flo/flo-runner.version"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If flo is shaded won't this path be different then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it is relocated yes, but the shading plugin then also updates this string to reflect that. Added tests for that.
public void shouldReadFloVersion() throws IOException { | ||
final String expectedVersion; | ||
try (final BufferedReader reader = new BufferedReader(new InputStreamReader( | ||
Version.class.getResourceAsStream("/com/spotify/flo/flo-runner.version")))) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test should never be shaded.
Other than the test failing due to memory, this looks good to me 👍 |
Tried a fix here #198 although not sure if it's the best approach. @danielnorberg ptal |
9791113
to
8f15261
Compare
Hey, I just made a Pull Request!
Description
Shading tolerant version reading
Motivation and Context
If users (e.g. MC) shades flo-runner, we currently log an incorrect flo runner version.
Have you tested this? If so, how?
Checklist for PR author(s)
Checklist for PR reviewer(s)