Skip to content

Commit

Permalink
[Synthetics] Normalize monitor before mixing params. (#163176)
Browse files Browse the repository at this point in the history
Fixes #163042 

## Summary

Normalize the monitor object before mixing global and project-wide
params.
  • Loading branch information
awahab07 authored Aug 4, 2023
1 parent 3efc73c commit 339eb28
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -361,13 +361,16 @@ export class SyntheticsMonitorClient {
const heartbeatConfigs: HeartbeatConfig[] = [];

for (const monitor of monitors) {
const attributes = monitor.attributes as unknown as MonitorFields;
const { str: paramsString } = mixParamsWithGlobalParams(paramsBySpace[spaceId], attributes);
const normalizedMonitor = normalizeSecrets(monitor).attributes as MonitorFields;
const { str: paramsString } = mixParamsWithGlobalParams(
paramsBySpace[spaceId],
normalizedMonitor
);

heartbeatConfigs.push(
formatHeartbeatRequest(
{
monitor: normalizeSecrets(monitor).attributes,
monitor: normalizedMonitor,
configId: monitor.id,
},
paramsString
Expand Down

0 comments on commit 339eb28

Please sign in to comment.