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

[POC] Naming cleanup #203

Merged
merged 9 commits into from
Aug 11, 2021
Merged

Conversation

RassK
Copy link
Contributor

@RassK RassK commented Jul 21, 2021

Fixes #

  • Mainly consistent naming all over project.
  • Inconsistency of build output naming in Windows vs Linux / MacOS (due MSBuild vs Make)

@RassK RassK requested a review from a team July 21, 2021 13:10
Copy link
Contributor

@pjanotti pjanotti left a comment

Choose a reason for hiding this comment

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

Name changes themselves look good but I think the important thing is to help test and validate by checking out the branch and building it (via VS, CLI, etc). I will be doing a bit of that.

@@ -63,7 +63,7 @@ partial class Build
foreach (var architecture in ArchitecturesForPlatform)
{
var source = NativeProfilerProject.Directory / "bin" / BuildConfiguration / architecture.ToString() /
"OpenTelemetry.AutoInstrumentation.ClrProfiler.Native.dll";
$"{NativeProfilerProject.Name}.dll";
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@@ -17,7 +17,7 @@
InvokedTargets = new[] { nameof(Workflow) })]
partial class Build : NukeBuild
{
public static int Main () => Execute<Build>(x => x.BuildTracer);
Copy link
Contributor

Choose a reason for hiding this comment

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

How did you notice the spacing issue? StyleCop on VS?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

VS auto formatting (ctrl + f) is in hand like ctrl + s 😄

  • also I think it's entry point and I was playing around with that line too

@pjanotti
Copy link
Contributor

@RassK I got the following trying to run the ./poc.sh via Git bash on Windows:

Build FAILED.

"C:\otel.net.instr\OpenTelemetry.AutoInstrumentation.proj" (BuildCpp target) (1) ->
"C:\otel.net.instr\src\OpenTelemetry.AutoInstrumentation.ClrProfiler.Native\OpenTelemetry.AutoInstrumentation.ClrProfiler.Native.DLL.vcxproj" (Build target) (2) ->
"C:\otel.net.instr\src\OpenTelemetry.AutoInstrumentation.ClrProfiler.Native\OpenTelemetry.AutoInstrumentation.ClrProfiler.Native.vcxproj" (default target) (3) ->
(Lib target) ->
  LINK : fatal error LNK1181: cannot open input file 'lib\fmt_x64-windows-static\debug\lib\fmtd.lib' [C:\otel.net.instr\src\OpenTelemetry.AutoInstrumentation.ClrProfiler.Native\OpenTelemetry.AutoInstrumentation.ClrProfiler.Native.vcxproj]

    0 Warning(s)
    1 Error(s)

What will be the way to run poc.sh on Windows? It is fine for it to eventually disable that script but then we need to update the docs - that said I would rather have some easy way to build and run an instrumented application, the poc.sh is really convenient.

@pjanotti
Copy link
Contributor

After building with nuke on VS dev prompt I am getting modified: .github/workflows/ci.yml it is just the CR/LF:

warning: CRLF will be replaced by LF in .github/workflows/ci.yml.
The file will have its original line endings in your working directory

Since there is a .gitattributes file on the repo it may be good to add a rule for this file to avoid this.

Nowadays, I think everything should simply be LF only since nowadays even notepad understand them.

@RassK
Copy link
Contributor Author

RassK commented Jul 23, 2021

@RassK I got the following trying to run the ./poc.sh via Git bash on Windows:

Build FAILED.

"C:\otel.net.instr\OpenTelemetry.AutoInstrumentation.proj" (BuildCpp target) (1) ->
"C:\otel.net.instr\src\OpenTelemetry.AutoInstrumentation.ClrProfiler.Native\OpenTelemetry.AutoInstrumentation.ClrProfiler.Native.DLL.vcxproj" (Build target) (2) ->
"C:\otel.net.instr\src\OpenTelemetry.AutoInstrumentation.ClrProfiler.Native\OpenTelemetry.AutoInstrumentation.ClrProfiler.Native.vcxproj" (default target) (3) ->
(Lib target) ->
  LINK : fatal error LNK1181: cannot open input file 'lib\fmt_x64-windows-static\debug\lib\fmtd.lib' [C:\otel.net.instr\src\OpenTelemetry.AutoInstrumentation.ClrProfiler.Native\OpenTelemetry.AutoInstrumentation.ClrProfiler.Native.vcxproj]

    0 Warning(s)
    1 Error(s)

What will be the way to run poc.sh on Windows? It is fine for it to eventually disable that script but then we need to update the docs - that said I would rather have some easy way to build and run an instrumented application, the poc.sh is really convenient.

Maybe you are missing clean? poc.sh directs build to build_poc.sh the same one that GH Workflow is using.
Currently I'm running it from VS Code (Bash terminal) but eventually when managed layer is nuked (we should have a task about that) then we can direct all build to nuke, even samples.

@RassK
Copy link
Contributor Author

RassK commented Jul 23, 2021

After building with nuke on VS dev prompt I am getting modified: .github/workflows/ci.yml it is just the CR/LF:

warning: CRLF will be replaced by LF in .github/workflows/ci.yml.
The file will have its original line endings in your working directory

Since there is a .gitattributes file on the repo it may be good to add a rule for this file to avoid this.

Nowadays, I think everything should simply be LF only since nowadays even notepad understand them.

Interesting. Can you try playing around with it, I cannot replicate:
Widows - Visual Studio (Package manager console) - OK
MacOS - Visual Studio for Mac (terminal) - OK
Linux - Visual Studio Code (terminal) - OK

@pellared
Copy link
Member

pellared commented Jul 26, 2021

After building with nuke on VS dev prompt I am getting modified: .github/workflows/ci.yml it is just the CR/LF:

warning: CRLF will be replaced by LF in .github/workflows/ci.yml.
The file will have its original line endings in your working directory

Since there is a .gitattributes file on the repo it may be good to add a rule for this file to avoid this.
Nowadays, I think everything should simply be LF only since nowadays even notepad understand them.

Interesting. Can you try playing around with it, I cannot replicate:
Widows - Visual Studio (Package manager console) - OK
MacOS - Visual Studio for Mac (terminal) - OK
Linux - Visual Studio Code (terminal) - OK

For me, everything is fine as well. I suggest adding a git diff --exit-code target to Workflow pipeline to check what will happen in GH Actions.

@pellared
Copy link
Member

I have run a search for "Datadog" in VS Code and found:

  • missing renames in docs
  • missing rename in /samples/Samples.AspNetCoreMvc21/Controllers/HomeController.cs:21 (it is probably a bug)
  • probably DATADOG_ can be removed from /samples/Samples.AspNetCoreMvc21/Controllers/HomeController.cs:25

I think we can add GitHubActionsImage.UbuntuLatest and GitHubActionsImage.MacOsLatest to build/nuke/Build.cs.

@pjanotti
Copy link
Contributor

Likely, the diff I'm seeing is because I use core.autocrlf=input

$ git diff --exit-code
warning: CRLF will be replaced by LF in .github/workflows/ci.yml.
The file will have its original line endings in your working directory

RassK added 4 commits August 10, 2021 12:59
# Conflicts:
#	.github/dependabot.yml
#	OpenTelemetry.AutoInstrumentation.sln
#	build/nuke/Build.Steps.Windows.cs
#	build_poc.sh
#	dev/envvars.sh
#	src/OpenTelemetry.AutoInstrumentation.ClrProfiler.Native/CMakeLists.txt
@RassK RassK requested a review from pjanotti August 10, 2021 13:09
Copy link
Contributor

@pjanotti pjanotti left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@pellared pellared left a comment

Choose a reason for hiding this comment

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

Let's merge it 😉

@pjanotti pjanotti merged commit 4e2fd9e into open-telemetry:poc-otel-sdk Aug 11, 2021
@RassK RassK deleted the naming-cleanup-otel branch August 12, 2021 10:31
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.

3 participants