Skip to content

Conversation

@ricellis
Copy link
Member

@ricellis ricellis commented Oct 15, 2025

Checklist

  • Added tests for code changes or test/build only changes
  • Updated the change log file (CHANGES.md|CHANGELOG.md) or test/build only changes
  • Completed the PR template below:

Description

Add User-Agent header to requests.

Fixes #116

Approach

  • Update build.gradle to add com/ibm/cloud/cloudant/spring/boot/ package section with Implementation-Version property
  • Update CloudantFactory to construct and set the User-Agent header reading the version number from the com.ibm.cloud.cloudant.spring.boot package metadata.
  • Added src/main/java/com/ibm/cloud/cloudant/spring/boot/package-info.java (not sure this is strictly necessary, but it doesn't hurt either).
  • Update sample/build.gradle to correct issues observed when testing (repo ordering and Java compatibility)
  • Update secrets baseline for line number changes

Schema & API Changes

  • "No change"

Security and Privacy

  • "No change"

Testing

  • Added new tests:
    • src/test/java/unit/CloudantFactoryTest.java#testUserAgent()

Monitoring and Logging

  • "No change"

@ricellis ricellis self-assigned this Oct 15, 2025
@ricellis ricellis force-pushed the 116-user-agent branch 3 times, most recently from 67a10d0 to 71fb6dc Compare October 16, 2025 13:11
Copy link
Contributor

@mojito317 mojito317 left a comment

Choose a reason for hiding this comment

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

In the test we trust the System.getProperty methods (i.e. check the UA value with almost itself). I was wondering on a test case where System.getProperty methods are mocked, so this test would be more valuable. Other than that this looks good to me.

@ricellis ricellis merged commit 2f7046e into main Oct 20, 2025
4 checks passed
@ricellis ricellis deleted the 116-user-agent branch October 20, 2025 09:41
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.

Add User-Agent to cloudant-spring requests

2 participants