Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Feat: adjust fields for ECS compatibility #28
Feat: adjust fields for ECS compatibility #28
Changes from 17 commits
1115792
7f38fc5
650d3ec
8f44b7d
014b436
9bac9ef
bce9c56
7074cb1
459cbb1
4074fc9
c7995b0
d043a26
65f8ae9
4cff8b0
7fb1bf5
9498a16
46371a5
14fcf06
442af4d
8536b8a
9fe1d18
3838f77
3b4db7a
a4319a8
ca20cfc
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
nit: can we avoid transitioning through a lossy format, and hold nanos as our intermediate?
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.
sure we can, but our over-head won't make it super precise.
forgot JRuby is no longer using
currentTimeMillis
forTime.now
but actually does a native call directly and has nanos -> thus it's a good and valid point - updated, thanks for the advice.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.
oof. I don't like skipping specs in CI. Can you explain why this is needed? what doesn't raise?
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.
sorry I forgot about this one - should have mentioned the behavior difference in Docker vs non-Docker.
normally one gets
Errno::ENOENT: No such file or directory - invalid_command
for a missing command,however the behavior is different in Docker -
popen
does not raise - we simply get a non-zero exit code:"message"=>"", "process"=>{"command_line"=>"invalid_command 1 2 3", "exit_code"=>127}
haven't looked into this one as it's existing behavior - thought we rather have this as a known behavior spec-ed.
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 there are two different behaviours, depending on which platform it is run, I would prefer we clearly specify both behaviours instead of specifying one of the behaviours and conditionally executing that spec.
If possible, it could be helpful to emulate the underlying change in behaviour and define our specs so that we can validate our effective behavour in CI regardless of which platform it is executed on (It would be hard to stub
IO::popen
because we rely on its side-effect of setting$?
, but can we stubrun_command
?).So our specs output would look something like:
when command fails
on a platform where IO.popen raises ENOENT
it does not enqueue an event
on a platform where IO.popen does not raise ENOENT (Docker)
it enqueues an event tagged with the error code
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 we're going this far as to specify the behavior that I would rather move this out of this PR.
Have opened an issue #29 + I will create a draft with the suggested spec.
The problematic (newly added) spec has been removed.