#851  Releasing pull request #48
Closed
Daniel Gollings opened 2 years ago

Hi

Saw you merged pull request #48 and as far as I can tell released it in 7.4.17 But the error persists, and more interestingly, it refers to a line number which should be impossible

Caused by: java.lang.NullPointerException: null
	at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1838)
	at sun.misc.FloatingDecimal.parseDouble(FloatingDecimal.java:110)
	at java.lang.Double.parseDouble(Double.java:538)
	at io.onedev.server.plugin.report.junit.JUnitReportParser.parse(JUnitReportParser.java:23)
	at io.onedev.server.plugin.report.junit.PublishJUnitReportStep.createReport(PublishJUnitReportStep.java:68)

Seeing as line 23 is literally empty, I had the feeling that the plugin had not been updated.

So I built onedev myself (surprisingly easy, my compliments) and still received the same error. So for whatever reason its not building/updating that plugin? I checked out the manual (how to build a built in plugin) but looked good to me as far as I can tell.

Is there a missing step somewhere?

Robin Shen commented 2 years ago

The change is merged into main branch, but not released yet. Will be available in 7.4.18.

Daniel Gollings commented 2 years ago
That's fine, thanks for letting me know. But what step was I missing when I tried to build it myself? Is there something 'special' for plugins? If I were to guess, upload/publish to Artifactory?
Robin Shen commented 2 years ago

Make sure you are building against main branch instead of tag v7.4.17. I just built off main branch and it can parse the JUnit report with multiple testsuites.

Robin Shen commented 2 years ago

Run mvn clean package to build the zip file.

Daniel Gollings commented 2 years ago

Weird, rebuilt it again on a new machine (after install Java 8)

Ran:

mvn clean package
cd server-product/docker
./build.sh
docker images 
docker images  | grep 1dev
docker tag 87b6bc5a9804 1dev/server:7.4.17-custom
docker export 1dev/server:7.4.17-custom -o customonedev

SSHd it, restarted, same error

Ok... find -exec sed 's/7.4.17/7.4.18-custom/g' {} -i \;

same thing, build, scp, deploy

Works :) Guess something was being cached somewhere?

Robin Shen commented 2 years ago

Looks like the plugin jar is using old version from local maven repository. If running maven clean package from root directory, maven should build each module, and then package them using the version just built, even if the version is not changed.

Robin Shen commented 2 years ago

I may find the issue. After running mvn clean package, the generated zip package in directory server-product/target should be update to date. Also the built docker image should be fine. However when you start the docker image with an existing data directory, OneDev will not perform the app upgrade (from /app to /opt/onedev) since version is the same. Only if you change the version, the upgrade will happen.

I filed an improvement request to address this issue:

issue #855 - Record commit in OneDev package and use this info to decide whether or not to upgrade

Daniel Gollings commented 2 years ago
thanks, on the one hand a very niche issue/bug. On the other, using a hash would be much better than a (I'm just assuming) simple string comparison. But good to hear you found a likely culprit
Robin Shen changed state to 'Closed' 2 years ago
Previous Value Current Value
Open
Closed
Robin Shen commented 2 years ago

Yes, will compare using the hash. Closing this now.

issue 1 of 1
Type
Question
Priority
Normal
Assignee
Issue Votes (0)
Watchers (4)
Reference
onedev/server#851
Please wait...
Page is in error, reload to recover