Unified Storage: Don't read before create (#102906)

* Unified Storage: Don't read before create

* test: use the existing test infra

* fix: support pq

We use pgx, but it seems to be wrapped in a pq driver shim, causing the errors to be remapped to pq's type. Weird
situation.

* feat: support CDK backend

* revert: there is a postgres_tests block

* fix(CDK): only check existence on ADDED updates

* fix(CDK): use ReadResource to deal with deleted files
This commit is contained in:
Mariell Hoversholm
2025-03-31 15:06:31 +02:00
committed by GitHub
parent 827d86a985
commit f0a6327edc
7 changed files with 93 additions and 18 deletions
+2 -2
View File
@@ -43,8 +43,8 @@ func AsErrorResult(err error) *ErrorResult {
return nil
}
apistatus, ok := err.(apierrors.APIStatus)
if ok {
var apistatus apierrors.APIStatus
if errors.As(err, &apistatus) {
s := apistatus.Status()
res := &ErrorResult{
Message: s.Message,