Skip to content

Conversation

@eschultink
Copy link
Member

@eschultink eschultink commented Apr 8, 2025

Features

  • improve User-Agent string sent to API servers

Change implications

  • dependencies added/changed? no
  • something important to note in future release notes? no

@eschultink eschultink self-assigned this Apr 8, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

@NoArgsConstructor(onConstructor_ = @Inject)
@Log
public class HealthCheckRequestHandler {

Copy link

Copilot AI Apr 8, 2025

Choose a reason for hiding this comment

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

Since JAVA_SOURCE_CODE_VERSION is now public and used to build the User-Agent string, consider updating its Javadoc to indicate its intended external use.

Suggested change
/**
* The version of the Java source code.
* This constant is used to build the User-Agent string and is intended for external use.
*/

Copilot uses AI. Check for mistakes.
}

private String getProxyUserAgentString() {
//q: something better here? pass through the actual client's User-Agent value??
Copy link

Copilot AI Apr 8, 2025

Choose a reason for hiding this comment

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

[nitpick] Remove or clarify the commented question to avoid confusion; if it's a placeholder for future work, consider adding a TODO with clear context.

Suggested change
//q: something better here? pass through the actual client's User-Agent value??
//TODO: Consider passing through the actual client's User-Agent value for better accuracy.

Copilot uses AI. Check for mistakes.

private String getProxyUserAgentString() {
//q: something better here? pass through the actual client's User-Agent value??
return "Psoxy/" + HealthCheckRequestHandler.JAVA_SOURCE_CODE_VERSION + " (API Data Sanitization; Java/" + System.getProperty("java.version", "unknown") + ")";
Copy link
Contributor

Choose a reason for hiding this comment

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

probably this can be static; so no need to calculate this again and again for each request

@eschultink eschultink marked this pull request as ready for review April 22, 2025 17:55
ComposedHttpRequestInitializer initializer =
ComposedHttpRequestInitializer.of(initializeWithCredentials,
new GzipedContentHttpRequestInitializer("Psoxy"));
new GzipedContentHttpRequestInitializer(getProxyUserAgentString()));
Copy link
Member

Choose a reason for hiding this comment

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

Base automatically changed from rc-v0.5.2 to main May 15, 2025 10:36
@eschultink eschultink changed the base branch from main to rc-v0.5.3 May 15, 2025 14:37
Base automatically changed from rc-v0.5.3 to main June 23, 2025 09:41
@eschultink eschultink changed the base branch from main to rc-v0.5.4 June 23, 2025 17:28
Base automatically changed from rc-v0.5.4 to main July 18, 2025 23:44
@eschultink eschultink changed the base branch from main to rc-v0.5.5 July 20, 2025 19:15
Base automatically changed from rc-v0.5.5 to main August 4, 2025 22:44
@eschultink eschultink changed the base branch from main to rc-v0.5.6 August 5, 2025 14:46
Base automatically changed from rc-v0.5.6 to main August 22, 2025 17:05
@eschultink eschultink changed the base branch from main to rc-v0.5.7 August 22, 2025 19:43
Base automatically changed from rc-v0.5.7 to main September 5, 2025 21:04
@eschultink eschultink changed the base branch from main to rc-v0.5.8 September 9, 2025 17:15
Base automatically changed from rc-v0.5.8 to main September 9, 2025 19:39
@eschultink eschultink changed the base branch from main to rc-v0.5.9 September 9, 2025 21:10
Base automatically changed from rc-v0.5.9 to main September 12, 2025 19:46
@eschultink eschultink changed the base branch from main to rc-v0.5.10 September 15, 2025 17:28
@eschultink eschultink deleted the branch rc-v0.5.15 October 2, 2025 16:04
@eschultink eschultink closed this Oct 2, 2025
@eschultink eschultink reopened this Oct 2, 2025
Base automatically changed from rc-v0.5.10 to main October 8, 2025 08:41
@eschultink eschultink changed the base branch from main to rc-v0.5.11 October 8, 2025 18:31
Base automatically changed from rc-v0.5.11 to main October 28, 2025 18:08
@eschultink eschultink changed the base branch from main to rc-v0.5.12 October 28, 2025 21:34
Base automatically changed from rc-v0.5.12 to main November 12, 2025 16:19
@eschultink eschultink changed the base branch from main to rc-v0.5.13 November 12, 2025 19:21
Base automatically changed from rc-v0.5.13 to main November 17, 2025 18:49
@eschultink eschultink changed the base branch from main to rc-v0.5.14 November 17, 2025 20:36
Base automatically changed from rc-v0.5.14 to main December 2, 2025 16:39
@eschultink eschultink changed the base branch from main to rc-v0.5.15 December 2, 2025 16:48
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.

4 participants