From 50a1c0c1e1bd537e044ea6b28cdbda7c23ae072d Mon Sep 17 00:00:00 2001 From: Caduri Katzav Date: Wed, 20 Sep 2023 15:07:39 +0300 Subject: [PATCH 1/4] [src] OceanCD - Verification Template - Add baseline fields --- .../oceanCDVerificationTemplateMetric.yaml | 3 +++ ...nCDVerificationTemplateMetricBaseline.yaml | 22 +++++++++++++++++++ ...icationTemplateMetricBaselineProvider.yaml | 13 +++++++++++ 3 files changed, 38 insertions(+) create mode 100644 api/services/ocean/cd/schemas/verificationTemplate/oceanCDVerificationTemplateMetricBaseline.yaml create mode 100644 api/services/ocean/cd/schemas/verificationTemplate/oceanCDVerificationTemplateMetricBaselineProvider.yaml diff --git a/api/services/ocean/cd/schemas/verificationTemplate/oceanCDVerificationTemplateMetric.yaml b/api/services/ocean/cd/schemas/verificationTemplate/oceanCDVerificationTemplateMetric.yaml index 70a7b9b30..dcab20c82 100644 --- a/api/services/ocean/cd/schemas/verificationTemplate/oceanCDVerificationTemplateMetric.yaml +++ b/api/services/ocean/cd/schemas/verificationTemplate/oceanCDVerificationTemplateMetric.yaml @@ -43,3 +43,6 @@ properties: provider: type: object $ref: "oceanCDVerificationTemplateMetricProvider.yaml" + baseline: + type: objet + $ref: "oceanCDVerificationTemplateMetricBaseline.yaml" diff --git a/api/services/ocean/cd/schemas/verificationTemplate/oceanCDVerificationTemplateMetricBaseline.yaml b/api/services/ocean/cd/schemas/verificationTemplate/oceanCDVerificationTemplateMetricBaseline.yaml new file mode 100644 index 000000000..0f79a9a5b --- /dev/null +++ b/api/services/ocean/cd/schemas/verificationTemplate/oceanCDVerificationTemplateMetricBaseline.yaml @@ -0,0 +1,22 @@ +type: object +required: + - threshold + - provider +title: Ocean CD Verification Metric Baseline +properties: + threshold: + type: string + enum: ["<", ">", "<=", ">=", "=", "range"] + description: A mathematical expression needed for the comparison + example: ">" + minRange: + type: integer + example: 45 + description: Number in percent we allow the new version’s data result to be under baseline data result + maxRange: + type: integer + example: 55 + description: Number in percent we allow the new version’s data result to be under baseline data result + provider: + type: object + $ref: "oceanCDVerificationTemplateMetricBaselineProvider.yaml" \ No newline at end of file diff --git a/api/services/ocean/cd/schemas/verificationTemplate/oceanCDVerificationTemplateMetricBaselineProvider.yaml b/api/services/ocean/cd/schemas/verificationTemplate/oceanCDVerificationTemplateMetricBaselineProvider.yaml new file mode 100644 index 000000000..9b5c62ec8 --- /dev/null +++ b/api/services/ocean/cd/schemas/verificationTemplate/oceanCDVerificationTemplateMetricBaselineProvider.yaml @@ -0,0 +1,13 @@ +type: object +title: Ocean CD Verification Metric Baseline Provider, only one provider type can be defined and it must be equal to the metric provider +description: The name of the monitoring tool chosen for the metric +properties: + prometheus: + type: object + $ref: "oceanCDVerificationTemplateMetricPrometheus.yaml" + newRelic: + type: object + $ref: "oceanCDVerificationTemplateMetricNewRelic.yaml" + datadog: + type: object + $ref: "oceanCDVerificationTemplateMetricDatadog.yaml" From c1105291c76ec9f1529d28d9f3fc119aa62f5f4b Mon Sep 17 00:00:00 2001 From: avishagk Date: Tue, 28 Nov 2023 15:16:12 +0200 Subject: [PATCH 2/4] [src] - OceanCD - Add baseline field --- .../ocean/cd/schemas/oceanCDRolloutBaseline.yaml | 12 ++++++++++++ .../cd/schemas/oceanCDRolloutBaselineMetric.yaml | 13 +++++++++++++ .../oceanCDRolloutBaselineMetricProvider.yaml | 13 +++++++++++++ .../schemas/oceanCDRolloutVerificationResult.yaml | 4 ++++ 4 files changed, 42 insertions(+) create mode 100644 api/services/ocean/cd/schemas/oceanCDRolloutBaseline.yaml create mode 100644 api/services/ocean/cd/schemas/oceanCDRolloutBaselineMetric.yaml create mode 100644 api/services/ocean/cd/schemas/oceanCDRolloutBaselineMetricProvider.yaml diff --git a/api/services/ocean/cd/schemas/oceanCDRolloutBaseline.yaml b/api/services/ocean/cd/schemas/oceanCDRolloutBaseline.yaml new file mode 100644 index 000000000..75d806ccb --- /dev/null +++ b/api/services/ocean/cd/schemas/oceanCDRolloutBaseline.yaml @@ -0,0 +1,12 @@ +type: object +title: Ocean CD Verification Baseline +description: Represents object of Verification Baseline +properties: + baselineResult: + type: double + example: 2.45 + description: describe the baseline metric result + metric: + type: object + $ref: "./oceanCDRolloutBaselineMetric.yaml" + description: describe the baseline metric \ No newline at end of file diff --git a/api/services/ocean/cd/schemas/oceanCDRolloutBaselineMetric.yaml b/api/services/ocean/cd/schemas/oceanCDRolloutBaselineMetric.yaml new file mode 100644 index 000000000..24207edf0 --- /dev/null +++ b/api/services/ocean/cd/schemas/oceanCDRolloutBaselineMetric.yaml @@ -0,0 +1,13 @@ +type: object +title: Ocean CD Verification Baseline Metric +description: Represents object of Verification Baseline Metric +properties: + threshold: + type: string + example: "<" + description: represent the baseline threshold + enum: [ "<", "<=", ">", ">=", "=", "range" ] + provider: + description: represent the baseline provider. + type: object + $ref: "./oceanCDRolloutBaselineMetricProvider.yaml" \ No newline at end of file diff --git a/api/services/ocean/cd/schemas/oceanCDRolloutBaselineMetricProvider.yaml b/api/services/ocean/cd/schemas/oceanCDRolloutBaselineMetricProvider.yaml new file mode 100644 index 000000000..46e49da75 --- /dev/null +++ b/api/services/ocean/cd/schemas/oceanCDRolloutBaselineMetricProvider.yaml @@ -0,0 +1,13 @@ +type: object +title: Ocean CD Verification Baseline Metric Provider +description: Represents object of Verification Baseline Metric Provider +properties: + prometheus: + type: object + $ref: "../verificationTemplate/oceanCDVerificationTemplateMetricPrometheus.yaml" + newRelic: + type: object + $ref: "../verificationTemplate/oceanCDVerificationTemplateMetricNewRelic.yaml" + datadog: + type: object + $ref: "../verificationTemplate/oceanCDVerificationTemplateMetricDatadog.yaml" \ No newline at end of file diff --git a/api/services/ocean/cd/schemas/oceanCDRolloutVerificationResult.yaml b/api/services/ocean/cd/schemas/oceanCDRolloutVerificationResult.yaml index 740d8516e..fa3a90645 100644 --- a/api/services/ocean/cd/schemas/oceanCDRolloutVerificationResult.yaml +++ b/api/services/ocean/cd/schemas/oceanCDRolloutVerificationResult.yaml @@ -58,6 +58,10 @@ properties: type: string description: The step where the failure/success comes from example: "1" + baseline: + type: object + description: Describe baseline metric such as metric, threshold and result + $ref: "./oceanCDRolloutBaseline.yaml" providerDetails: type: object description: The chosen for the metric monitoring tool's details From b0d382aa73865a032ff2eeca130cdd1bbd315b01 Mon Sep 17 00:00:00 2001 From: avishagk Date: Tue, 28 Nov 2023 15:21:11 +0200 Subject: [PATCH 3/4] [src] - OceanCD - Add baseline field --- .../cd/schemas/oceanCDRolloutBaselineMetricProvider.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/services/ocean/cd/schemas/oceanCDRolloutBaselineMetricProvider.yaml b/api/services/ocean/cd/schemas/oceanCDRolloutBaselineMetricProvider.yaml index 46e49da75..25b68329e 100644 --- a/api/services/ocean/cd/schemas/oceanCDRolloutBaselineMetricProvider.yaml +++ b/api/services/ocean/cd/schemas/oceanCDRolloutBaselineMetricProvider.yaml @@ -4,10 +4,10 @@ description: Represents object of Verification Baseline Metric Provider properties: prometheus: type: object - $ref: "../verificationTemplate/oceanCDVerificationTemplateMetricPrometheus.yaml" + $ref: "./verificationTemplate/oceanCDVerificationTemplateMetricPrometheus.yaml" newRelic: type: object - $ref: "../verificationTemplate/oceanCDVerificationTemplateMetricNewRelic.yaml" + $ref: "./verificationTemplate/oceanCDVerificationTemplateMetricNewRelic.yaml" datadog: type: object - $ref: "../verificationTemplate/oceanCDVerificationTemplateMetricDatadog.yaml" \ No newline at end of file + $ref: "./verificationTemplate/oceanCDVerificationTemplateMetricDatadog.yaml" \ No newline at end of file From a452cee4ca6e07769e9858aed686625c0a4967b9 Mon Sep 17 00:00:00 2001 From: avishagk Date: Tue, 5 Dec 2023 15:46:31 +0200 Subject: [PATCH 4/4] [src] - OceanCD - change baseline result type --- api/services/ocean/cd/schemas/oceanCDRolloutBaseline.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/api/services/ocean/cd/schemas/oceanCDRolloutBaseline.yaml b/api/services/ocean/cd/schemas/oceanCDRolloutBaseline.yaml index 75d806ccb..c952b5f2e 100644 --- a/api/services/ocean/cd/schemas/oceanCDRolloutBaseline.yaml +++ b/api/services/ocean/cd/schemas/oceanCDRolloutBaseline.yaml @@ -3,8 +3,9 @@ title: Ocean CD Verification Baseline description: Represents object of Verification Baseline properties: baselineResult: - type: double - example: 2.45 + type: number + format: double + example: 2.453 description: describe the baseline metric result metric: type: object