Skip to content

Conversation

AsafMah
Copy link
Collaborator

@AsafMah AsafMah commented Aug 27, 2025

Like Gil suggested.

It makes the code simpler, and doesn't seem to have problems for the browser

Copy link

github-actions bot commented Aug 27, 2025

Unit Test Results

    1 files  ±0    18 suites  ±0   9m 11s ⏱️ - 1m 2s
281 tests ±0  273 ✔️ ±0  8 💤 ±0  0 ±0 
287 runs  ±0  279 ✔️ ±0  8 💤 ±0  0 ±0 

Results for commit 021a29a. ± Comparison against base commit 728fc14.

♻️ This comment has been updated with latest results.

@AsafMah AsafMah marked this pull request as draft August 31, 2025 06:50
"Accept-Encoding": "gzip,deflate",
Connection: "Keep-Alive",
}),
keepalive: false,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we do this elsewhere ? (keepalive:false)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok so before we had this code:

        if (isNodeLike) {
            // keepAlive pools and reuses TCP connections, so it's faster
            axiosProps.httpAgent = new http.Agent({ keepAlive: true });
            axiosProps.httpsAgent = new https.Agent({ keepAlive: true });
        }

So it should be keepalive: true I guess.

I assume the reason we only did it in node before is because it wasn't supported in browser, so now we should always have it on?

}
}
const response = await fetch(this.getAuthMetadataEndpointFromClusterUri(kustoUri), {
// TODO - is this still true for fetch?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its easy to test - just use a not real cluster url
although btw i think this is not the behavior in c# - if cluster doesnt response we throw in C# ...
Or is the case here needs to be a real cluster that is just down (also easy to test)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I see it's working, though I'm not 100% about if it's the same scenario.

I think we can remove this for now and see if someone complains?

timeout,
body: payload,
headers: { ...this._baseRequest.headers, ...headers },
duplex: isPayloadStream ? "half" : undefined,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does it mean

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NodeJS throws if it's not set. I'll add a comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants