-
Type: Bug
-
Status: Resolved
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 3.13.1
-
Component/s: Production Incident, Technical / Transverse
-
Epic Link:
-
Tags:
-
Sprint:NOS 11.1.14 - 2019-07 3
-
Story Points:2
There were 5,540 errors about "Request Processing Error" in production in the last 2 weeks. The REST API endpoint is:
/nuxeo-studio/{projectId}/maven-metadata.xml
The stacktrace is:
java.lang.IllegalArgumentException: Version name does not conform to requirements at com.nuxeo.studio.core.maven.MavenServlet.getVersionTokens(MavenServlet.java:386) at com.nuxeo.studio.core.maven.MavenServlet.isFirstVersionGreaterThanSecond(MavenServlet.java:369) at com.nuxeo.studio.core.maven.MavenServlet.getArtifactMavenMetadataContent(MavenServlet.java:311) at com.nuxeo.studio.core.maven.MavenServlet.writeArtifactMavenMetadata(MavenServlet.java:278) at com.nuxeo.studio.core.maven.MavenServlet.doGetMavenServlet(MavenServlet.java:161) at com.nuxeo.studio.core.maven.MavenServlet.doGet(MavenServlet.java:100) at javax.servlet.http.HttpServlet.service(HttpServlet.java:624) at com.nuxeo.studio.core.maven.MavenServlet.service(MavenServlet.java:90) at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
Probably because OEM-Content had at least one version which is not using semantic versioning.
Because since April 2019, commit 8971421c changed the metadata implementation, where snapshot versions are also included as available versions. It brings the comparison right after (isFirstVersionGreaterThanSecond) which requires semantic versioning:
@@ -278,8 +281,7 @@ public class MavenServlet extends HttpServlet { // tags String latest = ProjectVersion.ADMIN_CENTER_VERSION; - for (ProjectVersion version : versionService.getReleasedVersions(projectId)) { - String versionName = version.getName(); + for (String versionName : versionService.getAllVersionNames(projectId)) { sb.append("\n\t\t\t<version>" + versionName + "</version>"); if (isFirstVersionGreaterThanSecond(versionName, latest)) { latest = versionName;