close the requests.Session() object used by dcos_api_session#50
Open
margaret wants to merge 1 commit into
Open
close the requests.Session() object used by dcos_api_session#50margaret wants to merge 1 commit into
margaret wants to merge 1 commit into
Conversation
7 tasks
Contributor
Author
|
enterprise integration test is https://jira.mesosphere.com/browse/QUALITY-2127 |
jongiddy
reviewed
May 10, 2018
jongiddy
left a comment
Contributor
There was a problem hiding this comment.
Not sure if this change will go ahead, given dcos/dcos#2860 (comment)
However, if it does, you should move the api.wait_for_dcos() into the try block. This ensures that the session is also closed if an exception occurs during the long-running wait_for_dcos(). The session is created in the create() method, so this is safe.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
High-level description
What features does this change enable? What bugs does this change fix?
The requests.Session() object is not used as a context manager so it needs to have close() called explicitly.
Corresponding DC/OS tickets (obligatory)
These JIRA ticket(s) must be updated (ideally closed) in the moment this PR lands:
Related tickets (optional)
Other tickets related to this change:
Related
dcos-launchanddcosPRsIs this change going to be propagated up into another repo? Test the change by bumping the
dcos-test-utilsSHA to point to these changes to test it. Link the corresponding PRs here:dcos/dcos#2860
Checklist for all PRs
dcos-integration-testsin https://github.com/dcos/dcos or explain why this is not applicable:Integration tests were run and
PLEASE FILL IN THE TEMPLATE ABOVE / DO NOT REMOVE ANY SECTIONS ABOVE THIS LINE
Instructions and review process
What is the review process and when will my changes land?
All PRs require 2 approvals using GitHub's pull request reviews.
Reviewers should be:
It is best to proactively ask for 2 reviews by @mentioning the candidate reviewers in the PR comments area. The responsibility is on the developer submitting the PR to follow-up with reviewers and make sure a PR is reviewed in a timely manner.