capact icon indicating copy to clipboard operation
capact copied to clipboard

Implement subscriptions for Engine GraphQL API

Open pkosiec opened this issue 3 years ago • 0 comments

Description

Implement subscriptions on Engine GraphQL API to be able to push real-time data to the API consumer:

  • GraphQL Subscriptions for Action Custom Resource
    • consume Kubernetes (Create/Update/Delete) events for Action CRs and send them through open subscription
      • To consider which subscriptions are needed: All Actions, Actions for a given Namespace, a given Action (even if we need all three of them, we will still share the same logic)
  • Separate subscription to stream Action logs (logs from Argo workflow)
  • To consider: separate subscription to stream Action workflow progress (to not use argo watch CLI command underneath anymore, and go through GraphQL API)

Blocked by https://github.com/nautilus/gateway/issues/108 - while planning and estimating this task, we should take into account the contribution.

Reason

Currently, to see the logs from running/run Actions, we need to use Argo Workflows CLI or kubectl. We should have the capability built-in in Capact CLI.

Also, the subscriptions would be useful for building other interactive CLI commands (--watch flag) or UIs.

Use cases

  • As System User, I want to use Capact CLI as a single tool for all Action-related stuff (e.g. seeing logs of a given Action)
  • As Capact Developer, I want to use Capact GraphQL API to build modern, reactive UIs and interactive CLI commands to present up-to-date data for the System User.

pkosiec avatar Nov 15 '21 12:11 pkosiec