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

listTimeSeries: increase timeout from 30 seconds to 60 seconds #411

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
6 changes: 5 additions & 1 deletion src/poller/poller-core/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,16 +232,20 @@
view: 'FULL',
};

return metricsClient.listTimeSeries(request).then((metricResponses) => {
const options = {
timeout: 60 // seconds

Check failure on line 236 in src/poller/poller-core/index.js

View workflow job for this annotation

GitHub Actions / Analyze

Insert `,`
};

return metricsClient.listTimeSeries(request, options).then((metricResponses) => {

Check failure on line 239 in src/poller/poller-core/index.js

View workflow job for this annotation

GitHub Actions / Analyze

Replace `.listTimeSeries(request,·options)` with `⏎····.listTimeSeries(request,·options)⏎····`
const resources = metricResponses[0];

Check failure on line 240 in src/poller/poller-core/index.js

View workflow job for this annotation

GitHub Actions / Analyze

Insert `··`
let maxValue = 0.0;

Check failure on line 241 in src/poller/poller-core/index.js

View workflow job for this annotation

GitHub Actions / Analyze

Insert `··`
let maxLocation = 'global';

Check failure on line 242 in src/poller/poller-core/index.js

View workflow job for this annotation

GitHub Actions / Analyze

Insert `··`

for (const resource of resources) {

Check failure on line 244 in src/poller/poller-core/index.js

View workflow job for this annotation

GitHub Actions / Analyze

Insert `··`
for (const point of assertDefined(resource.points)) {

Check failure on line 245 in src/poller/poller-core/index.js

View workflow job for this annotation

GitHub Actions / Analyze

Insert `··`
const value = assertDefined(point.value?.doubleValue) * 100;

Check failure on line 246 in src/poller/poller-core/index.js

View workflow job for this annotation

GitHub Actions / Analyze

Replace `········` with `··········`
if (value > maxValue) {

Check failure on line 247 in src/poller/poller-core/index.js

View workflow job for this annotation

GitHub Actions / Analyze

Insert `··`
maxValue = value;

Check failure on line 248 in src/poller/poller-core/index.js

View workflow job for this annotation

GitHub Actions / Analyze

Insert `··`
if (resource.resource?.labels?.location) {
maxLocation = resource.resource.labels.location;
}
Expand Down