Skip to content

Moving USER_AGENT_SUFFIX value to the end of the user agent #801

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

Merged
merged 1 commit into from
Nov 6, 2018

Conversation

varunnvs92
Copy link
Contributor

No description provided.

@@ -83,6 +79,11 @@ private String getUserAgent(SdkClientConfiguration config, List<ApiName> request
userAgent.append(SPACE).append(requestUserAgent);
}

// Note: This should be at the end of user agent
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we move it to a method, something like appendUserDefinedSuffix? Can we also add a test for it (rather than relying on the note)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I moved it to a different method. I can't think of a test that can catch these issues reliably. If we decide to include new config options in user agent, any test we write now can't take the future variables into account.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The other option is to create an new ApplyUserAgentSuffixStage. I prefer to keep all user agent related changes in single class. But I am okay with splitting too if we decide so.

Copy link
Contributor

Choose a reason for hiding this comment

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

A new ApplyUserAgentSuffixStage seems a bit overkill. Keeping it as it is looks good to me.

@millems millems merged commit c15e158 into master Nov 6, 2018
@varunnvs92 varunnvs92 deleted the FixUserAgentSuffix branch November 6, 2018 20:31
aws-sdk-java-automation added a commit that referenced this pull request Apr 16, 2020
…1bc0e407

Pull request: release <- staging/73d90b43-0cdd-4821-9e27-23151bc0e407
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.

3 participants