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.exists() does not work within Batch context #8618

Conversation

IlyaFaer
Copy link

@IlyaFaer IlyaFaer commented Jul 9, 2019

My proposition is to add something like future result - boolean in our case. An object will be working as original bool, but under the hood it'll be checking if future response is done without exceptions

Towards: #5388

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jul 9, 2019
@property
def _is_successfull(self):
"""Checks if binded future request have been completed without any exception."""
return not isinstance(self._properties, _FutureDict)
Copy link
Author

@IlyaFaer IlyaFaer Jul 9, 2019

Choose a reason for hiding this comment

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

If exception have been raised, or request is not done yet, there will be _FutureDict obj


--batch_pK7JBAk73-E=_AA5eFwv4m2Q=--"""
)
return mock_conn
Copy link
Author

Choose a reason for hiding this comment

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

Here are two different responses for two different exists() calls, and one of them is NotFound

pass

self.assertFalse(bool1)
self.assertTrue(bool2)
Copy link
Author

Choose a reason for hiding this comment

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

Checking if both exists() calls working as they suppose to: the first one must be False (NotFound)

@IlyaFaer IlyaFaer marked this pull request as ready for review July 9, 2019 09:31
@tseaver tseaver added api: storage Issues related to the Cloud Storage API. kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Jul 9, 2019
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 9, 2019
@tseaver tseaver added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 10, 2019
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 10, 2019
@tseaver tseaver added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 11, 2019
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 11, 2019
@AVaksman AVaksman added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 19, 2019
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 19, 2019
@mf2199
Copy link
Contributor

mf2199 commented Aug 2, 2019

@tseaver @crwilcox @frankyn A friendly reminder: This PR has been hanging out for awhile. We could use some feedback regarding its status.

@frankyn
Copy link
Member

frankyn commented Aug 12, 2019

Hi @IlyaFaer,

I'm closing this PR as it's focused on a feature request that hasn't been prioritized or has a reviewed design.

Please prioritize bugs in the client before feature requests.

Thank you for your patience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the Cloud Storage API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants