Dynatrace / dynatrace-configuration-as-code

This tool automates deployment of Dynatrace Configuration to one or multiple Dynatrace environments.
https://docs.dynatrace.com/docs/manage/configuration-as-code/monaco
Apache License 2.0
164 stars 94 forks source link

fix: Apply externalId to settings objects with `builtin:oneagent.features` schema #1428

Closed arthurpitman closed 7 months ago

arthurpitman commented 7 months ago

This PR ensures externalIds are correctly applied to builtin:oneagent.features settings objects by removing code in upsertSettings(...) that was preventing this.

This allows builtin:oneagent.features settings objects with scopes of monitored entities to be deleted as required.

To prevent builtin:oneagent.features settings objects with for example environment scope from being deleted, existing checks for ModificationInfo.Deletable are used.

github-actions[bot] commented 7 months ago

Unit Test Results

1 781 tests  ±0   1 781 :white_check_mark: ±0   17s :stopwatch: -1s   127 suites ±0       0 :zzz: ±0      1 files   ±0       0 :x: ±0 

Results for commit 4968b9c6. ± Comparison against base commit bf359f57.

:recycle: This comment has been updated with latest results.

github-actions[bot] commented 7 months ago

E2E Test Results

    4 files   -  1    508 suites   - 127   43m 27s :stopwatch: - 16m 3s 1 882 tests +32  1 878 :white_check_mark: + 33  1 :zzz: ±0  3 :x:  - 1  2 119 runs   - 46  2 115 :white_check_mark:  -  45  1 :zzz: ±0  3 :x:  - 1 

For more details on these failures, see this check.

Results for commit 3ee58bb6. ± Comparison against base commit 461514ed.

This pull request removes 3 and adds 35 tests. Note that renamed tests count towards both. ``` TestMain github.com/dynatrace/dynatrace-configuration-as-code/v2/cmd/monaco/integrationtest/v2 ‑ TestPaginationClassic github.com/dynatrace/dynatrace-configuration-as-code/v2/cmd/monaco/integrationtest/v2 ‑ TestPaginationPlatform ``` ``` github.com/dynatrace/dynatrace-configuration-as-code/v2/cmd/monaco/integrationtest/v2 ‑ TestDeployScopedConfigurations github.com/dynatrace/dynatrace-configuration-as-code/v2/cmd/monaco/integrationtest/v2 ‑ TestDeploySettingsWithUniqueProperties github.com/dynatrace/dynatrace-configuration-as-code/v2/cmd/monaco/integrationtest/v2 ‑ TestDeploySettingsWithUniqueProperties_ConsidersScopes github.com/dynatrace/dynatrace-configuration-as-code/v2/cmd/monaco/integrationtest/v2 ‑ TestIntegrationMultiProject_ReturnsErrorOnInvalidProjectDefinitions github.com/dynatrace/dynatrace-configuration-as-code/v2/cmd/monaco/integrationtest/v2 ‑ TestIntegrationScopeParameterValidation github.com/dynatrace/dynatrace-configuration-as-code/v2/cmd/monaco/integrationtest/v2 ‑ TestIntegrationScopeParameters github.com/dynatrace/dynatrace-configuration-as-code/v2/cmd/monaco/integrationtest/v2 ‑ TestIntegrationSettings github.com/dynatrace/dynatrace-configuration-as-code/v2/cmd/monaco/integrationtest/v2 ‑ TestIntegrationValidationSettings github.com/dynatrace/dynatrace-configuration-as-code/v2/cmd/monaco/integrationtest/v2 ‑ TestMultiTypeConfigsDeployment github.com/dynatrace/dynatrace-configuration-as-code/v2/cmd/monaco/integrationtest/v2 ‑ TestMultiTypeConfigsValidation … ```

:recycle: This comment has been updated with latest results.

sonarcloud[bot] commented 7 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud