Adrian Cole created JCLOUDS-78:
----------------------------------
Summary: Pagination broken in rackspace-clouddns
Key: JCLOUDS-78
URL: https://issues.apache.org/jira/browse/JCLOUDS-78
Project: jclouds
Issue Type: Bug
Components: jclouds-core
Affects Versions: 1.6.0
Reporter: Adrian Cole
Assignee: Everett Toews
Fix For: 1.6.1
At line
https://github.com/jclouds/jclouds/blob/master/apis/rackspace-clouddns/src/main/java/org/jclouds/rackspace/clouddns/v1/functions/RecordsToPagedIterable.java
there's a call for optional.get() when doing pagination.
There's no test case to test whether or not pagination works at all.
https://github.com/jclouds/jclouds/blob/master/apis/rackspace-clouddns/src/test/java/org/jclouds/rackspace/clouddns/v1/features/RecordApiExpectTest.java
A user of denominator found a bug in this code, and took time to note the stack
trace and json.
https://github.com/Netflix/denominator/issues/145
Please backfill a test case and see about fixing this.
Thread [main] (Suspended (breakpoint at line 42 in Absent))
Absent.get() line: 42
RecordsToPagedIterable.markerToNextForArg0(Optional<Object>) line: 52
RecordsToPagedIterable(Arg0ToPagedIterable<T,I>).apply(IterableWithMarker<T>)
line: 73
RecordsToPagedIterable(Arg0ToPagedIterable<T,I>).apply(Object) line: 61
Functions$FunctionComposition<A,B,C>.apply(A) line: 210
InvokeHttpMethod.invoke(Invocation) line: 97
InvokeHttpMethod.apply(Invocation) line: 80
InvokeHttpMethod.apply(Object) line: 51
FunctionalReflection$FunctionalInvocationHandler<T>.handleInvocation(Object,
Method, Object[]) line: 119
FunctionalReflection$FunctionalInvocationHandler<T>(AbstractInvocationHandler).invoke(Object,
Method, Object[]) line: 70
$Proxy72.list() line: not available
CloudDNSResourceRecordSetApi.list() line: 33
ResourceRecordSetCommands$ResourceRecordSetList.doRun(DNSApiManager) line:
58
ResourceRecordSetCommands$ResourceRecordSetList(Denominator$DenominatorCommand).run()
line: 132
Denominator.main(String[]) line: 74
2013-05-21 12:20:10,939 DEBUG [jclouds.headers] [main] >> GET
https://dns.api.rackspacecloud.com/v1.0/XXXXXX/domains/YYYYYY/records HTTP/1.1
2013-05-21 12:20:10,940 DEBUG [jclouds.headers] [main] >> Accept:
application/json
2013-05-21 12:20:10,940 DEBUG [jclouds.headers] [main] >> X-Auth-Token:
XXXXXXXXXXXXXXXXXXXXXXXX
2013-05-21 12:20:12,842 DEBUG [jclouds.headers] [main] << HTTP/1.1 200 OK
2013-05-21 12:20:12,843 DEBUG [jclouds.headers] [main] << Date: Tue, 21 May
2013 10:20:12 GMT
2013-05-21 12:20:12,843 DEBUG [jclouds.headers] [main] << x-api-version: 1.0.24
2013-05-21 12:20:12,843 DEBUG [jclouds.headers] [main] << Via: 1.1 Repose
(Repose/2.6.11)
2013-05-21 12:20:12,843 DEBUG [jclouds.headers] [main] << Server:
Jetty(8.0.y.z-SNAPSHOT)
2013-05-21 12:20:12,843 DEBUG [jclouds.headers] [main] << Content-Type:
application/json
2013-05-21 12:20:12,843 DEBUG [jclouds.headers] [main] << Content-Length: 17540
2013-05-21 12:20:13,122 DEBUG [jclouds.wire] [main] << "{
"records":[
{
"name":"ZZZZZ.mydomain.com",
"id":"A-1234567",
"type":"A",
"data":"777.232.208.999",
"ttl":300,
"updated":"2010-10-20T18:03:18.000+0000",
"created":"2010-10-20T18:03:18.000+0000"
},
{
"name":"ZZZZZ.mydomain.com",
"id":"A-1234567",
"type":"A",
"data":"777.143.131.999",
"ttl":300,
"updated":"2010-11-12T02:48:38.000+0000",
"created":"2010-11-12T02:48:38.000+0000"
},
{
"name":"ZZZZZ.mydomain.com",
"id":"A-1234567",
"type":"A",
"data":"777.23.243.999",
"ttl":300,
"updated":"2010-11-25T13:21:10.000+0000",
"created":"2010-11-25T13:21:10.000+0000"
},
{
"name":"ZZZZZ.mydomain.com",
"id":"A-1234567",
"type":"A",
"data":"777.121.66.999",
"ttl":300,
"updated":"2010-12-18T14:09:14.000+0000",
"created":"2010-12-18T14:09:14.000+0000"
},
{
"name":"ZZZZZ.mydomain.com",
"id":"A-1234567",
"type":"A",
"data":"777.23.243.999",
"ttl":300,
"updated":"2010-12-18T14:09:44.000+0000",
"created":"2010-12-18T14:09:44.000+0000"
},
{
"name":"ZZZZZ.mydomain.com",
"id":"A-1234567",
"type":"A",
"data":"777.143.151.999",
"ttl":300,
"updated":"2011-01-07T13:00:40.000+0000",
"created":"2011-01-07T13:00:40.000+0000"
},
{
"name":"ZZZZZ.mydomain.com",
"id":"A-1234567",
"type":"A",
"data":"777.143.151.999",
"ttl":300,
"updated":"2011-01-13T18:18:26.000+0000",
"created":"2011-01-13T18:18:26.000+0000"
},
{
"name":"ZZZZZ.mydomain.com",
"id":"A-1234567",
"type":"A",
"data":"777.213.78.999",
"ttl":300,
"updated":"2013-04-10T02:19:04.000+0000",
"created":"2013-04-10T02:19:04.000+0000"
}
],
"totalEntries":271,
"links":[
{
"href":"https://dns.api.rackspacecloud.com/v1.0/XXXXXX/domains/YYYYYY/records?limit=100&offset=100",
"rel":"next"
}
]
}"
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira