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

Using same JSON reports for single and aggregated analysis #145

Open
jimklimov opened this issue Jan 6, 2023 · 0 comments
Open

Using same JSON reports for single and aggregated analysis #145

jimklimov opened this issue Jan 6, 2023 · 0 comments
Labels
enhancement Enhancement of existing functionality

Comments

@jimklimov
Copy link
Contributor

What feature do you want to see added?

Currently the JSON document (or a sum of several documents) used for a report has to include the whole structure, with id, items and colors.

The problem is that when trying to use same generated test-reports in different contexts, a "sum of JSONs" stumbles on protection against duplicate keys, even if they have identical values:

java.lang.IllegalStateException: Duplicate key Tests run (attempted merging values GREEN and GREEN)
	at java.base/java.util.stream.Collectors.duplicateKeyException(Collectors.java:135)
	at java.base/java.util.stream.Collectors.lambda$uniqKeysMapAccumulator$1(Collectors.java:182)
	at java.base/java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169)
	at java.base/java.util.Iterator.forEachRemaining(Iterator.java:133)
	at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1845)
	at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:735)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
	at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682)
	at io.jenkins.plugins.reporter.model.Report.addColors(Report.java:206)
	at io.jenkins.plugins.reporter.model.Report.add(Report.java:118)
	at io.jenkins.plugins.reporter.util.FilesScanner.aggregateReport(FilesScanner.java:74)
	at io.jenkins.plugins.reporter.util.FilesScanner.scanFiles(FilesScanner.java:65)
	at io.jenkins.plugins.reporter.util.FilesScanner.invoke(FilesScanner.java:48)
	at io.jenkins.plugins.reporter.util.FilesScanner.invoke(FilesScanner.java:14)
	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3492)
	at hudson.remoting.UserRequest.perform(UserRequest.java:211)
	at hudson.remoting.UserRequest.perform(UserRequest.java:54)
	at hudson.remoting.Request$2.run(Request.java:377)
	at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:78)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:833)

Upstream changes

No response

@jimklimov jimklimov added the enhancement Enhancement of existing functionality label Jan 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement of existing functionality
Projects
None yet
Development

No branches or pull requests

1 participant