Skip to content

Conversation

@david-luna
Copy link
Contributor

@david-luna david-luna commented May 29, 2025

Which problem is this PR solving?

Changes the PR workflow to a single file to improve it making it faster with less resource consumption. The goal is to provide feedback to the PR author by compiling, testing and reporting coverage only for the affected packages in the PR (as for now it does a compilation, test, and coverage report for all in nodejs v18). More details on the plan can be found in #2870

Closes: #2870

Short description of the changes

  • add new PR workflow with:
    • single compile step for affected packages. results are cached
    • unit and TAV test for affected packages for a matrix of nodejs versions. Reusing compilation results from cache. coverage reports are cached
    • get coverage reports from all nodejs versions (in cache) and merge them. then upload them to codecov
  • add scripts to support such workflow
    • *:ci:affected script at root to execute tasks only for affected packages (leveraging nx CLI)
  • update codecov.yml to assign flags to each package so reports can be updated independently
  • remove obsolete workflows for unit test and test-all-versions for PRs and push events

Checklist

Codecov flags feature require a first manual upload to create them so it would be helpful to resume #2214 to at least have a script at the root to testa and upload all reports. There is also some PRs that affect the flag configuration so it would be preferable to have them merged 1st

@david-luna
Copy link
Contributor Author

@pichlermarc thanks for the approval.

If you don't mind to do another review. I had to change the codecov action but a custom script since there was no options in the action to update flags for each package and adding a codecov step for each package of the repo feels too much.

Until now I've set the --dry-run option so this PR was not messing with the previous reports. Once you have a second look and if all is fine I will proceed to do the actual upload. LAten I will probably need someone with access to codecov to enable flag analytics as described in https://docs.codecov.com/docs/flags#tracking-flag-coverage-over-time

@david-luna david-luna changed the title chore: add new PR workflow chore: improve test workflow and coverage reports Sep 2, 2025
Copy link
Member

@pichlermarc pichlermarc left a comment

Choose a reason for hiding this comment

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

Overall looks good % this comment here #2866 (comment)

@david-luna
Copy link
Contributor Author

Overall looks good % this comment here #2866 (comment)

@pichlermarc thanks for the review. I fixed it and if you give me the green check I'll remove the --dry-run to actually upload the reports with flags. I may need your help to enable the flags in codecov UI.

Copy link
Member

@pichlermarc pichlermarc left a comment

Choose a reason for hiding this comment

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

looks good, thank you for working on this 🙂

Copy link
Member

@pichlermarc pichlermarc left a comment

Choose a reason for hiding this comment

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

Looks good now - thanks for sorting out the problems with the path 🙂
I'll let you do the honors of merging this in 🙂

@david-luna david-luna merged commit 2300dc1 into open-telemetry:main Sep 4, 2025
19 checks passed
@david-luna
Copy link
Contributor Author

david-luna commented Sep 4, 2025

@david-luna david-luna deleted the dluna-ci-pr-speed-and-coverage branch September 4, 2025 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Discuss] Improvements in CI pipeline for PRs