-
Notifications
You must be signed in to change notification settings - Fork 390
[azure] fix bug causing log splitting to not work properly #950
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
Conversation
return Object.assign({ | ||
ddsource: 'azure.datafactory', | ||
ddsourcecategory: 'azure', | ||
service: 'azure', | ||
ddtags: 'forwardername:testFunctionName' | ||
}, x); |
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.
🟠 Code Quality Violation
Prefer object spread over `Object.assign` (...read more)
This rule encourages the use of the object spread syntax over the Object.assign
method when creating a new object from an existing one where the first argument is an empty object. This is because the object spread syntax is more concise, easier to read, and can eliminate the need for null checks that are often necessary with Object.assign
.
If you need to use Object.assign
, make sure that the first argument is not an object literal, as this can easily be replaced with the spread syntax.
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.
Looks good aside from the code quality recommendations. Thanks for adding the additional tests.
What does this PR do?
There was a bug in our log forwarder which caused log splitting to not function properly. We were incorrectly assuming we had a field name when we actually had an index.
Motivation
Log splitting was not working no matter what setting were used.
Testing Guidelines
Unit tests added to test this behavior
Additional Notes
Types of changes
Check all that apply