GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: do not append duplicates to user agent string by ddelgrosso1 · Pull Request #570 · googleapis/python-storage

This repository was archived by the owner on Mar 31, 2026. It is now read-only.

Conversation

@ddelgrosso1

@ddelgrosso1 ddelgrosso1 commented Sep 1, 2021

Copy link
Copy Markdown
Contributor

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #565 🦕

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@ddelgrosso1
fix: do not append duplicates to user agent string
5083276
@ddelgrosso1
ddelgrosso1 requested review from a team September 1, 2021 17:29
@google-cla google-cla Bot added the cla: yes This human has signed the Contributor License Agreement. label Sep 1, 2021
@product-auto-label product-auto-label Bot added the api: storage Issues related to the googleapis/python-storage API. label Sep 1, 2021
@cojenco cojenco added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Sep 1, 2021
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Sep 1, 2021
tseaver
tseaver suggested changes Sep 1, 2021
View reviewed changes

@tseaver tseaver left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

@ddelgrosso1 Can you please add a unit test which reproduces the issue (i.e., failing with this change not applied, but passing with it applied)?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

ddelgrosso1 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
Comment thread google/cloud/storage/_http.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@ddelgrosso1 @tseaver
Update google/cloud/storage/_http.py
48e6fee
Move agent_version to a variable

Co-authored-by: Tres Seaver <[email protected]>
@google-cla

google-cla Bot commented Sep 1, 2021

Copy link
Copy Markdown

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@google-cla google-cla Bot 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 Sep 1, 2021
@cojenco cojenco 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 Sep 1, 2021
@ddelgrosso1
Merge branch 'main' into user-agent-dupe
cea0b5a
@google-cla

google-cla Bot commented Sep 1, 2021

Copy link
Copy Markdown

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@google-cla google-cla Bot 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 Sep 1, 2021
@ddelgrosso1 ddelgrosso1 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 Sep 1, 2021
@tseaver

tseaver commented Sep 1, 2021

Copy link
Copy Markdown
Contributor

@gooblebot I consent.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tseaver

tseaver commented Sep 1, 2021

Copy link
Copy Markdown
Contributor

@ddelgrosso1 The lint session is failing, likely to do with something in the suggestion you merged. Can you pull from here to your local branch and run nox -s blacken and commit / push the resulting change?

ddelgrosso1 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@andrewsg

andrewsg commented Sep 1, 2021

Copy link
Copy Markdown
Contributor

Denis, please ping me if you would like help running the auto-formatter/linter and writing the regression test.

ddelgrosso1 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ddelgrosso1
linter fix
5dd1f9d
@google-cla

google-cla Bot commented Sep 1, 2021

Copy link
Copy Markdown

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@google-cla google-cla Bot 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 Sep 1, 2021
ddelgrosso1 added 2 commits September 1, 2021 22:42
@ddelgrosso1
Add test for duplicating user agent
762e653
@ddelgrosso1
remove hardcoded version
934d0ce
@google-cla

google-cla Bot commented Sep 1, 2021

Copy link
Copy Markdown

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ddelgrosso1 ddelgrosso1 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 Sep 1, 2021
@ddelgrosso1
fix linter
e65e6c6
@google-cla

google-cla Bot commented Sep 1, 2021

Copy link
Copy Markdown

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@google-cla google-cla Bot 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 Sep 1, 2021
@ddelgrosso1 ddelgrosso1 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 Sep 2, 2021
tseaver
tseaver approved these changes Sep 2, 2021
View reviewed changes

@tseaver tseaver left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

@ddelgrosso1 Thanks for the test! I verified that it fails against main without the patch.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

cojenco reacted with hooray emoji
All reactions
  • 🎉 1 reaction
@tseaver
Merge branch 'main' into user-agent-dupe
adef243
@tseaver tseaver added the automerge Merge the pull request once unit tests and other checks pass. label Sep 2, 2021
@gcf-merge-on-green
gcf-merge-on-green Bot merged commit 57cf3a1 into googleapis:main Sep 2, 2021
@gcf-merge-on-green gcf-merge-on-green Bot removed the automerge Merge the pull request once unit tests and other checks pass. label Sep 2, 2021
@ddelgrosso1
ddelgrosso1 deleted the user-agent-dupe branch September 2, 2021 17:37
@cojenco cojenco mentioned this pull request Sep 2, 2021
tests: revise test to run without setting credentials in env #579
Merged
gcf-merge-on-green Bot pushed a commit that referenced this pull request Sep 8, 2021
@release-please
chore: release 1.42.1 (#549)
085b195
🤖 I have created a release \*beep\* \*boop\*
---
### [1.42.1](https://www.github.com/googleapis/python-storage/compare/v1.42.0...v1.42.1) (2021-09-07)


### Bug Fixes

* do not append duplicates to user agent string ([#570](https://www.github.com/googleapis/python-storage/issues/570)) ([57cf3a1](https://www.github.com/googleapis/python-storage/commit/57cf3a1f27292939ed097ef8afa3f4392c4b83e0))


### Documentation

* pass explicit 'client' in '{Blob.Bucket}.from_string' examples ([#545](https://www.github.com/googleapis/python-storage/issues/545)) ([6eff22d](https://www.github.com/googleapis/python-storage/commit/6eff22db0e8c8689208ee52fa815f3ea00675094))
---


This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
cojenco pushed a commit to cojenco/python-storage that referenced this pull request Oct 13, 2021
@ddelgrosso1 @cojenco
fix: do not append duplicates to user agent string (googleapis#570)
c38c495
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
- [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/python-storage/issues/new/choose) before writing your code!  That way we can discuss the change, evaluate designs, and agree on the general idea
- [ ] Ensure the tests and linter pass
- [ ] Code coverage does not decrease (if any source code was changed)
- [ ] Appropriate docs were updated (if necessary)

Fixes googleapis#565 🦕
cojenco pushed a commit to cojenco/python-storage that referenced this pull request Oct 13, 2021
@release-please @cojenco
chore: release 1.42.1 (googleapis#549)
2d79155
🤖 I have created a release \*beep\* \*boop\*
---
### [1.42.1](https://www.github.com/googleapis/python-storage/compare/v1.42.0...v1.42.1) (2021-09-07)


### Bug Fixes

* do not append duplicates to user agent string ([googleapis#570](https://www.github.com/googleapis/python-storage/issues/570)) ([57cf3a1](https://www.github.com/googleapis/python-storage/commit/57cf3a1f27292939ed097ef8afa3f4392c4b83e0))


### Documentation

* pass explicit 'client' in '{Blob.Bucket}.from_string' examples ([googleapis#545](https://www.github.com/googleapis/python-storage/issues/545)) ([6eff22d](https://www.github.com/googleapis/python-storage/commit/6eff22db0e8c8689208ee52fa815f3ea00675094))
---


This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
cojenco pushed a commit to cojenco/python-storage that referenced this pull request Oct 13, 2021
@ddelgrosso1 @cojenco
fix: do not append duplicates to user agent string (googleapis#570)
6978d2e
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
- [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/python-storage/issues/new/choose) before writing your code!  That way we can discuss the change, evaluate designs, and agree on the general idea
- [ ] Ensure the tests and linter pass
- [ ] Code coverage does not decrease (if any source code was changed)
- [ ] Appropriate docs were updated (if necessary)

Fixes googleapis#565 🦕
cojenco pushed a commit to cojenco/python-storage that referenced this pull request Oct 13, 2021
@release-please @cojenco
chore: release 1.42.1 (googleapis#549)
7e5dfdb
🤖 I have created a release \*beep\* \*boop\*
---
### [1.42.1](https://www.github.com/googleapis/python-storage/compare/v1.42.0...v1.42.1) (2021-09-07)


### Bug Fixes

* do not append duplicates to user agent string ([googleapis#570](https://www.github.com/googleapis/python-storage/issues/570)) ([57cf3a1](https://www.github.com/googleapis/python-storage/commit/57cf3a1f27292939ed097ef8afa3f4392c4b83e0))


### Documentation

* pass explicit 'client' in '{Blob.Bucket}.from_string' examples ([googleapis#545](https://www.github.com/googleapis/python-storage/issues/545)) ([6eff22d](https://www.github.com/googleapis/python-storage/commit/6eff22db0e8c8689208ee52fa815f3ea00675094))
---


This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
@release-please release-please Bot mentioned this pull request Jan 12, 2022
chore(main): release 3.0.0 #688
Closed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

1 more reviewer
@tseaver tseaver tseaver approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

api: storage Issues related to the googleapis/python-storage API. cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Use of Batch adds duplicate, redundant gcloud-python/x.xx.x to User-Agent header in an unbounded fashion

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@ddelgrosso1 @tseaver @andrewsg @yoshi-kokoro @cojenco
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.