capactio / capact

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

Make Local Hub aware of Public Hub and validate TypeInstances #633

Open mszostok opened 2 years ago

mszostok commented 2 years ago

Description

Validation for TypeInstances was implemented in Argo actions and CLI (https://github.com/capactio/capact/pull/629/files). This doesn't solve the problem when someone will submit it via GraphQL (e.g. via UI). We should move validation logic directly to Local Hub. As a result, we will have a single entry point where this will be validated no matter who/what sent the TypeInstance.

To make this work, we need to add information to Local Hub with which Public Hub it should work. As a result, we can also validate whether created TypeInstance refers to existing TypeRef.

Reason

Validate TypeInstance no matter who sends it.