Skip to content

Commit a414a9e

Browse files
committed
Revert adding retries to put!, delete! and update!
1 parent fd4ab76 commit a414a9e

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/simpleapi.jl

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,14 @@ function put!(ctx::KuberContext, v::T) where {T<:SwaggerModel}
9494
put!(ctx, Symbol(vjson["kind"]), vjson)
9595
end
9696

97-
function put!(ctx::KuberContext, O::Symbol, d::Dict{String,Any}; max_tries::Int=1)
97+
function put!(ctx::KuberContext, O::Symbol, d::Dict{String,Any})
9898
ctx.initialized || set_api_versions!(ctx)
9999

100100
apictx = _get_apictx(ctx, O, get(d, "apiVersion", nothing))
101101
if (apicall = _api_function("create$O")) !== nothing
102-
return @retry_on_error apicall(apictx, d)
102+
return apicall(apictx, d)
103103
elseif (apicall = _api_function("createNamespaced$O")) !== nothing
104-
return @retry_on_error apicall(apictx, ctx.namespace, d)
104+
return apicall(apictx, ctx.namespace, d)
105105
else
106106
throw(ArgumentError("No API functions could be located using :$O"))
107107
end
@@ -114,17 +114,17 @@ function delete!(ctx::KuberContext, v::T; kwargs...) where {T<:SwaggerModel}
114114
delete!(ctx, Symbol(kind), name; apiversion=get(vjson, "apiVersion", nothing), kwargs...)
115115
end
116116

117-
function delete!(ctx::KuberContext, O::Symbol, name::String; apiversion::Union{String,Nothing}=nothing, max_tries::Int=1, kwargs...)
117+
function delete!(ctx::KuberContext, O::Symbol, name::String; apiversion::Union{String,Nothing}=nothing, kwargs...)
118118
ctx.initialized || set_api_versions!(ctx)
119119
apictx = _get_apictx(ctx, O, apiversion)
120120

121121
params = [apictx, name]
122122

123123
if (apicall = _api_function("delete$O")) !== nothing
124-
return @retry_on_error apicall(params...; kwargs...)
124+
return apicall(params...; kwargs...)
125125
elseif (apicall = _api_function("deleteNamespaced$O")) !== nothing
126126
push!(params, ctx.namespace)
127-
return @retry_on_error apicall(params...; kwargs...)
127+
return apicall(params...; kwargs...)
128128
else
129129
throw(ArgumentError("No API functions could be located using :$O"))
130130
end
@@ -137,15 +137,15 @@ function update!(ctx::KuberContext, v::T, patch, patch_type) where {T<:SwaggerMo
137137
update!(ctx, Symbol(kind), name, patch, patch_type; apiversion=get(vjson, "apiVersion", nothing))
138138
end
139139

140-
function update!(ctx::KuberContext, O::Symbol, name::String, patch, patch_type; apiversion::Union{String,Nothing}=nothing, max_tries::Int=1)
140+
function update!(ctx::KuberContext, O::Symbol, name::String, patch, patch_type; apiversion::Union{String,Nothing}=nothing)
141141
ctx.initialized || set_api_versions!(ctx)
142142

143143
apictx = _get_apictx(ctx, O, apiversion)
144144

145145
if (apicall = _api_function("patch$O")) !== nothing
146-
return @retry_on_error apicall(apictx, name, patch; _mediaType=patch_type)
146+
return apicall(apictx, name, patch; _mediaType=patch_type)
147147
elseif (apicall = _api_function("patchNamespaced$O")) !== nothing
148-
return @retry_on_error apicall(apictx, name, ctx.namespace, patch; _mediaType=patch_type)
148+
return apicall(apictx, name, ctx.namespace, patch; _mediaType=patch_type)
149149
else
150150
throw(ArgumentError("No API functions could be located using :$O"))
151151
end

0 commit comments

Comments
 (0)