Skip to content
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

Diagnostic POST timeout #37

Merged
merged 3 commits into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
6 changes: 5 additions & 1 deletion dist/index.js

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

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ const STATE_KEY_EXECUTION_PHASE = "detsys_action_execution_phase";
const STATE_KEY_NIX_NOT_FOUND = "detsys_action_nix_not_found";
const STATE_NOT_FOUND = "not-found";

const DIAGNOSTIC_ENDPOINT_TIMEOUT = 30_000; // 30 seconds in milliseconds
lucperkins marked this conversation as resolved.
Show resolved Hide resolved

/**
* An enum for describing different "fetch suffixes" for i.d.s.
*
Expand Down Expand Up @@ -729,6 +731,9 @@ export abstract class DetSysAction {
try {
await this.client.post(this.actionOptions.diagnosticsUrl, {
json: batch,
timeout: {
request: DIAGNOSTIC_ENDPOINT_TIMEOUT,
},
});
} catch (e: unknown) {
actionsCore.debug(
Expand Down