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

fix: Uses botocore ssl context for telemetry requests #253

Merged
merged 1 commit into from
Mar 27, 2024

Conversation

marofke
Copy link
Contributor

@marofke marofke commented Mar 27, 2024

What was the problem/requirement? (What/Why)

In #230 I added a workaround for telemetry requests that were hitting SSL issues. Turns out some contexts don't have access to SSL at all, which was causing failures in some integrated submitters.

What was the solution? (How)

Steal more stuff from botocore! I just grabbed the create_urllib3_context function, and set the cert path using the corresponding botocore function. This uses all of the vendored ssl stuff from botocore, so we shouldn't hit any more SSL issues when sending telemetry. Regardless, any SSL failures should happen when we try to send the telemetry, which is in a background thread, so it at least won't interrupt user behaviour.

What is the impact of this change?

Fix crashes for environments without SSL.

How was this change tested?

Submitted a job with telemetry enabled, confirmed that it was sent successfully. Without setting the cert path, I confirmed that I was getting SSL errors attempting to send telemetry, and adding in the cert path allowed requests to go through.

Was this change documented?

N/A

Is this a breaking change?

No

@marofke marofke requested a review from a team as a code owner March 27, 2024 17:02
@marofke marofke force-pushed the marofke/telemetry-ssl-fix-botocore branch from 6edc6fe to 42b9063 Compare March 27, 2024 17:04
Signed-off-by: Caden Marofke <marofke@amazon.com>
@marofke marofke force-pushed the marofke/telemetry-ssl-fix-botocore branch from 42b9063 to 5f6bbe9 Compare March 27, 2024 17:05
@marofke marofke merged commit 6a6b114 into mainline Mar 27, 2024
18 checks passed
@marofke marofke deleted the marofke/telemetry-ssl-fix-botocore branch March 27, 2024 17:21
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.

4 participants