Project

General

Profile

Actions

Bug #8686

closed

NoSuchElementException when querying change request API

Added by Nicolas CHARLES over 8 years ago. Updated over 8 years ago.

Status:
Released
Priority:
1 (highest)
Category:
API
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:

Description

If we create a change request to upgrade a directive based on Download a file from the shared folder, from version 1.6 to 2.1, when querying the changerequest API we get an infamous error message:

[2016-07-13 14:09:10] ERROR net.liftweb.http.LiftRules - Exception being returned to browser when processing /api/latest/changeRequests
java.util.NoSuchElementException: key not found: COPYFILE_PURGE

On the web interface, it works as expected

Actions #1

Updated by Nicolas CHARLES over 8 years ago

  • Assignee set to Nicolas CHARLES

full error is

curl  -k -H "X-API-Token: hnCcYUNl2CS2BfQ2RJWXGLGzc5qh4Ajc" "http://localhost:8080/rudder-web/api/latest/changeRequests" 
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html> <body>Exception occured while processing /api/latest/changeRequests<pre>Message: java.util.NoSuchElementException: key not found: COPYFILE_PURGE
    scala.collection.MapLike$class.default(MapLike.scala:228)
    scala.collection.AbstractMap.default(Map.scala:58)
    scala.collection.MapLike$class.apply(MapLike.scala:141)
    scala.collection.AbstractMap.apply(Map.scala:58)
    com.normation.rudder.domain.policies.SectionVal$$anonfun$2.apply(Directive.scala:161)
    com.normation.rudder.domain.policies.SectionVal$$anonfun$2.apply(Directive.scala:160)
    scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
    scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
    scala.collection.immutable.List.foreach(List.scala:318)
    scala.collection.TraversableLike$class.map(TraversableLike.scala:244)
    scala.collection.AbstractTraversable.map(Traversable.scala:105)
    com.normation.rudder.domain.policies.SectionVal$.com$normation$rudder$domain$policies$SectionVal$$buildMonoSectionWithMultivaluedParent$1(Directive.scala:160)
    com.normation.rudder.domain.policies.SectionVal$$anonfun$12$$anonfun$apply$3.apply(Directive.scala:213)
    com.normation.rudder.domain.policies.SectionVal$$anonfun$12$$anonfun$apply$3.apply(Directive.scala:212)
    scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
    scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
    scala.collection.immutable.List.foreach(List.scala:318)
    scala.collection.TraversableLike$class.map(TraversableLike.scala:244)
    scala.collection.AbstractTraversable.map(Traversable.scala:105)
    com.normation.rudder.domain.policies.SectionVal$$anonfun$12.apply(Directive.scala:212)
    com.normation.rudder.domain.policies.SectionVal$$anonfun$12.apply(Directive.scala:210)
    scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
    scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
    scala.collection.immutable.Range.foreach(Range.scala:141)
    scala.collection.TraversableLike$class.map(TraversableLike.scala:244)
    scala.collection.AbstractTraversable.map(Traversable.scala:105)
    com.normation.rudder.domain.policies.SectionVal$.com$normation$rudder$domain$policies$SectionVal$$buildMultiSectionWithoutMultiParent$1(Directive.scala:210)
</pre>

Actions #2

Updated by Nicolas CHARLES over 8 years ago

  • Status changed from New to In progress
Actions #3

Updated by Nicolas CHARLES over 8 years ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Nicolas CHARLES to François ARMAND
  • Pull Request set to https://github.com/Normation/rudder/pull/1133
Actions #4

Updated by Nicolas CHARLES over 8 years ago

  • Assignee changed from François ARMAND to Vincent MEMBRÉ
Actions #5

Updated by Nicolas CHARLES over 8 years ago

  • Status changed from Pending technical review to Pending release
  • % Done changed from 0 to 100
Actions #6

Updated by Alexis Mousset over 8 years ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 2.11.23, 3.1.12 and 3.2.5 which were released today.

Actions

Also available in: Atom PDF