Skip to content

[CLI] [Regression] [10.1.0] --dir Directory --file *.xml doesn't find coverage files anymore #786

@nikosatwork

Description

@nikosatwork

Also reported in prevent-cli repository: getsentry/prevent-cli#90

Environment

Broken in Versions: 10.1.0, 10.1.1, 11.1.0
Works in Versions: 9.1.0, 9.1.1, 10.0.1
Regressed in version: 10.1.0

Steps to Reproduce

When the coverage files are located in a folder structure like this:

Directory/opencov/CoverageResults_0000.xml
Directory/opencov/CoverageResults_0001.xml
Directory/opencov/CoverageResults_0002.xml

Executing the uploader like this:

./codecov --enterprise-url https://codecov.self-hosted.com --verbose upload-process --disable-search --disable-file-fixes --plugin none --fail-on-error --git-service github --dir Directory --file *.xml --token xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx --name Tests --flag Tests

Expected Result

To find all files:

-- Found 3 coverage files to report
-- > Directory/opencov/CoverageResults_0000.xml
-- > Directory/opencov/CoverageResults_0001.xml
-- > Directory/opencov/CoverageResults_0002.xml

Actual Result

It doesn't find any coverage files. Returns:

-- Found 0 coverage files to report

Workaround

In version 10.1.0 and above using --dir Directory --file **/*.xml works as expected.
Additionally, using just --file Directory/**/*.xml works too.

However, this still represents a regression that requires us to make changes to our system, so a proper fix is preferable.

Advice on best practice

Please also advice what is the best practice for achieving the above result. Note that using just --dir Directory, without specifying --file *.xml doesn't find any coverage files too.

Metadata

Metadata

Type

No type

Projects

Status

Waiting for: Product Owner

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions