Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

Update the Piepline/Stage/Task design notes

天舟1f4f54336cf7
diff --git a/frontend/src/types/pipeline/README.md b/frontend/src/types/pipeline/README.md
index 86fae75db1..f2c1c8d310 100644
--- a/frontend/src/types/pipeline/README.md
+++ b/frontend/src/types/pipeline/README.md
@@ -1,46 +1,56 @@
+# Overview
+
Pipeline, Stage, Task are the backbones of execution.
A PIPELINE consists of multiple STAGES. A STAGE consists of multiple TASKS.
-Comparison with Tekton
-PIPELINE = Tekton Pipeline
-STAGE = N/A
-TASK = Tekton Task
-N/A = Tekton Step
-
-Comparison with GitLab:
-PIPELINE = GitLab Pipeline
-STAGE = GitLab Stage
-TASK = GitLab Job
-N/A = GitLab Script Step
-
-Comparison with GitHub:
-PIPELINE = GitHub Workflow
-STAGE = N/A
-TASK = GitHub Job
-N/A = GitHub Step
-
-Comparison with Octopus:
-PIPELINE = Octopus Lifecycle
-STAGE = Octopus Phase + Task
-TASK = Octopus Step
-
-Comparsion with Jenkins:
-PIPELINE = Jenkins Pipeline
-STAGE = Jenkins Stage
-TASK = Jenkins Step (but it's also called task from its doc)
-
-Comparsion with Spinnaker:
-PIPELINE = Spinnaker Pipeline
-STAGE = Spinnaker Stage
-TASK = Spinnaker Task
-
-Design consideration
+# Comparision to other systems
+
+## Comparison with Tekton
+
+- PIPELINE = Tekton Pipeline
+- STAGE = N/A
+- TASK = Tekton Task
+- N/A = Tekton Step
+
+## Comparison with GitLab:
+
+- PIPELINE = GitLab Pipeline
+- STAGE = GitLab Stage
+- TASK = GitLab Job
+- N/A = GitLab Script Step
+
+## Comparison with GitHub:
+
+- PIPELINE = GitHub Workflow
+- STAGE = N/A
+- TASK = GitHub Job
+- N/A = GitHub Step
+
+## Comparison with Octopus:
+
+- PIPELINE = Octopus Lifecycle
+- STAGE = Octopus Phase + Task
+- TASK = Octopus Step
+
+## Comparsion with Jenkins:
+
+- PIPELINE = Jenkins Pipeline
+- STAGE = Jenkins Stage
+- TASK = Jenkins Step (but it's also called task from its doc)
+
+## Comparsion with Spinnaker:
+
+- PIPELINE = Spinnaker Pipeline
+- STAGE = Spinnaker Stage
+- TASK = Spinnaker Task
+
+# General design consideration
- Other mainstream products either have 3 or 4 layers.
We choose 3 layers omitting the most granular layer - Step. For now only GitLab has 4 layer systems
and its step is mostly used to model a lightweight step like shell script step. This seems like
- an overkill for our case. BTW, Octopus employes 3 layer design which seems to be sufficient.
+ an overkill for our case. On the other hand, 3 layer design such as Octopus seems to be sufficient.
- All products agree on the smallest querable execution unit (having a dedicated API resource endpoint):
Tekton Task/GitLab Job/GitHub Job/Octopus Step.
@@ -61,8 +71,10 @@ Design consideration
respective fields. Client code could combine Pipeline status and its running step status (substatus)
to achieve more granular behavior.
-So we finally arrive the same conclusion as spinnaker
+To wrap up, we finally arrive the same conclusion as spinnaker.
+
+# Domain specific design consideration
+
+- We require a stage to associate with an environment. In the future, we will introduce environment tiers which define rules like whether requires manual approval.
-We require a stage to associate with a database. Since database belongs to an instance, which
-in turns belongs to an environment, thus the stage is also associated with an instance and environment.
-The environment has tiers which defines rules like whether requires manual approval.
+- We require a task to associate with an database instance. This limits the task usage to database operations instead of general purpose task management. Since Bytebase is dealing with database domain, this tradeoff is fine. On the other hand, a task may or may not contain a database since tasks like creating new database, syncing the entire instance schema are not database specific.