Skip to content

fix: docker properties file to use right format#142

Merged
sac2kadam merged 1 commit intomainfrom
fix-docker-properties
Mar 20, 2026
Merged

fix: docker properties file to use right format#142
sac2kadam merged 1 commit intomainfrom
fix-docker-properties

Conversation

@drtechie
Copy link
Member

@drtechie drtechie commented Mar 20, 2026

📋 Description

JIRA ID: AMM-1625

Change @@ variables to ${}

✅ Type of Change

  • 🐞 Bug fix (non-breaking change which resolves an issue)
  • New feature (non-breaking change which adds functionality)
  • 🔥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 🛠 Refactor (change that is neither a fix nor a new feature)
  • ⚙️ Config change (configuration file or build script updates)
  • 📚 Documentation (updates to docs or readme)
  • 🧪 Tests (adding new or updating existing tests)
  • 🎨 UI/UX (changes that affect the user interface)
  • 🚀 Performance (improves performance)
  • 🧹 Chore (miscellaneous changes that don't modify src or test files)

Summary by CodeRabbit

  • Chores
    • Normalized configuration file formatting by standardizing line endings and spacing for improved consistency.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 20, 2026

📝 Walkthrough

Walkthrough

Updated src/main/environment/common_docker.properties by normalizing line endings from Windows CRLF format to Unix LF format and adjusting minor spacing inconsistencies. No configuration keys, values, or functionality were altered.

Changes

Cohort / File(s) Summary
Configuration Normalization
src/main/environment/common_docker.properties
Whitespace and line-ending normalization; CRLF to LF conversion with minor spacing adjustments around property assignments. All configuration keys and values remain unchanged.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

A rabbit hops through whitespace clean,
Line endings fixed—a formatting dream,
CRLF to LF, the change so slight,
Properties aligned, everything right! 🐰✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix: docker properties file to use right format' accurately describes the main change: converting property variable interpolation format from @@...@@ to ${...} in the Docker properties configuration file.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-docker-properties
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud
Copy link

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/main/environment/common_docker.properties`:
- Line 31: The property feedAuthUserName is mapped to the wrong env var (uses
${FEED_AUTH_URL}); update the mapping so feedAuthUserName=${FEED_AUTH_USERNAME}
to match the credential pair (the corresponding password uses
${FEED_AUTH_PASSWORD})—edit the feedAuthUserName entry in
common_docker.properties to reference FEED_AUTH_USERNAME.
- Line 15: Replace the legacy MySQL driver class value for the
spring.datasource.driver-class-name property in all environment property files
(currently set to com.mysql.jdbc.Driver) with the Connector/J 8.x compatible
class com.mysql.cj.jdbc.Driver; update the occurrences in the files that contain
spring.datasource.driver-class-name to use com.mysql.cj.jdbc.Driver so
datasource initialization works with MySQL Connector/J 8.2.0.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 40280937-db2c-4c99-93b2-6e76ebfc2e9c

📥 Commits

Reviewing files that changed from the base of the PR and between 4404777 and 6b49d32.

📒 Files selected for processing (1)
  • src/main/environment/common_docker.properties

spring.datasource.url=${DATABASE_URL}
spring.datasource.username=${DATABASE_USERNAME}
spring.datasource.password=${DATABASE_PASSWORD}
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check configured MySQL connector dependency version and driver references.
fd -a "pom.xml" "build.gradle" "build.gradle.kts" | xargs -r rg -n -C2 'mysql-connector|mysql\.connector|com\.mysql\.jdbc\.Driver|com\.mysql\.cj\.jdbc\.Driver'

Repository: PSMRI/FHIR-API

Length of output: 220


🏁 Script executed:

#!/bin/bash
# Find build configuration files
echo "=== Searching for build configuration files ==="
fd "pom\.xml|build\.gradle" --type f

echo -e "\n=== Searching for MySQL connector dependency ==="
fd "pom\.xml|build\.gradle" --type f | xargs -r rg -n "mysql-connector|mysql\.connector"

echo -e "\n=== Searching for driver class references ==="
rg -n "com\.mysql\.(jdbc|cj\.jdbc)\.Driver" --type properties --type java --type gradle --type xml

Repository: PSMRI/FHIR-API

Length of output: 389


🏁 Script executed:

#!/bin/bash
# Get the MySQL connector version from pom.xml
echo "=== MySQL connector dependency details from pom.xml ==="
rg -A 3 -B 1 "mysql-connector-j" pom.xml

# Check the driver class in the properties file
echo -e "\n=== Driver class in common_docker.properties ==="
cat -n src/main/environment/common_docker.properties | grep -i driver

Repository: PSMRI/FHIR-API

Length of output: 440


🏁 Script executed:

#!/bin/bash
# Check for all references to MySQL driver classes in the codebase
echo "=== All references to MySQL driver classes ==="
rg "com\.mysql\.(jdbc|cj\.jdbc)\.Driver" -n

# Check if there are other properties files that might have the same issue
echo -e "\n=== Other properties files in environment config ==="
fd "\.properties$" src/main/environment/

Repository: PSMRI/FHIR-API

Length of output: 611


Update MySQL driver class in all environment property files for Connector/J 8.2.0 compatibility.

com.mysql.jdbc.Driver is incompatible with MySQL Connector/J 8.x. The project uses version 8.2.0, which requires com.mysql.cj.jdbc.Driver. Using the legacy driver class will cause datasource initialization failures at runtime.

This issue exists in three files:

  • src/main/environment/common_docker.properties (line 15)
  • src/main/environment/common_ci.properties (line 15)
  • src/main/environment/common_example.properties (line 16)
Proposed fix

Update all three files:

-spring.datasource.driver-class-name=com.mysql.jdbc.Driver
+spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/main/environment/common_docker.properties` at line 15, Replace the legacy
MySQL driver class value for the spring.datasource.driver-class-name property in
all environment property files (currently set to com.mysql.jdbc.Driver) with the
Connector/J 8.x compatible class com.mysql.cj.jdbc.Driver; update the
occurrences in the files that contain spring.datasource.driver-class-name to use
com.mysql.cj.jdbc.Driver so datasource initialization works with MySQL
Connector/J 8.2.0.

atomFeedURLPatientDemographic=/openmrs/ws/atomfeed/patient/
atomFeedURLPatientEncounter=/openmrs/ws/atomfeed/encounter/

feedAuthUserName=${FEED_AUTH_URL}
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify which env var is actually defined/used for feed auth username.
rg -n -C2 'feedAuthUserName|FEED_AUTH_URL|FEED_AUTH_USERNAME|feedAuthPassword' --type=properties --type=yaml --type=env --type=sh

Repository: PSMRI/FHIR-API

Length of output: 92


🏁 Script executed:

#!/bin/bash
# Search for references to feed auth variables across the entire repo
echo "=== Searching for feedAuthUserName ==="
rg -n 'feedAuthUserName' --no-heading

echo -e "\n=== Searching for FEED_AUTH_URL ==="
rg -n 'FEED_AUTH_URL' --no-heading

echo -e "\n=== Searching for FEED_AUTH_USERNAME ==="
rg -n 'FEED_AUTH_USERNAME' --no-heading

echo -e "\n=== Searching for feedAuthPassword ==="
rg -n 'feedAuthPassword' --no-heading

echo -e "\n=== Searching for FEED_AUTH in properties files ==="
find . -name "*.properties" -type f -exec grep -Hn "FEED_AUTH\|feedAuth" {} \;

Repository: PSMRI/FHIR-API

Length of output: 2715


feedAuthUserName is mapped to the wrong environment variable.

feedAuthUserName uses ${FEED_AUTH_URL} while the corresponding password field correctly uses ${FEED_AUTH_PASSWORD}. This mismatch causes authentication failures at runtime since a URL value will be injected where a username is expected. The property should map to ${FEED_AUTH_USERNAME} for consistency.

Proposed fix
-feedAuthUserName=${FEED_AUTH_URL}
+feedAuthUserName=${FEED_AUTH_USERNAME}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
feedAuthUserName=${FEED_AUTH_URL}
feedAuthUserName=${FEED_AUTH_USERNAME}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/main/environment/common_docker.properties` at line 31, The property
feedAuthUserName is mapped to the wrong env var (uses ${FEED_AUTH_URL}); update
the mapping so feedAuthUserName=${FEED_AUTH_USERNAME} to match the credential
pair (the corresponding password uses ${FEED_AUTH_PASSWORD})—edit the
feedAuthUserName entry in common_docker.properties to reference
FEED_AUTH_USERNAME.

@sac2kadam sac2kadam merged commit 731abd9 into main Mar 20, 2026
3 checks passed
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