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

[storage.blob] Remove requests as dependency for storage.blob #25017

Merged
merged 21 commits into from
Jul 29, 2022

Conversation

Stevenjin8
Copy link
Contributor

@Stevenjin8 Stevenjin8 commented Jun 29, 2022

Description

Similar to #24965. This removes the requests import from the storage.blob client and (hopefully) fixes the retry mechanism (see comments)

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

@ghost ghost added the Storage Storage Service (Queues, Blobs, Files) label Jun 29, 2022
@Stevenjin8 Stevenjin8 changed the title Fix/storage requests dependency [storage.blob] Remove requests as dependency for storage.blob Jun 29, 2022
@Stevenjin8 Stevenjin8 marked this pull request as ready for review June 29, 2022 00:25
@azure-sdk
Copy link
Collaborator

azure-sdk commented Jun 29, 2022

API change check

APIView has identified API level changes in this PR and created following API reviews.

azure-storage-blob

@check-enforcer
Copy link

check-enforcer bot commented Jul 1, 2022

This pull request is protected by Check Enforcer.

What is Check Enforcer?

Check Enforcer helps ensure all pull requests are covered by at least one check-run (typically an Azure Pipeline). When all check-runs associated with this pull request pass then Check Enforcer itself will pass.

Why am I getting this message?

You are getting this message because Check Enforcer did not detect any check-runs being associated with this pull request within five minutes. This may indicate that your pull request is not covered by any pipelines and so Check Enforcer is correctly blocking the pull request being merged.

What should I do now?

If the check-enforcer check-run is not passing and all other check-runs associated with this PR are passing (excluding license-cla) then you could try telling Check Enforcer to evaluate your pull request again. You can do this by adding a comment to this pull request as follows:
/check-enforcer evaluate
Typically evaulation only takes a few seconds. If you know that your pull request is not covered by a pipeline and this is expected you can override Check Enforcer using the following command:
/check-enforcer override
Note that using the override command triggers alerts so that follow-up investigations can occur (PRs still need to be approved as normal).

What if I am onboarding a new service?

Often, new services do not have validation pipelines associated with them, in order to bootstrap pipelines for a new service, you can issue the following command as a pull request comment:
/azp run prepare-pipelines
This will run a pipeline that analyzes the source tree and creates the pipelines necessary to build and validate your pull request. Once the pipeline has been created you can trigger the pipeline using the following comment:
/azp run python - [service] - ci

Copy link
Member

@lmazuel lmazuel left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@vincenttran-msft vincenttran-msft left a comment

Choose a reason for hiding this comment

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

LGTM! I see there is one hanging discussion -- if the resolution is to keep it as-is then I would say it is good to merge. If there is still a discussion to be had, Jacob is OOF and will be back after the long weekend + 1 (back online 7/6)

Copy link
Member

@vincenttran-msft vincenttran-msft left a comment

Choose a reason for hiding this comment

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

I spoke with Jacob briefly offline -- lets wait until we can have a further discussion next week before merging this in!

Steven Jin added 2 commits July 21, 2022 16:05
…ure-sdk-for-python into fix/storage-requests-dependency
@Stevenjin8
Copy link
Contributor Author

Stevenjin8 commented Jul 22, 2022

@vincenttran-msft @jalauzon-msft I think I figured out what is going on.

In the contentious line of code

data is an instance of azure.core.pipeline.transport._requests_basic.StreamDownloadGenerator. Looking at the history of StreamDownloadGenerator.__next__, I found that

Currently working on tests that confirm that this PR restores the behaviour of the retry mechanism back to #18164's intent. If there is consensus, I will open a PR to revert #25084.

Please let me know if you have any questions or concerns.

Copy link
Member

@jalauzon-msft jalauzon-msft left a comment

Choose a reason for hiding this comment

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

Thanks @Stevenjin8 for investigating this further and providing your detailed summary! After seeing your investigation and doing a bit more myself, I think this is a good change.

Just left some minor review comments.

sdk/storage/azure-storage-blob/CHANGELOG.md Outdated Show resolved Hide resolved
sdk/storage/azure-storage-blob/tests/test_get_blob.py Outdated Show resolved Hide resolved
sdk/storage/azure-storage-blob/tests/test_retry.py Outdated Show resolved Hide resolved
Copy link
Member

@jalauzon-msft jalauzon-msft left a comment

Choose a reason for hiding this comment

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

Thanks again for your work on this!
I've approved just pending the discussion on if the test can be recorded.

@jalauzon-msft jalauzon-msft merged commit 33acf79 into main Jul 29, 2022
@jalauzon-msft jalauzon-msft deleted the fix/storage-requests-dependency branch July 29, 2022 22:45
@Stevenjin8 Stevenjin8 mentioned this pull request Jul 29, 2022
6 tasks
wonder6845 pushed a commit to wonder6845/azure-sdk-for-python that referenced this pull request Aug 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Storage Storage Service (Queues, Blobs, Files)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants