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

[repo] CI tweaks and improvements #5651

Merged
merged 11 commits into from
May 28, 2024

Conversation

CodeBlanch
Copy link
Member

Changes

  • Uses OpenTelemetry.proj instead of OpenTelemetry.sln for code builds
  • Adds a build of OpenTelemetry.sln if it is changed

Details

I noticed a couple gaps in our CI:

  1. [docs] Add exemplar project to solution #5650: Didn't build anything. The change could have mangled the solution and it would have passed CI.
  2. [docs] Improve exemplars tutorial #5636: Modified a project which wasn't part of the solution. A build ran but it didn't actually compile the code on the PR.

For 1 there is now a build for solution if it is changed.

For 2 we now use OpenTelemetry.proj for builds instead of the solution. The project is more dynamic and picks up all .csproj files automatically.

Merge requirement checklist

  • CONTRIBUTING guidelines followed (license requirements, nullable enabled, static analysis, etc.)

@CodeBlanch CodeBlanch added the infra Infra work - CI/CD, code coverage, linters label May 24, 2024
@CodeBlanch CodeBlanch requested a review from a team May 24, 2024 20:29
Copy link

codecov bot commented May 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.78%. Comparing base (6250307) to head (4ff635b).
Report is 242 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #5651      +/-   ##
==========================================
+ Coverage   83.38%   85.78%   +2.39%     
==========================================
  Files         297      254      -43     
  Lines       12531    11036    -1495     
==========================================
- Hits        10449     9467     -982     
+ Misses       2082     1569     -513     
Flag Coverage Δ
unittests ?
unittests-Project-Experimental 85.58% <ø> (?)
unittests-Project-Stable 85.58% <ø> (?)
unittests-Solution 85.71% <ø> (?)
unittests-UnstableCoreLibraries-Experimental 19.95% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

see 114 files with indirect coverage changes

carryforward: true
paths:
- src

unittests-Instrumentation-Experimental:
unittests-UnstableCoreLibraries-Experimental:
Copy link
Member

Choose a reason for hiding this comment

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

Is there still a concept called "core libraries" after instrumentation libs moved away?

Copy link
Member Author

Choose a reason for hiding this comment

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

There's two tags:

<MinVerTagPrefix>core-</MinVerTagPrefix>
<MinVerTagPrefix>coreunstable-</MinVerTagPrefix>

But I get your point, we could probably just use stable- and unstable- since everything is now "core" 🤣 Follow-up!

- name: dotnet pack OpenTelemetry.proj
run: dotnet pack OpenTelemetry.proj --configuration Release
- name: dotnet pack
run: dotnet pack ./build/OpenTelemetry.proj --configuration Release
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think so. I searched the repo for all occurrences of OpenTelemetry.proj to make sure I wasn't breaking anything. What I will do (follow-up) is mention in that guide new files\projects should be added to the solution.


- name: dotnet format
run: dotnet format OpenTelemetry.sln --no-restore --verify-no-changes
run: dotnet format OpenTelemetry.sln --no-restore --verify-no-changes # Note: .proj files are currently not supported by dotnet format
Copy link
Member Author

Choose a reason for hiding this comment

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

Ideally we would run dotnet format over OpenTelemetry.proj but that isn't supported currently. This means projects not added to the solution won't have this linting performed. I tried some powershell to find all the .csproj files and manually call dotnet format over them but I canceled my test run after 17+ minutes. IMO having it run quickly and potentially missing things is the lesser evil than covering everything and it taking forever to run.

@CodeBlanch CodeBlanch merged commit 81244d6 into open-telemetry:main May 28, 2024
50 checks passed
@CodeBlanch CodeBlanch deleted the repo-ci-improvements branch May 28, 2024 06:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infra Infra work - CI/CD, code coverage, linters
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants