Make ResourceVersion a string internally instead of uint64
Allows us to define different watch versioning regimes in the future as well as to encode information with the resource version. This changes /watch/resources?resourceVersion=3 to start the watch at 4 instead of 3, which means clients can read a resource version and then send it back to the server. Clients should no longer do math on resource versions.
This commit is contained in:
@@ -37,7 +37,7 @@ func TestGetReference(t *testing.T) {
|
||||
obj: &Pod{
|
||||
TypeMeta: TypeMeta{
|
||||
ID: "foo",
|
||||
ResourceVersion: 42,
|
||||
ResourceVersion: "42",
|
||||
SelfLink: "/api/v1beta1/pods/foo",
|
||||
},
|
||||
},
|
||||
@@ -46,14 +46,14 @@ func TestGetReference(t *testing.T) {
|
||||
APIVersion: "v1beta1",
|
||||
Name: "foo",
|
||||
UID: "foo",
|
||||
ResourceVersion: 42,
|
||||
ResourceVersion: "42",
|
||||
},
|
||||
},
|
||||
"serviceList": {
|
||||
obj: &ServiceList{
|
||||
TypeMeta: TypeMeta{
|
||||
ID: "foo",
|
||||
ResourceVersion: 42,
|
||||
ResourceVersion: "42",
|
||||
SelfLink: "/api/v1beta2/services",
|
||||
},
|
||||
},
|
||||
@@ -62,14 +62,14 @@ func TestGetReference(t *testing.T) {
|
||||
APIVersion: "v1beta2",
|
||||
Name: "foo",
|
||||
UID: "foo",
|
||||
ResourceVersion: 42,
|
||||
ResourceVersion: "42",
|
||||
},
|
||||
},
|
||||
"badSelfLink": {
|
||||
obj: &ServiceList{
|
||||
TypeMeta: TypeMeta{
|
||||
ID: "foo",
|
||||
ResourceVersion: 42,
|
||||
ResourceVersion: "42",
|
||||
SelfLink: "v1beta2/services",
|
||||
},
|
||||
},
|
||||
|
Reference in New Issue
Block a user