Skip to content

Conversation

@lukesneeringer
Copy link
Contributor

Uses #3715 as a base.

This PR adds tracking for deleted labels on the Bucket object, and causes the appropriate data to be sent when Bucket.patch is called.

Fixes #3711.

@lukesneeringer lukesneeringer added the api: storage Issues related to the Cloud Storage API. label Aug 7, 2017
@lukesneeringer lukesneeringer self-assigned this Aug 7, 2017
@googlebot
Copy link

So there's good news and bad news.

👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there.

😕 The bad news is that it appears that one or more commits were authored by someone other than the pull request submitter. We need to confirm that they're okay with their commits being contributed to this project. Please have them confirm that here in the pull request.

Note to project maintainer: This is a terminal state, meaning the cla/google commit status will not change from this state. It's up to you to confirm consent of the commit author(s) and merge this pull request when appropriate.

@googlebot googlebot added the cla: no This human has *not* signed the Contributor License Agreement. label Aug 7, 2017
@lukesneeringer
Copy link
Contributor Author

Grumble grumble grumble @googlebot.

@lukesneeringer lukesneeringer added cla: yes This human has signed the Contributor License Agreement. and removed cla: no This human has *not* signed the Contributor License Agreement. labels Aug 7, 2017
@googlebot googlebot added cla: no This human has *not* signed the Contributor License Agreement. and removed cla: yes This human has signed the Contributor License Agreement. labels Aug 7, 2017
@tseaver
Copy link
Contributor

tseaver commented Aug 7, 2017

#3715 merged, so you can rebase to appease googlebot.

@lukesneeringer lukesneeringer added cla: yes This human has signed the Contributor License Agreement. and removed cla: no This human has *not* signed the Contributor License Agreement. labels Aug 7, 2017
@lukesneeringer
Copy link
Contributor Author

Done, just need a review (and to fix CI).

@googlebot googlebot added cla: no This human has *not* signed the Contributor License Agreement. and removed cla: yes This human has signed the Contributor License Agreement. labels Aug 7, 2017
@lukesneeringer lukesneeringer added cla: yes This human has signed the Contributor License Agreement. and removed cla: no This human has *not* signed the Contributor License Agreement. labels Aug 7, 2017
``client`` stored on the current object.
"""
answer = super(Bucket, self).update(client=client)
self._label_removals.clear()

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

_, _, kwargs = client._connection.api_request.mock_calls[0]
self.assertEqual(len(kwargs['data']['labels']), 2)
self.assertEqual(kwargs['data']['labels']['color'], 'red')
self.assertEqual(kwargs['data']['labels']['flavor'], 'cherry')

This comment was marked as spam.

This comment was marked as spam.

@googlebot googlebot added cla: no This human has *not* signed the Contributor License Agreement. and removed cla: yes This human has signed the Contributor License Agreement. labels Aug 7, 2017
@lukesneeringer
Copy link
Contributor Author

Thanks for catching that @tseaver. Updates made.

# If the values are reset, the changes must as well.
self._changes = set()
if hasattr(self, '_label_removals'):
self._label_removals.clear()

This comment was marked as spam.

This comment was marked as spam.

@lukesneeringer
Copy link
Contributor Author

@tseaver @jonparrott Can someone give this a final signoff so I can merge it? :-)

@lukesneeringer lukesneeringer added cla: yes This human has signed the Contributor License Agreement. and removed cla: no This human has *not* signed the Contributor License Agreement. labels Aug 10, 2017
@lukesneeringer lukesneeringer merged commit 64d1728 into googleapis:master Aug 10, 2017
@lukesneeringer lukesneeringer deleted the issue-3711 branch August 10, 2017 18:38
landrito pushed a commit to landrito/google-cloud-python that referenced this pull request Aug 21, 2017
landrito pushed a commit to landrito/google-cloud-python that referenced this pull request Aug 22, 2017
landrito pushed a commit to landrito/google-cloud-python that referenced this pull request Aug 22, 2017
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.

4 participants