Re: Jenkins parsing error on Nexus 3 Response

2021-01-11 Thread 'Alain Lavoie' via Jenkins Developers
Will contact them. Thanks

On Monday, January 11, 2021 at 8:20:50 AM UTC-5 Oleg Nenashev wrote:

> Hello,
>
> Note that the plugin in concern is "maven_artifact_choicelistprovider", 
> not extended choice on its own.
> The plugin is hosted ere: 
> https://github.com/jenkinsci/maven-artifact-choicelistprovider-plugin
> It has enabled GitHub issues, and I assume this is the best way to raise 
> these concerns.
>
> Best regards,
> Oleg
>
> On Monday, January 11, 2021 at 2:19:07 PM UTC+1 ala...@cloudops.com wrote:
>
>> Hi,
>>
>> We recently updated our nexus repository and we are having issues with 
>> the Extended Choice Parameter.
>> We were using it to fetch npm artifact versions and now it is not working.
>>
>> I checked the logs and it is failing because of a mapping error. It seems 
>> that nexus added some information in their asset to add the npm component.
>>
>> , {
>> "id" : "",
>> "repository" : "npm-public",
>> "format" : "npm",
>> "group" : "cloudops",
>> "name" : "cloudmc-ui",
>> "version" : "21.1.0-SNAPSHOT",
>> "assets" : [ {
>>   "downloadUrl" : "",
>>   "path" : "@cloudops/cloudmc-ui/-/cloudmc-ui-21.1.0-SNAPSHOT.tgz",
>>   "id" : "",
>>   "repository" : "npm-public",
>>   "format" : "npm",
>>   "checksum" : {
>> "sha1" : ""
>>   },
>>   "contentType" : "application/x-tgz",
>>   "lastModified" : "2020-06-09T16:00:56.682+00:00",
>>   "npm" : {
>> "name" : "@cloudops/cloudmc-ui",
>> "version" : "21.1.0-SNAPSHOT"
>>   }
>> } ]
>> ...
>>
>> From the logs we have the following error in jenkins.
>>
>> 2021-01-08 21:01:09.267+ [id=52087] WARNING 
>> o.j.p.m.n.Nexus3RestApiSearchService#callService: failed to map
>> com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: 
>> Unrecognized field "npm" (class 
>> org.jenkinsci.plugins.maven_artifact_choicelistprovider.nexus3.Item), not 
>> marked as ignorable (9 known properties: "checksum", "path", "downloadUrl", 
>> "repository", "id", "lastModified", "contentType", "format", "maven2"])
>>  at [Source: (String)"{
>>   "items" : [ {
>> "downloadUrl" : "...",
>> "path" : "@cloudops/cloudmc-ui/-/cloudmc-ui-11.0.0.tgz",
>> "id" : "",
>> "repository" : "npm-internal",
>> "format" : "npm",
>> "checksum" : {
>>   "sha1" : ""
>> },
>> "contentType" : "application/x-tgz",
>> "lastModified" : "2018-10-18T20:18:39.900"[truncated 29334 chars]; 
>> line: 13, column: 14] (through reference chain: 
>> org.jenkinsci.plugins.maven_artifact_choicelistprovider.nexus3.Nexus3RestResponse["items"]->java.lang.Object[][0]->org.jenkinsci.plugins.maven_artifact_choicelistprovider.nexus3.Item["npm"])
>> at 
>> com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:61)
>> at 
>> com.fasterxml.jackson.databind.DeserializationContext.handleUnknownProperty(DeserializationContext.java:823)
>> at 
>> com.fasterxml.jackson.databind.deser.std.StdDeserializer.handleUnknownProperty(StdDeserializer.java:1153)
>> at 
>> com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownProperty(BeanDeserializerBase.java:1589)
>> at 
>> com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownVanilla(BeanDeserializerBase.java:1567)
>> at 
>> com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:294)
>> at 
>> com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:151)
>> at 
>> com.fasterxml.jackson.databind.deser.std.ObjectArrayDeserializer.deserialize(ObjectArrayDeserializer.java:195)
>> at 
>> com.fasterxml.jackson.databind.deser.std.ObjectArrayDeserializer.deserialize(ObjectArrayDeserializer.java:21)
>> at 
>> com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:129)
>> at 
>> com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:288)
>> at 
>> com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:151)
>> at 
>> com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4013)
>> at 
>> com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3004)
>> at 
>> org.jenkinsci.plugins.maven_artifact_choicelistprovider.nexus3.Nexus3RestApiSearchService.callService(Nexus3RestApiSearchService.java:54)
>> at 
>> org.jenkinsci.plugins.maven_artifact_choicelistprovider.AbstractRESTfulVersionReader.retrieveVersions(AbstractRESTfulVersionReader.java:70)
>> at 
>> org.jenkinsci.plugins.maven_artifact_choicelistprovider.AbstractMavenArtifactChoiceListProvider.readURL(AbstractMavenArtifactChoiceListProvider.java:116)
>> at 
>> org.jenkinsci.plugins.maven_artifact_choicelistprovider.nexus3.Nexus3ChoiceListProvider$Nexus3DescriptorImpl.wrapTestConnection(Nexus3ChoiceListProvider.java:98)
>> at 
>> 

Jenkins parsing error on Nexus 3 Response

2021-01-11 Thread 'Alain Lavoie' via Jenkins Developers
Hi,

We recently updated our nexus repository and we are having issues with the 
Extended Choice Parameter.
We were using it to fetch npm artifact versions and now it is not working.

I checked the logs and it is failing because of a mapping error. It seems 
that nexus added some information in their asset to add the npm component.

, {
"id" : "",
"repository" : "npm-public",
"format" : "npm",
"group" : "cloudops",
"name" : "cloudmc-ui",
"version" : "21.1.0-SNAPSHOT",
"assets" : [ {
  "downloadUrl" : "",
  "path" : "@cloudops/cloudmc-ui/-/cloudmc-ui-21.1.0-SNAPSHOT.tgz",
  "id" : "",
  "repository" : "npm-public",
  "format" : "npm",
  "checksum" : {
"sha1" : ""
  },
  "contentType" : "application/x-tgz",
  "lastModified" : "2020-06-09T16:00:56.682+00:00",
  "npm" : {
"name" : "@cloudops/cloudmc-ui",
"version" : "21.1.0-SNAPSHOT"
  }
} ]
...

>From the logs we have the following error in jenkins.

2021-01-08 21:01:09.267+ [id=52087] WARNING 
o.j.p.m.n.Nexus3RestApiSearchService#callService: failed to map
com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: 
Unrecognized field "npm" (class 
org.jenkinsci.plugins.maven_artifact_choicelistprovider.nexus3.Item), not 
marked as ignorable (9 known properties: "checksum", "path", "downloadUrl", 
"repository", "id", "lastModified", "contentType", "format", "maven2"])
 at [Source: (String)"{
  "items" : [ {
"downloadUrl" : "...",
"path" : "@cloudops/cloudmc-ui/-/cloudmc-ui-11.0.0.tgz",
"id" : "",
"repository" : "npm-internal",
"format" : "npm",
"checksum" : {
  "sha1" : ""
},
"contentType" : "application/x-tgz",
"lastModified" : "2018-10-18T20:18:39.900"[truncated 29334 chars]; 
line: 13, column: 14] (through reference chain: 
org.jenkinsci.plugins.maven_artifact_choicelistprovider.nexus3.Nexus3RestResponse["items"]->java.lang.Object[][0]->org.jenkinsci.plugins.maven_artifact_choicelistprovider.nexus3.Item["npm"])
at 
com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:61)
at 
com.fasterxml.jackson.databind.DeserializationContext.handleUnknownProperty(DeserializationContext.java:823)
at 
com.fasterxml.jackson.databind.deser.std.StdDeserializer.handleUnknownProperty(StdDeserializer.java:1153)
at 
com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownProperty(BeanDeserializerBase.java:1589)
at 
com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownVanilla(BeanDeserializerBase.java:1567)
at 
com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:294)
at 
com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:151)
at 
com.fasterxml.jackson.databind.deser.std.ObjectArrayDeserializer.deserialize(ObjectArrayDeserializer.java:195)
at 
com.fasterxml.jackson.databind.deser.std.ObjectArrayDeserializer.deserialize(ObjectArrayDeserializer.java:21)
at 
com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:129)
at 
com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:288)
at 
com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:151)
at 
com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4013)
at 
com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3004)
at 
org.jenkinsci.plugins.maven_artifact_choicelistprovider.nexus3.Nexus3RestApiSearchService.callService(Nexus3RestApiSearchService.java:54)
at 
org.jenkinsci.plugins.maven_artifact_choicelistprovider.AbstractRESTfulVersionReader.retrieveVersions(AbstractRESTfulVersionReader.java:70)
at 
org.jenkinsci.plugins.maven_artifact_choicelistprovider.AbstractMavenArtifactChoiceListProvider.readURL(AbstractMavenArtifactChoiceListProvider.java:116)
at 
org.jenkinsci.plugins.maven_artifact_choicelistprovider.nexus3.Nexus3ChoiceListProvider$Nexus3DescriptorImpl.wrapTestConnection(Nexus3ChoiceListProvider.java:98)
at 
org.jenkinsci.plugins.maven_artifact_choicelistprovider.AbstractMavenArtifactDescriptorImpl.performTest(AbstractMavenArtifactDescriptorImpl.java:59)
at 
org.jenkinsci.plugins.maven_artifact_choicelistprovider.nexus3.Nexus3ChoiceListProvider$Nexus3DescriptorImpl.doTest(Nexus3ChoiceListProvider.java:92)
at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)
at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:396)
 
Is it possible to come back if this is a bug on your end, new version and 
when it could be fixed. If this is not the right channel, which one should 
I used (https://github.com/jenkins-infra/plugin-site/issues/559)

Thanks,

Regards,

Alain 

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and