Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
d477fe6b
Commit
d477fe6b
authored
Jun 10, 2015
by
Abhi Shah
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #9569 from jhadvig/unclear_error
Make error msg for updating resource version more clear
parents
a1840218
90dcd347
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
etcd.go
pkg/registry/generic/etcd/etcd.go
+1
-1
No files found.
pkg/registry/generic/etcd/etcd.go
View file @
d477fe6b
...
@@ -301,7 +301,7 @@ func (e *Etcd) Update(ctx api.Context, obj runtime.Object) (runtime.Object, bool
...
@@ -301,7 +301,7 @@ func (e *Etcd) Update(ctx api.Context, obj runtime.Object) (runtime.Object, bool
}
}
if
newVersion
!=
version
{
if
newVersion
!=
version
{
// TODO: return the most recent version to a client?
// TODO: return the most recent version to a client?
return
nil
,
nil
,
kubeerr
.
NewConflict
(
e
.
EndpointName
,
name
,
fmt
.
Errorf
(
"
the resource was updated to
%d"
,
version
))
return
nil
,
nil
,
kubeerr
.
NewConflict
(
e
.
EndpointName
,
name
,
fmt
.
Errorf
(
"
another client made an update to this object in resource version
%d"
,
version
))
}
}
if
err
:=
rest
.
BeforeUpdate
(
e
.
UpdateStrategy
,
ctx
,
obj
,
existing
);
err
!=
nil
{
if
err
:=
rest
.
BeforeUpdate
(
e
.
UpdateStrategy
,
ctx
,
obj
,
existing
);
err
!=
nil
{
return
nil
,
nil
,
err
return
nil
,
nil
,
err
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment