Skip to content

Commit 58702cd

Browse files
authored
refactor: Remove redundant debug log line from Settings client (#1822)
This PR removes a redundant debug log line from the Settings client. All the information included in this line is also logged a couple of lines below, so this line adds no value. For example currently we see: ``` 2025-04-01T09:17:56Z info [coord=project:builtin:tags.auto-tagging:tag_397__20250401091216_8007_pagination][gid=384] Deployment successful 2025-04-01T09:17:56Z debug [coord=project:builtin:tags.auto-tagging:tag_489__20250401091216_8007_pagination][gid=81] Created/Updated object tag_489__20250401091216_8007_pagination (builtin:tags.auto-tagging) with externalId monaco:cHJvamVjdCRidWlsdGluOnRhZ3MuYXV0by10YWdnaW5nJHRhZ180ODlfXzIwMjUwNDAxMDkxMjE2XzgwMDdfcGFnaW5hdGlvbg== 2025-04-01T09:17:56Z debug [coord=project:builtin:tags.auto-tagging:tag_489__20250401091216_8007_pagination][gid=81] Created/Updated object tag_489__20250401091216_8007_pagination (schemaID: builtin:tags.auto-tagging, Scope: environment, insertAfter: <nil>) with externalId monaco:cHJvamVjdCRidWlsdGluOnRhZ3MuYXV0by10YWdnaW5nJHRhZ180ODlfXzIwMjUwNDAxMDkxMjE2XzgwMDdfcGFnaW5hdGlvbg== ``` Furthermore the extra log line is breaking some E2E tests, `TestPaginationClassic(...)` and `TestPaginationPlatform(...)`, that rely on counting the number of these messages to count how a many objects were created or updated: https://vscode.dev/github/Dynatrace/dynatrace-configuration-as-code/blob/refactor/remove-redundant-log-line/cmd/monaco/integrationtest/v2/pagination_e2e_test.go#L80-L85
1 parent f1d98a7 commit 58702cd

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

pkg/client/dtclient/settings_client.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,6 @@ func (d *SettingsClient) Upsert(ctx context.Context, obj SettingsObject, upsertO
626626
}
627627
}
628628

629-
log.WithCtxFields(ctx).Debug("Created/Updated object %s (%s) with externalId %s", obj.Coordinate.ConfigId, obj.SchemaId, externalID)
630629
insertAfterForLogging := "<nil>"
631630
if upsertOptions.InsertAfter != nil {
632631
insertAfterForLogging = *upsertOptions.InsertAfter

0 commit comments

Comments
 (0)