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

Many duplicate filename warnings in log output #150

Closed
jontwo opened this issue Mar 31, 2020 · 5 comments
Closed

Many duplicate filename warnings in log output #150

jontwo opened this issue Mar 31, 2020 · 5 comments
Assignees

Comments

@jontwo
Copy link

jontwo commented Mar 31, 2020

We recently updated the Code Coverage API plugin to version 1.1.4 and suddenly our logs were filled with warnings about duplicate files. Log file size has jumped from around 200KB to 1.1MB, so there really are a lot of warnings in there.

Example:

Publishing Coverage report....
A total of 1 reports were found
Source File Navigation is enabled - Current level: STORE_LAST_BUILD
223 source files need to be copied.
WARNING: Duplicate filename found: __init__.py
WARNING: Duplicate filename found: __init__.py
WARNING: Duplicate filename found: __init__.py
WARNING: Duplicate filename found: __init__.py
WARNING: Duplicate filename found: __init__.py
WARNING: Duplicate filename found: __init__.py
WARNING: Duplicate filename found: __init__.py
WARNING: Duplicate filename found: __init__.py
WARNING: Duplicate filename found: __init__.py
WARNING: Duplicate filename found: __init__.py
WARNING: Duplicate filename found: __init__.py
WARNING: Duplicate filename found: README.md
WARNING: Duplicate filename found: index.rst
...

Rolling the plugin back to the previous version (1.0.11) has got rid of the warnings.

System info

Jenkins                2.150.3
java.runtime.version   1.8.0_242-b08
os.arch                amd64
os.name                Linux
os.version             3.10.0-957.27.2.el7.x86_64

The problem might be because we create a venv within the workspace (to allow easy deletion on the next build) and it contains another copy of the installed files.

@medianick
Copy link
Contributor

medianick commented Mar 31, 2020

Yes, we're experiencing the same, after upgrading from 1.1.3 to 1.1.4. In our case the build nodes (and the master) are all running Windows Server, and there's no venv in place.

@medianick
Copy link
Contributor

I've rolled back to 1.1.3. With the number of builds we run that use publishCoverage, these warning messages caused an untenable growth in log sizes.

@tempora-mutantur tempora-mutantur self-assigned this Apr 3, 2020
@medianick
Copy link
Contributor

Now with the High-severity XXE vulnerability in 1.1.4 and older, we've had to upgrade to 1.1.5 so are once again faced with enormous log growth due to these WARNING: Duplicate filename... messages. Could we potentially have a 1.1.3.1 release with just the XXE fix?

This issue with Warnings appears to have been introduced by the fix for #140 in #142. In our case, with .NET projects, it appears to be primarily warning of duplicates as it crawls through bin, obj, and packages (NuGet) folders, presumably given the **/* glob in use.

@medianick
Copy link
Contributor

As an example from a recent 1.1.5 console log:

WARNING: Duplicate filename found: Ploeh.AutoFixture.dll
WARNING: Duplicate filename found: Castle.Core.dll
WARNING: Duplicate filename found: Castle.Core.xml
WARNING: Duplicate filename found: Castle.Core.dll
WARNING: Duplicate filename found: Castle.Core.xml
WARNING: Duplicate filename found: Castle.Core.dll
WARNING: Duplicate filename found: Castle.Core.xml
WARNING: Duplicate filename found: Castle.Core.dll
WARNING: Duplicate filename found: Castle.Core.xml
WARNING: Duplicate filename found: Castle.Core.dll
WARNING: Duplicate filename found: Castle.Core.xml
WARNING: Duplicate filename found: KellermanSoftware.Compare-NET-Objects.dll
WARNING: Duplicate filename found: KellermanSoftware.Compare-NET-Objects.xml
WARNING: Duplicate filename found: KellermanSoftware.Compare-NET-Objects.dll
WARNING: Duplicate filename found: KellermanSoftware.Compare-NET-Objects.xml
WARNING: Duplicate filename found: KellermanSoftware.Compare-NET-Objects.dll
WARNING: Duplicate filename found: KellermanSoftware.Compare-NET-Objects.xml
WARNING: Duplicate filename found: KellermanSoftware.Compare-NET-Objects.dll
WARNING: Duplicate filename found: KellermanSoftware.Compare-NET-Objects.xml

I can see that they are indeed duplicate names -- likely due to coming from different bin or obj folders in the solution -- so would prefer either the removal of these WARNING messages (log spam), if it's not actually having an adverse effect, or the addition of file paths in order to disambiguate these (so that they are no longer duplicates).

In the case above, this is occurring during a Publish Coverage Report step using Cobertura coverage reports. Ideally, I would have expected this would only attempt to copy source files that are named within the coverage report in question (e.g., in the filename attributes of a Cobertura report), rather than -- as it appears it's doing -- simply crawling through every file in the workspace and trying to copy it.

@medianick medianick mentioned this issue Apr 20, 2020
tempora-mutantur added a commit to tempora-mutantur/code-coverage-api-plugin that referenced this issue Apr 20, 2020
The Jacoco fix in 4081720 brought new code that tries to find the
source file in case other ways didn't work. To do this it creates a
map of file names to look for. And it logs warnings in case of any
duplicates. Becase there may be a lot of them a log would quite apace,
we remove the warnings.
tempora-mutantur added a commit that referenced this issue Apr 20, 2020
Fix #150. Remove wars about source files with the same names
@tempora-mutantur
Copy link
Collaborator

Will be resolved in 1.1.6, likely in a couple of days will be released.
Take care

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants