-
Notifications
You must be signed in to change notification settings - Fork 317
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
[ci-visibility] Fix test source file to be relative to the repository root #4030
Conversation
Overall package sizeSelf size: 6.02 MB Dependency sizes
🤖 This report was automatically generated by heaviest-objects-in-the-universe |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #4030 +/- ##
==========================================
+ Coverage 85.32% 85.43% +0.10%
==========================================
Files 243 243
Lines 10554 10558 +4
Branches 33 33
==========================================
+ Hits 9005 9020 +15
+ Misses 1549 1538 -11 ☔ View full report in Codecov by Sentry. |
BenchmarksBenchmark execution time: 2024-02-09 15:49:05 Comparing candidate commit 561607c in PR branch Found 1 performance improvements and 0 performance regressions! Performance is the same for 260 metrics, 5 unstable metrics. scenario:plugin-graphql-with-depth-off-18
|
83850bc
to
ec79359
Compare
e670b54
to
c73cdef
Compare
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'm tempted to say you should just make getTestSuitePath
find the repository root on its own so that you don't repeat the same if/else
statement each time, but maybe that's not practical so I'll still approve.
that might be hard, given that the repository root has two possible origins:
while I could make the function "git aware", making it CI tags aware would be awkward. I need to find a better solution for tags calculation, as it's increasing in complexity non stop 😅 |
What does this PR do?
Change the root file we use for calculating the relative path of source files: instead of using
process.cwd
we attempt to use the repository root. If we can't find it, we'll still fall back toprocess.cwd
.Motivation
test.source.file
should always be relative to the repository root. Otherwise our UI will not be able to show source code.Plugin Checklist
Security
Datadog employees:
@DataDog/security-design-and-guidance
.Unsure? Have a question? Request a review!