From a0905b71a3e749351acbd7102f8cda87d04089b9 Mon Sep 17 00:00:00 2001 From: Yuedong Wu <57584831+lunarwhite@users.noreply.github.com> Date: Fri, 5 Apr 2024 17:00:06 +0000 Subject: [PATCH] add notes for why not to import the dependency package --- pkg/reconciler/taskrun/taskrun.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkg/reconciler/taskrun/taskrun.go b/pkg/reconciler/taskrun/taskrun.go index f2c5d1a8c6a..4133b5a9165 100644 --- a/pkg/reconciler/taskrun/taskrun.go +++ b/pkg/reconciler/taskrun/taskrun.go @@ -1079,9 +1079,10 @@ func isResourceQuotaConflictError(err error) bool { } const ( - // TODO(#7466) Currently this appears as a local constant due to upstream dependencies bump blocker. - // This shall reference to k8s.io/apiserver/pkg/registry/generic/registry.OptimisticLockErrorMsg - // once #7464 is unblocked. + // optimisticLockErrorMsg is an error message exported from k8s.io/apiserver/pkg/registry/generic/registry.OptimisticLockErrorMsg + // We made a tradeoff here because importing the package would introduce approximately 94klines + // of code as a new dependency, and it would only be used to export one constant in one place. + // In future we might find a better way to maintain consistency for this upstream error message. optimisticLockErrorMsg = "the object has been modified; please apply your changes to the latest version and try again" )