[JIRA] (JENKINS-52669) IndexOutOfBoundsException after upgrade to 1.2.3
Title: Message Title Justin M commented on JENKINS-52669 Re: IndexOutOfBoundsException after upgrade to 1.2.3 Just installed and tested with version 1.2.6 and can confirm that it's working to resolve my artifact. Thanks, Jae. Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.192545.1532070393000.22631.1559824500297%40Atlassian.JIRA. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-52669) IndexOutOfBoundsException after upgrade to 1.2.3
Title: Message Title Jae Gangemi started work on JENKINS-52669 Change By: Jae Gangemi Status: Open In Progress Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.192545.1532070393000.21918.1559742481431%40Atlassian.JIRA. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-52669) IndexOutOfBoundsException after upgrade to 1.2.3
Title: Message Title Jae Gangemi resolved as Fixed Jenkins / JENKINS-52669 IndexOutOfBoundsException after upgrade to 1.2.3 Change By: Jae Gangemi Status: In Progress Resolved Resolution: Fixed Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.192545.1532070393000.21930.1559742481629%40Atlassian.JIRA. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-52669) IndexOutOfBoundsException after upgrade to 1.2.3
Title: Message Title Jae Gangemi commented on JENKINS-52669 Re: IndexOutOfBoundsException after upgrade to 1.2.3 fixed in 1.2.6 Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.192545.1532070393000.21910.1559742481198%40Atlassian.JIRA. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-52669) IndexOutOfBoundsException after upgrade to 1.2.3
Title: Message Title Jae Gangemi assigned an issue to Jae Gangemi Jenkins / JENKINS-52669 IndexOutOfBoundsException after upgrade to 1.2.3 Change By: Jae Gangemi Assignee: Jae Gangemi Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.192545.1532070393000.21932.1559742481655%40Atlassian.JIRA. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-52669) IndexOutOfBoundsException after upgrade to 1.2.3
Title: Message Title Vlastimil Dolejš commented on JENKINS-52669 Re: IndexOutOfBoundsException after upgrade to 1.2.3 I can confirm that the problem is related to the version range. In my case, I don't have direct dependency with version range but there is some transitive dependency in my dependency tree that has version declared as a range. I have cloned the plugin source and written unit test for my artifact so I know the details. The problematic dependency in my case is org.webjars.npm:js-tokens:jar:[1.0.1,2) This dependency can be resolved and there are these versions in repository: [1.0.0, 1.0.1, 2.0.0, 3.0.0, 3.0.1, 3.0.2, 4.0.0]. The problematic part of code is in ReleasedVersionRangeResolver#resolveVersionRange on lines 134 and 135. The 3.0.2 and 4.0.0 is picked as the versionsAndUpToDates.latestCandidates and versionsAndUpToDates.releaseCandidates which is then passed to getLatest() but none of these versions satisfy version range constraint which is [1.0.1,2). So I think there are 2 problems. 1/ The getLatest() method should return null instead of throwing exception if it won't match any version with the version range. 2/ I think we should pass versionsAndUpToDates.versions instead of versionsAndUpToDates.latestCandidates and releaseCandidates to the getLatest() method on lines 134 and 135. I have created pull request for the first problem: https://github.com/jenkinsci/repository-connector-plugin/pull/37 This will completely resolve the problem because resolving transitive dependencies is not necessary. Add Comment
[JIRA] (JENKINS-52669) IndexOutOfBoundsException after upgrade to 1.2.3
Title: Message Title Sébastien Gautrin edited a comment on JENKINS-52669 Re: IndexOutOfBoundsException after upgrade to 1.2.3 I encountered the same issue recently with one artifact. I got multiple artifacts from a multi-module maven project that are released to nexus by another job, then several similar scripted pipeline jobs for deploying different artifacts, with all of them using an Artifact parameter with the same artifact configured.With one of them, I encounter this error (whether using the job parameter or a hardcoded version, the configured version in the step being overriden by the job parameter anyway according to the log “Overriding configured version ... with version ... from build parameter”).The {{IndexOutOfBoundException}} itself comes from a mistake in the code in [ReleasedVersionRangeResolver|https://github.com/jenkinsci/repository-connector-plugin/blob/master/src/main/java/org/jvnet/hudson/plugins/repositoryconnector/aether/ReleasedVersionRangeResolver.java] : before accessing the first entry in {{vs}} collection, there is a check on {{versions}} collection instead of the filtered {{vs}} collection; with a test on the filtered collection, the method would return {{null}} instead of raising an exception, though this would possibly raise an exception down the line anyway. In my case and the OP's though, we should not even enter this method, as we specify a single version and not a version range: I've yet to identify why in this case I end up there, while I do not with other artifacts.Edit: I might have found the cause: in the final pom of my artifact, I do have a dependency defined as a range, and the corresponding artifact is not present on the same repository (the artifact I want is on a private repository, the ranged dependency is on central); I cannot confirm yet this is the cause, but it seems likely considering the error occurs within {{Aether.resolve}} and the dependencies collection.[~vlastimil_dolejs] (and [~justinm89]) do you also happen to have a dependency with a version range on the artifact you encounter the error with? (check the {{pom.xml}} of the artifact version on your repository)However, considering this plugin, we should probably ignore dependencies or the requested artifact, should we not? Add Comment
[JIRA] (JENKINS-52669) IndexOutOfBoundsException after upgrade to 1.2.3
Title: Message Title Sébastien Gautrin edited a comment on JENKINS-52669 Re: IndexOutOfBoundsException after upgrade to 1.2.3 I encountered the same issue recently with one artifact. I got multiple artifacts from a multi-module maven project that are released to nexus by another job, then several similar scripted pipeline jobs for deploying different artifacts, with all of them using an Artifact parameter with the same artifact configured.With one of them, I encounter this error (whether using the job parameter or a hardcoded version, the configured version in the step being overriden by the job parameter anyway according to the log “Overriding configured version ... with version ... from build parameter”).The {{IndexOutOfBoundException}} itself comes from a mistake in the code in [ReleasedVersionRangeResolver|https://github.com/jenkinsci/repository-connector-plugin/blob/master/src/main/java/org/jvnet/hudson/plugins/repositoryconnector/aether/ReleasedVersionRangeResolver.java] : before accessing the first entry in {{vs}} collection, there is a check on {{versions}} collection instead of the filtered {{vs}} collection; with a test on the filtered collection, the method would return {{null}} instead of raising an exception, though this would possibly raise an exception down the line anyway. In my case and the OP's though, we should not even enter this method though , as we specify a single version and not a version range: I've yet to identify why in this case I end up there, while I do not with other artifacts. Edit: I might have found the cause: in the final pom of my artifact, I do have a dependency defined as a range, and the corresponding artifact is not present on the same repository (the artifact I want is on a private repository, the ranged dependency is on central); I cannot confirm yet this is the cause, but it seems likely considering the error occurs within {{Aether.resolve}} and the dependencies collection.[~vlastimil_dolejs] do you also happen to have a dependency with a version range on the artifact you encounter the error with? (check the {{pom.xml}} of the artifact version on your repository)However, considering this plugin, we should probably ignore dependencies or the requested artifact, should we not? Add Comment
[JIRA] (JENKINS-52669) IndexOutOfBoundsException after upgrade to 1.2.3
Title: Message Title Sébastien Gautrin commented on JENKINS-52669 Re: IndexOutOfBoundsException after upgrade to 1.2.3 I encountered the same issue recently with one artifact. I got multiple artifacts from a multi-module maven project that are released to nexus by another job, then several similar scripted pipeline jobs for deploying different artifacts, with all of them using an Artifact parameter with the same artifact configured. With one of them, I encounter this error (whether using the job parameter or a hardcoded version, the configured version in the step being overriden by the job parameter anyway according to the log “Overriding configured version ... with version ... from build parameter”). The IndexOutOfBoundException itself comes from a mistake in the code in ReleasedVersionRangeResolver : before accessing the first entry in vs collection, there is a check on versions collection instead of the filtered vs collection; with a test on the filtered collection, the method would return null instead of raising an exception, though this would possibly raise an exception down the line anyway. In my case and the OP's though, we should not even enter this method though, as we specify a single version and not a version range: I've yet to identify why in this case I end up there, while I do not with other artifacts. Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-52669) IndexOutOfBoundsException after upgrade to 1.2.3
Title: Message Title Justin M commented on JENKINS-52669 Re: IndexOutOfBoundsException after upgrade to 1.2.3 Yes to both questions – I have found a workaround in that for this specific artifact I can simply use Powershell or wget to pull it down. Not ideal, but it will get the job done. Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-52669) IndexOutOfBoundsException after upgrade to 1.2.3
Title: Message Title Dennis Lundberg commented on JENKINS-52669 Re: IndexOutOfBoundsException after upgrade to 1.2.3 Justin M Does the problematic artifact have a released version in your repository? Do the successful artifacts have any released versions in your repository? Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-52669) IndexOutOfBoundsException after upgrade to 1.2.3
Title: Message Title Justin M edited a comment on JENKINS-52669 Re: IndexOutOfBoundsException after upgrade to 1.2.3 I am running into this in a scripted pipeline trying to resolve just one of my artifacts – I have 4 WAR files I am trying to download and deploy, all in the same Nexus repository and same group ID and version. 3 of them can be resolved just fine, but for whatever reason, the 4th one gets this same error, and it's really frustrating that it works for all but one of the applications. I am encountering this on both 1.2.3 and 1.2.4. I tried rolling all the way back to version 1.1.3, but that version does not offer pipeline support, which I need for what I'm trying to accomplish. I am calling the step like so: {code:java} artifactResolver artifacts: [artifact(artifactId: "single-sign-on", extension: "war", groupId: "com.foo.bar", targetFileName: "sso.war", version: "15.0.0-SNAPSHOT")], releaseUpdatePolicy: 'always', snapshotUpdatePolicy: 'always', targetDirectory: '.' {code} And receiving the following stacktrace: {code:java} failed to expand tokens for [Artifact com.foo.bar:single-sign-on:war::15.0.0-SNAPSHOT]java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.rangeCheck(Unknown Source) at java.util.ArrayList.get(Unknown Source) at org.jvnet.hudson.plugins.repositoryconnector.aether.ReleasedVersionRangeResolver.getLatest(ReleasedVersionRangeResolver.java:181) at org.jvnet.hudson.plugins.repositoryconnector.aether.ReleasedVersionRangeResolver.resolveVersionRange(ReleasedVersionRangeResolver.java:134) at org.sonatype.aether.impl.internal.DefaultDependencyCollector.process(DefaultDependencyCollector.java:370) at org.sonatype.aether.impl.internal.DefaultDependencyCollector.process(DefaultDependencyCollector.java:544) at org.sonatype.aether.impl.internal.DefaultDependencyCollector.process(DefaultDependencyCollector.java:544) at org.sonatype.aether.impl.internal.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:240) at org.sonatype.aether.impl.internal.DefaultRepositorySystem.collectDependencies(DefaultRepositorySystem.java:308) at org.jvnet.hudson.plugins.repositoryconnector.aether.Aether.resolve(Aether.java:221) at org.jvnet.hudson.plugins.repositoryconnector.ArtifactResolver.download(ArtifactResolver.java:217) at org.jvnet.hudson.plugins.repositoryconnector.ArtifactResolver.perform(ArtifactResolver.java:154) at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:80) at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:67) at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1$1.call(SynchronousNonBlockingStepExecution.java:51) at hudson.security.ACL.impersonate(ACL.java:290) at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1.run(SynchronousNonBlockingStepExecution.java:48) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) {code}
[JIRA] (JENKINS-52669) IndexOutOfBoundsException after upgrade to 1.2.3
Title: Message Title Justin M commented on JENKINS-52669 Re: IndexOutOfBoundsException after upgrade to 1.2.3 I am running into this in a scripted pipeline trying to resolve just one of my artifacts – I have 4 WAR files I am trying to download and deploy, all in the same Nexus repository and same group ID and version. 3 of them can be resolved just fine, but for whatever reason, the 4th one gets this same error, and it's really frustrating that it works for all but one of the applications. I am encountering this on both 1.2.3 and 1.2.4. I tried rolling all the way back to version 1.1.3, but that version does not offer pipeline support, which I need for what I'm trying to accomplish. I am calling the step like so: artifactResolver artifacts: [artifact(artifactId: "single-sign-on", extension: "war", groupId: "com.foo.bar", targetFileName: "sso.war", version: "15.0.0-SNAPSHOT")], releaseUpdatePolicy: 'always', snapshotUpdatePolicy: 'always', targetDirectory: '.' And receiving the following stacktrace: failed to expand tokens for [Artifact com.foo.bar:single-sign-on:war::15.0.0-SNAPSHOT] java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.rangeCheck(Unknown Source) at java.util.ArrayList.get(Unknown Source) at org.jvnet.hudson.plugins.repositoryconnector.aether.ReleasedVersionRangeResolver.getLatest(ReleasedVersionRangeResolver.java:181) at org.jvnet.hudson.plugins.repositoryconnector.aether.ReleasedVersionRangeResolver.resolveVersionRange(ReleasedVersionRangeResolver.java:134) at org.sonatype.aether.impl.internal.DefaultDependencyCollector.process(DefaultDependencyCollector.java:370) at org.sonatype.aether.impl.internal.DefaultDependencyCollector.process(DefaultDependencyCollector.java:544) at org.sonatype.aether.impl.internal.DefaultDependencyCollector.process(DefaultDependencyCollector.java:544) at org.sonatype.aether.impl.internal.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:240) at org.sonatype.aether.impl.internal.DefaultRepositorySystem.collectDependencies(DefaultRepositorySystem.java:308) at org.jvnet.hudson.plugins.repositoryconnector.aether.Aether.resolve(Aether.java:221) at org.jvnet.hudson.plugins.repositoryconnector.ArtifactResolver.download(ArtifactResolver.java:217) at org.jvnet.hudson.plugins.repositoryconnector.ArtifactResolver.perform(ArtifactResolver.java:154) at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:80) at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:67) at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1$1.call(SynchronousNonBlockingStepExecution.java:51) at hudson.security.ACL.impersonate(ACL.java:290) at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1.run(SynchronousNonBlockingStepExecution.java:48) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)
[JIRA] (JENKINS-52669) IndexOutOfBoundsException after upgrade to 1.2.3
Title: Message Title Nirmal Kumar commented on JENKINS-52669 Re: IndexOutOfBoundsException after upgrade to 1.2.3 Do we have any recent update on this issue? Looks the 1.2 version has some issues with resolving the artifacts. Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.