Skip to content

fix: Add total_synthetic_timeout_millis support to api package for broken links #90

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 20 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions packages/synthetics-sdk-api/proto/synthetic_response.proto
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,9 @@ message BrokenLinksResultV1 {
// individual link options, default None. string must be formatted as a
// fully qualified url
map<string, PerLinkOption> per_link_options = 10;

// Timeout set for the entire Synthetic Monitor, default 60000 milliseconds
optional int64 total_synthetic_timeout_millis = 11;
}

// Options set for broken link synthetic.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export interface GenericResultV1_GenericError {
* lookup".
*/
error_message: string;
/** The name of the function where the error occurred */
/** The name of the function where the error occurred. */
function_name: string;
/** The name of the file that reported the error. */
file_path: string;
Expand Down Expand Up @@ -300,6 +300,8 @@ export interface BrokenLinksResultV1_BrokenLinkCheckerOptions {
* fully qualified url
*/
per_link_options: { [key: string]: BrokenLinksResultV1_BrokenLinkCheckerOptions_PerLinkOption };
/** Timeout set for the entire Synthetic Monitor, default 53000 milliseconds */
total_synthetic_timeout_millis?: number | undefined;
}

/** Possible orders for checking links that have been scraped. */
Expand Down Expand Up @@ -1411,6 +1413,7 @@ function createBaseBrokenLinksResultV1_BrokenLinkCheckerOptions(): BrokenLinksRe
max_retries: undefined,
wait_for_selector: "",
per_link_options: {},
total_synthetic_timeout_millis: undefined,
};
}

Expand Down Expand Up @@ -1446,6 +1449,9 @@ export const BrokenLinksResultV1_BrokenLinkCheckerOptions = {
writer.uint32(82).fork(),
).ldelim();
});
if (message.total_synthetic_timeout_millis !== undefined) {
writer.uint32(88).int64(message.total_synthetic_timeout_millis);
}
return writer;
},

Expand Down Expand Up @@ -1525,6 +1531,13 @@ export const BrokenLinksResultV1_BrokenLinkCheckerOptions = {
message.per_link_options[entry10.key] = entry10.value;
}
continue;
case 11:
if (tag !== 88) {
break;
}

message.total_synthetic_timeout_millis = longToNumber(reader.int64() as Long);
continue;
}
if ((tag & 7) === 4 || tag === 0) {
break;
Expand Down Expand Up @@ -1554,6 +1567,9 @@ export const BrokenLinksResultV1_BrokenLinkCheckerOptions = {
return acc;
}, {})
: {},
total_synthetic_timeout_millis: isSet(object.total_synthetic_timeout_millis)
? Number(object.total_synthetic_timeout_millis)
: undefined,
};
},

Expand All @@ -1578,6 +1594,8 @@ export const BrokenLinksResultV1_BrokenLinkCheckerOptions = {
obj.per_link_options[k] = BrokenLinksResultV1_BrokenLinkCheckerOptions_PerLinkOption.toJSON(v);
});
}
message.total_synthetic_timeout_millis !== undefined &&
(obj.total_synthetic_timeout_millis = Math.round(message.total_synthetic_timeout_millis));
return obj;
},

Expand Down Expand Up @@ -1607,6 +1625,7 @@ export const BrokenLinksResultV1_BrokenLinkCheckerOptions = {
}
return acc;
}, {});
message.total_synthetic_timeout_millis = object.total_synthetic_timeout_millis ?? undefined;
return message;
},
};
Expand Down