-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Settings based on unique key properties
For Settings schemas with unique key constraints, these key constraints are used in addition to the external ID to identify and update an existing object. This ensures that Settings objects are not attempted to be duplicated but are correctly found and updated. Changes in addition to the main feature: * test(e2e): Add test which tries to deploy settings2.0 object (span-attribute) with the same unique key but different coordinates/externalID in two different projects and checks that a single object was created and updated without error. * refactor(client): Move all settings clients test to same file * refactor(client): Move all config client tests to same file * refactor(client): Move all entity client tests to same file --------- Co-authored-by: Jure Skelin <[email protected]> Co-authored-by: UnseenWizzard <[email protected]>
- Loading branch information
1 parent
a6b9a41
commit d17d26b
Showing
17 changed files
with
1,932 additions
and
1,148 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
cmd/monaco/integrationtest/v2/test-resources/settings-unique-properties/manifest.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
manifestVersion: 1.0 | ||
projects: | ||
- name: project1 | ||
- name: project2 | ||
environmentGroups: | ||
- name: default | ||
environments: | ||
- name: classic_env | ||
url: | ||
type: environment | ||
value: URL_ENVIRONMENT_1 | ||
auth: | ||
token: | ||
name: TOKEN_ENVIRONMENT_1 | ||
- name: platform_env | ||
url: | ||
type: environment | ||
value: PLATFORM_URL_ENVIRONMENT_2 | ||
auth: | ||
token: | ||
name: TOKEN_ENVIRONMENT_2 | ||
oAuth: | ||
clientId: | ||
name: OAUTH_CLIENT_ID | ||
clientSecret: | ||
name: OAUTH_CLIENT_SECRET |
11 changes: 11 additions & 0 deletions
11
...t/v2/test-resources/settings-unique-properties/project1/builtinmonitoring.slo/config.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
configs: | ||
- id: d955d9b7-9630-3be5-aca5-3715779a7282 | ||
config: | ||
name: d955d9b7-9630-3be5-aca5-3715779a7282 | ||
template: d955d9b7-9630-3be5-aca5-3715779a7282.json | ||
skip: false | ||
type: | ||
settings: | ||
schema: builtin:monitoring.slo | ||
schemaVersion: 6.0.12 | ||
scope: environment |
15 changes: 15 additions & 0 deletions
15
...nique-properties/project1/builtinmonitoring.slo/d955d9b7-9630-3be5-aca5-3715779a7282.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"enabled": true, | ||
"name": "Just a Name", | ||
"metricName": "justaname", | ||
"metricExpression": "(100)*(builtin:service.errors.server.successCount:splitBy())/(builtin:service.requestCount.server:splitBy())", | ||
"evaluationType": "AGGREGATE", | ||
"filter": "type(\"SERVICE\")", | ||
"evaluationWindow": "-1w", | ||
"targetSuccess": 99.98, | ||
"targetWarning": 99.99, | ||
"errorBudgetBurnRate": { | ||
"burnRateVisualizationEnabled": true, | ||
"fastBurnThreshold": 10.0 | ||
} | ||
} |
4 changes: 4 additions & 0 deletions
4
...nique-properties/project1/builtinspan-attribute/1f4b1f5c-11d2-38c8-9324-7d139c6e6452.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"key": "graphql.operation.name", | ||
"masking": "NOT_MASKED" | ||
} |
11 changes: 11 additions & 0 deletions
11
...t/v2/test-resources/settings-unique-properties/project1/builtinspan-attribute/config.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
configs: | ||
- id: 1f4b1f5c-11d2-38c8-9324-7d139c6e6452 | ||
config: | ||
name: 1f4b1f5c-11d2-38c8-9324-7d139c6e6452 | ||
template: 1f4b1f5c-11d2-38c8-9324-7d139c6e6452.json | ||
skip: false | ||
type: | ||
settings: | ||
schema: builtin:span-attribute | ||
schemaVersion: 0.0.32 | ||
scope: environment |
11 changes: 11 additions & 0 deletions
11
...t/v2/test-resources/settings-unique-properties/project2/builtinmonitoring.slo/config.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
configs: | ||
- id: d955d9b7-9630-3be5-aca5-3715779a7282 | ||
config: | ||
name: d955d9b7-9630-3be5-aca5-3715779a7282 | ||
template: d955d9b7-9630-3be5-aca5-3715779a7282.json | ||
skip: false | ||
type: | ||
settings: | ||
schema: builtin:monitoring.slo | ||
schemaVersion: 6.0.12 | ||
scope: environment |
15 changes: 15 additions & 0 deletions
15
...nique-properties/project2/builtinmonitoring.slo/d955d9b7-9630-3be5-aca5-3715779a7282.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"enabled": true, | ||
"name": "NEW Name", | ||
"metricName": "justaname", | ||
"metricExpression": "(100)*(builtin:service.errors.server.successCount:splitBy())/(builtin:service.requestCount.server:splitBy())", | ||
"evaluationType": "AGGREGATE", | ||
"filter": "type(\"SERVICE\")", | ||
"evaluationWindow": "-1w", | ||
"targetSuccess": 99.98, | ||
"targetWarning": 99.99, | ||
"errorBudgetBurnRate": { | ||
"burnRateVisualizationEnabled": true, | ||
"fastBurnThreshold": 10.0 | ||
} | ||
} |
4 changes: 4 additions & 0 deletions
4
...nique-properties/project2/builtinspan-attribute/1f4b1f5c-11d2-38c8-9324-7d139c6e6452.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"key": "graphql.operation.name", | ||
"masking": "NOT_MASKED" | ||
} |
11 changes: 11 additions & 0 deletions
11
...t/v2/test-resources/settings-unique-properties/project2/builtinspan-attribute/config.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
configs: | ||
- id: 1f4b1f5c-11d2-38c8-9324-7d139c6e6452 | ||
config: | ||
name: 1f4b1f5c-11d2-38c8-9324-7d139c6e6452 | ||
template: 1f4b1f5c-11d2-38c8-9324-7d139c6e6452.json | ||
skip: false | ||
type: | ||
settings: | ||
schema: builtin:span-attribute | ||
schemaVersion: 0.0.32 | ||
scope: environment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.