vshn / appcat-service-postgresql

AppCat Service Provider for PostgreSQL
https://vshn.github.io/appcat-service-postgresql/
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

controller.Upsert() function does not really update resources #76

Closed zugao closed 2 years ago

zugao commented 2 years ago

Description

During the update phase implementation the controller.Upsert() function popped out as non functioning when updating resources.

Additional Context

The function works perfectly fine when new objects are being added though it does not work for update. This is due to the fact that the underlying implementation uses CachedReader object which overwrites any updated resources unless a mutating function is passed to CreateOrUpdate(ctx context.Context, c client.Client, obj client.Object, f MutateFn) (OperationResult, error).

Logs

No response

Expected Behavior

Either:

Steps To Reproduce

No response

Versions

master, latest