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

Version 1.0.465 removed addUserAgentInfo from ServiceClient which is a breaking change #276

Closed
sgellock opened this issue Nov 17, 2018 · 7 comments
Assignees
Milestone

Comments

@sgellock
Copy link

We generated code using 1.0.455. This generated code is crashing when our customers install botbuilder, as pulls in the 1.0.465.

Looks like this method was removed with the following commit:
523b891#diff-3b5c4e8e88ea4820a88a9584a654fe8cL144

Expected behavior
Following semver rules, patch versions should not be breaking.

@ghost
Copy link

ghost commented Nov 19, 2018

Hi sgellock.
Yes, this was a mistake on our side. We were under the impression that the addUserAgentInfo() method was only called internally.
If you are interested in changing the user agent that a ServiceClient adds to outgoing requests, then I recommend using the ServiceClientOptions.userAgent property.
If you don't care about changing the user agent header, then I'd recommend running "autorest --reset" and then trying to regenerate. I just updated the latest version of our TypeScript generator and that should solve the problem.

@ghost ghost self-assigned this Nov 19, 2018
@ghost
Copy link

ghost commented Nov 19, 2018

Related to Azure/autorest.typescript#386.

@ghost
Copy link

ghost commented Nov 26, 2018

@sgellock Did my previous comment solve the problem for you?

@sgellock
Copy link
Author

sgellock commented Nov 27, 2018 via email

@ghost
Copy link

ghost commented Nov 29, 2018

I'm going to close this issue. Feel free to reopen if my proposed solution doesn't work.

@tomlm
Copy link

tomlm commented Jan 15, 2019

This is not a solution because it BREAKS existing clients that depend on this library.

you can't do this, it is unprofessional. If you are going to break it you need to do a major version change.

@ghost
Copy link

ghost commented Jan 15, 2019

For future references, in #313 we changed ServiceClientOptions.userAgent to be either a string or a function that takes in the defaultUserAgent string and then returns the string that the ServiceClient will use. This should enable previous scenarios where people simply wanted to append to the existing user-agent string, and it should also enable other scenarios too (prepending, inserting, or whatever else someone wants to do with the defaultUserAgent string).

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants