Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add metrics in Stage and Service Status #440

Merged
merged 2 commits into from
Sep 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/schemas/ServiceStepMetric.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
type: object
properties:
step_name:
$ref: './enums/ServiceStepMetricName.yaml'
status:
$ref: './enums/StepMetricStatus.yaml'
duration_sec:
description: The duration of the step in seconds.
type: integer
11 changes: 11 additions & 0 deletions src/schemas/ServiceStepMetrics.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
type: object
properties:
total_duration_sec:
description: The total duration in seconds of the service deployment or null if the deployment is not completed.
type: integer
nullable: true
details:
description: A list of metrics for deployment steps of the service.
type: array
items:
$ref: './ServiceStepMetric.yaml'
2 changes: 2 additions & 0 deletions src/schemas/Stage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ properties:
name:
type: string
description: stage name
metrics:
$ref: './StageStepMetrics.yaml'
9 changes: 9 additions & 0 deletions src/schemas/StageStepMetric.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
type: object
properties:
step_name:
$ref: './enums/StageStepMetricName.yaml'
status:
$ref: './enums/StepMetricStatus.yaml'
duration_sec:
description: The duration of the step in seconds.
type: integer
11 changes: 11 additions & 0 deletions src/schemas/StageStepMetrics.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
type: object
properties:
total_duration_sec:
description: The total duration in seconds of the stage deployment or null if the deployment is not completed
type: integer
nullable: true
details:
description: A list of metrics for deployment steps of the stage.
type: array
items:
$ref: './StageStepMetric.yaml'
3 changes: 3 additions & 0 deletions src/schemas/Status.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@ properties:
format: date-time
is_part_last_deployment:
type: boolean
metrics:
$ref: './ServiceStepMetrics.yaml'

14 changes: 14 additions & 0 deletions src/schemas/_index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -670,3 +670,17 @@ VariableOverride:
$ref: ./variable/VariableOverride.yaml
ClusterDeploymentStatusEnum:
$ref: ./enums/ClusterDeploymentStatus.yaml
ServiceStepMetric:
$ref: ./ServiceStepMetric.yaml
StageStepMetrics:
$ref: ./StageStepMetrics.yaml
ServiceStepMetrics:
$ref: ./ServiceStepMetrics.yaml
StageStepMetric:
$ref: ./StageStepMetric.yaml
StageStepMetricNameEnum:
$ref: ./enums/StageStepMetricName.yaml
StepMetricStatusEnum:
$ref: ./enums/StepMetricStatus.yaml
ServiceStepMetricNameEnum:
$ref: ./enums/ServiceStepMetricName.yaml
14 changes: 14 additions & 0 deletions src/schemas/enums/ServiceStepMetricName.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
type: string
enum:
- REGISTRY_CREATE_REPOSITORY
- GIT_CLONE
- BUILD
- DEPLOYMENT
- ROUTER_DEPLOYMENT
description: |
The name of the deployment step at the service level:
- REGISTRY_CREATE_REPOSITORY: The step to create the repository in the registry.
- GIT_CLONE: The step to clone the source code repository.
- BUILD: The step to build the source code.
- DEPLOYMENT: The step to deploy the service.
- ROUTER_DEPLOYMENT: The step to deploy the router.
6 changes: 6 additions & 0 deletions src/schemas/enums/StageStepMetricName.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
type: string
enum:
- PROVISION_BUILDER
description: |
The name of the deployment step at the stage level:
- PROVISION_BUILDER: The step to provision builders before the actual build
12 changes: 12 additions & 0 deletions src/schemas/enums/StepMetricStatus.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
type: string
enum:
- SUCCESS
- ERROR
- CANCEL
- SKIP
description: |
The status of completion for the step:
- SUCCESS: The step completed successfully.
- ERROR: The step completed with an error.
- CANCEL: The step was canceled.
- SKIP: The step was skipped because it was not necessary.
Loading