-
Notifications
You must be signed in to change notification settings - Fork 51
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
Implement automatic Test Visibility instrumentation for .NET projects #400
Implement automatic Test Visibility instrumentation for .NET projects #400
Conversation
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.
I haven't investigated if the actual commands we're using in the configurator are the correct ones, but code wise I've dropped a couple of minor comments.
Apart from that, LGTM.
String tracerVarOutput = workspacePath.act(new ShellCommandCallable(Collections.emptyMap(), SHOW_TRACER_VARS_TIMEOUT_MILLIS, workspacePath.getRemote() + File.separator + "dd-trace", "ci", "configure", "jenkins")); | ||
|
||
Map<String, String> variables = new HashMap<>(); | ||
for (String line : tracerVarOutput.split("\n")) { |
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.
Can tracerVarOutput
be null
?
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.
That'd be an exceptional situation, so a NullPointerException
would be appropriate (the job itself won't fail anyway, it's just that we'll see the error in the logs)
continue; | ||
} | ||
String[] tokens = line.split("="); | ||
variables.put(tokens[0], tokens.length == 2 ? tokens[1] : ""); |
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.
What happens if the variables.get(key) returns empty string. Is this expected from the DotNet configuration perspective?
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.
Yes, some of the variables can (maybe even should) have an empty value, checked this with an actual .NET project
Requirements for Contributing to this repository
What does this PR do?
Implements automatic APM tracer injection and Test Visibility configuration for .NET projects.
Description of the Change
Alternate Designs
Possible Drawbacks
Verification Process
Additional Notes
Release Notes
Review checklist (to be filled by reviewers)
changelog/
label attached. If applicable it should have thebackward-incompatible
label attached.do-not-merge/
label attached.kind/
andseverity/
labels attached at least.