kestra-io / kestra

:zap: Workflow Automation Platform. Orchestrate & Schedule code in any language, run anywhere, 500+ plugins. Alternative to Zapier, Rundeck, Camunda, Airflow...
https://kestra.io
Apache License 2.0
11.98k stars 1.01k forks source link

[Epic] System flows functionality #4557

Closed anna-geller closed 1 month ago

anna-geller commented 2 months ago

Changes in the UI

Namespaces Overview

The system namespace should be pinned at the top.

image

https://www.figma.com/design/ew0uXk0NRXJ2NBBJTNe2n1/01_UI?node-id=681-5355&t=CM3hskgx8LI6ehf7-4

Tabs of the System Namespace

When you then navigate into that Namespace, the first tab displayed there should be "System Blueprints" to make them easily accessible. This will display the same Blueprints table but filtered for the System tag.

image

https://www.figma.com/design/ew0uXk0NRXJ2NBBJTNe2n1/01_UI?node-id=2428-31298&t=CM3hskgx8LI6ehf7-4

The main text that can be displayed at the top:

Keep your platform in check with system flows. Automate maintenance tasks, from failure alerts to automated cleanups.

New filter on the Flows and Executions pages + on the main Dashboard

Both the Flows and Executions pages need an additional multi-select field allowing users to select User Flows/Executions, System Flows/Executions, or both.

By default, only the User Flows/Executions should be preselected.

Executions page

Flows page

Main Dashboard

image


Remove the warning

The warning:

"The system namespace is reserved for background workflows intended to perform routine tasks such as sending alerts and purging logs. Please use another namespace name."

can now be deleted.

image


RBAC

System namespaces are open by default. To restrict them, you can restrict their use via system namespace permissions allocated only to Admins and assigning company.* namespaces to everyone else in the company.


Add blueprints

This is less for developers and more for product (@anna-geller and @wrussell1999) — we need to prepare many System Blueprints to be displayed in the System Blueprints tab. Those will be maintenance flows that help accomplish the following use cases:

anna-geller commented 2 months ago

@wrussell1999, I started adding system flows https://kestra.io/blueprints/system. Let's continue together, checklist of what we need:

MilosPaunovic commented 1 month ago

This issue has now been completed, or at least the part above Add blueprints section in the main description.

Pull Requests are merged for both OSS and EE, but it still isn't closed as it would be a good idea for @Ben8t or someone else give it another test with fresh set of eyes.

Ben8t commented 1 month ago

Waiting for Docker images to build, I'll take a look thanks! 👍

Ben8t commented 1 month ago

@anna-geller one wondering in the meantime:

System namespaces are open by default. To restrict them, you can restrict their use via system namespace permissions allocated only to Admins and assigning company.* namespaces to everyone else in the company.

Do secrets stored in system namespaces will be shared with any other "root" namespace? Put it differently, do users need to duplicate secrets with system and <root_namespace>.<some_project>.<...> ?

Example: I've a system flow to send alter via Slack (some SLACK TOKEN secret set up in system namespace) and in my root namespaces (where I have my actual projects) I also need to have that secrets for other Slack related tasks 🤔

anna-geller commented 1 month ago

they will need to be in system namespace

MilosPaunovic commented 1 month ago

CI issues are amended, our kafka preview is deployed, so this is now safe for testing @Ben8t.

anna-geller commented 1 month ago

LGTM, well done! I opened a separate remaining issue https://github.com/kestra-io/kestra/issues/4873

Ben8t commented 1 month ago

@MilosPaunovic are you sure everything deployed ?

Can't see any system namespace in kafka-preview or pulled develop image 🤔 image image

Will wait a bit probably ?

MilosPaunovic commented 1 month ago

That sound like a browser-cache problem, try hard refreshing/changing browsers, as on kafka I see it properly image

Ben8t commented 1 month ago

Found the trick: if no flow in system namespaces, the namespace doesn't show up (logic!)

current discussion for ref