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

Add User-agent for repo-plugins api calls (#2722) #2731

Merged
merged 1 commit into from Jan 16, 2024
Merged

Conversation

moleske
Copy link
Member

@moleske moleske commented Jan 9, 2024

  • Add user agent info for plugin api calls

  • Remove comment

  • Edit error message

  • Use same user agent as api/plugin/client.go

  • would be nice to use command.config but we couldn't see an easy way to thread it
  • Add test
  • The reason it is checking NotTo(Equal(...)) is because the default user agent "Go-http-client/1.1" is being blocked by the webserver
  • Clean up deprecation and some warnings and regenerate fake_plugin_repo as we made changes

Thank you for contributing to the CF CLI! Please read the following:

cherry-pick of #2722

  • Please make sure you have implemented changes in line with the contributing guidelines
  • We're not allowed to accept any PRs without a signed CLA, no matter how small.
    If your contribution falls under a company CLA but your membership is not public, expect delays while we confirm.
  • All new code requires tests to protect against regressions.
  • Contributions must be made against the appropriate branch. See the contributing guidelines
  • Contributions must conform to our style guide. Please reach out to us if you have questions.

Where this PR should be backported?

  • main - all changes should by default start here
  • v8
  • v7

Description of the Change

We must be able to understand the design of your change from this description.
Keep in mind that the maintainer reviewing this PR may not be familiar with or
have worked with the code here recently, so please walk us through the concepts.

Why Is This PR Valuable?

What benefits will be realized by the code change? What users would want this change? What user need is this change addressing?

Applicable Issues

List any applicable GitHub Issues here

How Urgent Is The Change?

Is the change urgent? If so, explain why it is time-sensitive.

Other Relevant Parties

Who else is affected by the change?

* Add user agent info for plugin api calls

* Remove comment

* Edit error message

* Use same user agent as api/plugin/client.go

- would be nice to use command.config but we couldn't see an easy way to thread it

Co-authored-by: david alvarado <alvaradoda@vmware.com>

* Add test

- The reason it is checking NotTo(Equal(...)) is because the default user agent "Go-http-client/1.1" is being blocked by the webserver

Co-authored-by: david alvarado <alvaradoda@vmware.com>

* Clean up deprecation and some warnings and regenerate fake_plugin_repo as we made changes

---------

Co-authored-by: M. Oleske <moleske@pivotal.io>
Co-authored-by: david alvarado <alvaradoda@vmware.com>
Co-authored-by: Al Berez <a-b@users.noreply.github.com>
@moleske moleske mentioned this pull request Jan 10, 2024
4 tasks
@moleske moleske merged commit 2aecb3c into v8 Jan 16, 2024
13 checks passed
@moleske moleske deleted the fix-repo-plugins-v8 branch January 16, 2024 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants