1
0
mirror of https://github.com/rancher/steve.git synced 2025-09-14 06:19:31 +00:00
Files
steve/pkg/sqlcache/store
Eric Promislow 76477e98df Hard-wire external associations: 6 and 7/7: unit tests for updating A=>B links when instances of A and B change (#702)
* Implement hard-wired external associations:

* The table is in sqlproxy.proxy_store
  - externalGVKDependencies - a map of GVKs to dependencies.
    When the key GVK is updated, it triggers the updates in the database for the dependent GVKs,
    replacing fields as specified in the table.

* This is done in an afterUpsert handler, but it's done after the transaction for the core
  GVK update is finished, because most likely the dependent GVK updates will depend on the
  final database values for the GVK being updated, and if we do it as part of the transaction
  the new values won't be committed to the database.

* Wrote unit tests for external associations.

* When an object is modified/created, check for external deps that need updating.

* Stop emitting errors when joining tables if one of the tables doesn't exist.

* Finish rebasing manually.

* Fix external association unit-tests after rebasing.
2025-07-09 13:11:42 -07:00
..