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

[Attestation] Fix a duplication issue in user-agent string #16625

Closed

Conversation

deyaaeldeen
Copy link
Member

Related to #16623 and Azure/autorest.typescript#1125

The user-agent header attestation sends with their requests: "user-agent":"azsdk-js-api-security-attestation/1.0.0 azsdk-js-attestation/1.0.0 core-rest-pipeline/1.1.2 Node/v14.17.0 OS/(x64-Linux-5.10.16.3-microsoft-standard-WSL2)" and you can notice that attestation version comes up twice.

This PR fixes this issue by

  • removing the logic to set the user agent in the clients constructor so that the user agent is only set in the auto-generated context class.
  • factoring out the version string in the context class to its own variable and add that to the constantsPath list in package.json so the post-release bot can update it.
  • add the package-version variable in swagger/README.md to the constantsPath list in package.json so the post-release bot can update it.

@deyaaeldeen
Copy link
Member Author

Closing in favor of #16619.

@deyaaeldeen deyaaeldeen deleted the attestation/cleanup-constants branch July 28, 2021 22:34
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.

1 participant