capactio / capact

Simple way to manage applications and infrastructure.
https://capact.io
Apache License 2.0
79 stars 19 forks source link

Store mutated context when calling `onUpdate` storage backend method #709

Closed pkosiec closed 2 years ago

pkosiec commented 2 years ago

Description

Currently, we don't save mutated context during TypeInstance update even though our ProtoBuf schema describes such behavior. This is one omission from #604.

  1. If storage backend returns a mutated context (OnUpdate gRPC call), we should update it in the DB.

    See: https://github.com/capactio/capact/blob/37750de2c6e5f27ba6a8f7cef78229e58575c51a/hub-js/src/local/resolver/mutation/update-type-instances.ts#L82

  2. Download TypeInstance ID into Argo artifact - use snippet: https://github.com/pkosiec/capact/commit/bdd7a1fd35738dab6c3af2cdc48727a8d1a2c489

Reason

Storage backends may modify context, and we should store it in the DB.