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

Improve run times for large projects by reusing connections by default #1109

Merged
merged 11 commits into from
Jul 12, 2024

Conversation

mikealfare
Copy link
Contributor

@mikealfare mikealfare commented Jul 9, 2024

resolves #1082

Problem

Run times for large projects are taking a long time, in part due to the fact that we don't reuse connections by default. This problem is made worse when using Key Pair authorization as the RSA key needs to be validated every time a connection is created.

Solution

Update reuse_connections to a default of True if the user has not specified client_session_keep_alive=True.

Checklist

  • I have read the contributing guide and understand what's expected of me
  • I have run this code in development and it appears to resolve the stated issue
  • This PR includes tests, or tests are not required/relevant for this PR
  • This PR has no interface changes (e.g. macros, cli, logs, json artifacts, config files, adapter interface, etc) or this PR has already received feedback and approval from Product or DX

@mikealfare mikealfare self-assigned this Jul 9, 2024
@mikealfare mikealfare requested a review from a team as a code owner July 9, 2024 23:47
@cla-bot cla-bot bot added the cla:yes label Jul 9, 2024
@mikealfare mikealfare marked this pull request as draft July 10, 2024 16:31
Copy link
Contributor

@VersusFacit VersusFacit left a comment

Choose a reason for hiding this comment

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

Judging from earlier conversations, does this PR need a rework? I think I saw the spec may have changed to default to True regardless here.

Slightly out of context, this is from you:

we will update the default on reuse_connections to be True

Just want to know target

@mikealfare
Copy link
Contributor Author

Judging from earlier conversations, does this PR need a rework? I think I saw the spec may have changed to default to True regardless here.

Slightly out of context, this is from you:

we will update the default on reuse_connections to be True

Just want to know target

Fair, I should have updated the PR body. After internal discussions, we determined that we only wanted to default reuse_connections to True if the user didn't specify client_session_keep_alive=True (and didn't set reuse_connection). We wanted to do that to make the potentially risky scenario (reuse_connections=True and client_session_keep_alive=True) an opt-in scenario.

@mikealfare mikealfare marked this pull request as ready for review July 12, 2024 15:39
Copy link
Contributor

@VersusFacit VersusFacit left a comment

Choose a reason for hiding this comment

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

Approved barring addressing that print issue left by @aranke since I was going to raise it too as well as double checking we don't need additional overriding on the profile generation tests (there are just so many of them!).

@mikealfare mikealfare enabled auto-merge (squash) July 12, 2024 18:48
@mikealfare mikealfare merged commit 6857e6b into main Jul 12, 2024
18 checks passed
@mikealfare mikealfare deleted the key-pair-auth branch July 12, 2024 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] Improve key-pair auth performance
3 participants