Skip to content

Commit

Permalink
add notes for why not to import the dependency package
Browse files Browse the repository at this point in the history
  • Loading branch information
lunarwhite authored and tekton-robot committed Apr 6, 2024
1 parent 4370f8a commit a0905b7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pkg/reconciler/taskrun/taskrun.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down

0 comments on commit a0905b7

Please sign in to comment.