dd-trace-py icon indicating copy to clipboard operation
dd-trace-py copied to clipboard

CI Visibility: source code integration file path incorrect when not running tests from repo root

Open romainkomorndatadog opened this issue 1 year ago • 1 comments

Summary of problem

Note: this issue is tracked internally for Datadog with CIVIS-8556, this issue is for external visibility.

When running tests using the pytest or unittest integration, filenames (that show up under the "source code" section of test events) are relative to the current directory (or for pytest, the rootdir).

They should be relative to the repo root.

Which version of dd-trace-py are you using?

ddtrace>=2.2.0 where feature was introduced.

Which version of pip are you using?

Not relevant.

Which libraries and their versions are you using?

Not relevant.

How can we reproduce your problem?

Run tests from a directory other than the repo root.

What is the result that you get?

File paths relative to the current directory.

What is the result that you expected?

File paths relative to the repo root.

romainkomorndatadog avatar Feb 15 '24 09:02 romainkomorndatadog

#9586 should address this.

romainkomorndatadog avatar Jun 25 '24 16:06 romainkomorndatadog