Skip to content

Conversation

@SauravBizbRolly
Copy link
Contributor

@SauravBizbRolly SauravBizbRolly commented Sep 12, 2025

Reverts #40

Summary by CodeRabbit

  • Chores

    • Updated database connection environment mappings to standardized names, removed deprecated multi-datasource configurations, and cleaned up unused comments. This streamlines deployment and reduces configuration drift; no user-facing behavior changes.
  • Style

    • Minor whitespace formatting in a database migration script.

@coderabbitai
Copy link

coderabbitai bot commented Sep 12, 2025

Walkthrough

Updated CI environment variable bindings for identity data sources, removed multiple spring.datasource entries from application.properties, and made a whitespace-only tweak in a SQL migration file. No functional code changes or new features added.

Changes

Cohort / File(s) Summary of changes
CI env var remap (identity DS)
src/main/environment/common_ci.properties
Remapped dbidentity and 1097_Identity JDBC URL/username/password placeholders to new environment variable names; driver and property keys unchanged.
App properties cleanup (datasources removed)
src/main/resources/application.properties
Deleted spring.datasource properties (URL, username, password, driver) for IEMR, IDENTITY, REPORTING, and 1097_IDENTITY; removed a db_reporting comment. No additions.
SQL formatting (whitespace)
src/main/resources/db/migration/dbiemr/V3__DB_IEMR.sql
Inserted a blank line between comment header and CREATE TABLE; no schema or logic changes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • drtechie
  • ravishanigarapu

Pre-merge checks (3 passed)

✅ 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 "Revert "Update ci file"" succinctly and accurately describes the PR's main purpose—reverting a prior CI-related update; this aligns with the PR objectives (it reverts PR #40) and the raw_summary showing undoing of CI environment property mappings and application.properties changes.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.

Poem

I twitch my whiskers, configs align,
Old keys hop out, new envs combine.
A silent line in SQL’s glade—
Just space where table plans are laid.
With tidy burrows, I’m CI-ready,
Thump-thump: pipelines steady. 🐇

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.

✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch revert-40-update_ci_file

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

@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: 3

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 083d15f and 5855c96.

📒 Files selected for processing (3)
  • src/main/environment/common_ci.properties (2 hunks)
  • src/main/resources/application.properties (0 hunks)
  • src/main/resources/db/migration/dbiemr/V3__DB_IEMR.sql (1 hunks)
💤 Files with no reviewable changes (1)
  • src/main/resources/application.properties
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Analyze (java)

Comment on lines +8 to +10
spring.datasource.dbidentity.jdbc-url=@env.IDENTITY_DATABASE_URL@
spring.datasource.dbidentity.username=@env.IDENTITY_DATABASE_USERNAME@
spring.datasource.dbidentity.password=@env.IDENTITY_DATABASE_PASSWORD@
Copy link

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

This does not look like a true “revert”; revert env placeholders for dbidentity.

Revert to the previous placeholders to match the PR intent and avoid breaking CI secrets mapping.

-spring.datasource.dbidentity.jdbc-url=@env.IDENTITY_DATABASE_URL@
-spring.datasource.dbidentity.username=@env.IDENTITY_DATABASE_USERNAME@
-spring.datasource.dbidentity.password=@env.IDENTITY_DATABASE_PASSWORD@
+spring.datasource.dbidentity.jdbc-url=@env.DATABASE_IDENTITY_URL@
+spring.datasource.dbidentity.username=@env.DATABASE_IDENTITY_USERNAME@
+spring.datasource.dbidentity.password=@env.DATABASE_IDENTITY_PASSWORD@

To verify current usage and avoid regressions, run:


🏁 Script executed:

#!/bin/bash
# List all env placeholders referenced in env/ and resources/ to check consistency.
fd -t f . | rg -nP '@env\.[A-Z0-9_\.]+@' -C1

# Sanity check for placeholders starting with a digit (often invalid in CI/OS envs).
rg -nP '@env\.[0-9][A-Z0-9_]*@' src || true

Length of output: 369


Remove accidental "1097" prefix and restore non-numeric env placeholders

src/main/environment/common_ci.properties:20-22 contain an accidental "1097" insertion in both the property names and env placeholders (e.g. spring.datasource.db1097identity.jdbc-url=@env.1097_IDENTITY_DATABASE_URL@). Leading-digit env placeholders will break CI/OS env mapping and the property keys are malformed — restore to spring.datasource.dbidentity.* and use non-numeric env placeholders (no leading digit) to match CI secrets.

🤖 Prompt for AI Agents
In src/main/environment/common_ci.properties around lines 8 to 10, remove the
accidental "1097" insertion from both the property keys and the env placeholders
so the properties read spring.datasource.dbidentity.jdbc-url,
spring.datasource.dbidentity.username, and
spring.datasource.dbidentity.password, and update the placeholders to
non-numeric forms @env.IDENTITY_DATABASE_URL@, @env.IDENTITY_DATABASE_USERNAME@,
and @env.IDENTITY_DATABASE_PASSWORD@ so CI/OS env mapping and property keys are
valid.

Comment on lines +20 to +22
spring.datasource.db1097identity.jdbc-url=@env.1097_IDENTITY_DATABASE_URL@
spring.datasource.db1097identity.username=@env.1097_IDENTITY_DATABASE_USERNAME@
spring.datasource.db1097identity.password=@env.1097_IDENTITY_DATABASE_PASSWORD@
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

⚠️ Potential issue

Env var names start with a digit; likely invalid across shells/CI. Revert 1097 identity placeholders.

Most environments disallow variable names beginning with a digit. The previous form (DATABASE_1097_…) is safer and aligns with the stated “revert”.

-spring.datasource.db1097identity.jdbc-url=@env.1097_IDENTITY_DATABASE_URL@
-spring.datasource.db1097identity.username=@env.1097_IDENTITY_DATABASE_USERNAME@
-spring.datasource.db1097identity.password=@env.1097_IDENTITY_DATABASE_PASSWORD@
+spring.datasource.db1097identity.jdbc-url=@env.DATABASE_1097_IDENTITY_URL@
+spring.datasource.db1097identity.username=@env.DATABASE_IDENTITY_USERNAME@
+spring.datasource.db1097identity.password=@env.DATABASE_IDENTITY_PASSWORD@

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In src/main/environment/common_ci.properties lines 20-22, the env placeholder
names start with a digit (1097) which is invalid in many shells/CI; revert them
to the previous safe form that begins with "DATABASE_1097_". Replace the three
placeholders so they start with DATABASE_1097_ (for example:
@env.DATABASE_1097_IDENTITY_DATABASE_URL@,
@env.DATABASE_1097_IDENTITY_DATABASE_USERNAME@,
@env.DATABASE_1097_IDENTITY_DATABASE_PASSWORD@) so CI/shell env vars do not
begin with a digit.

-- Table structure for table `asha_profile`
--


Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Do not modify applied Flyway versioned migrations; revert the whitespace change.

Even a blank line alters the checksum of a versioned migration (V3__), causing Flyway validation failures in any environment where V3 was previously applied. Restore the exact original bytes.

Apply this diff:

- 
📝 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
🤖 Prompt for AI Agents
In src/main/resources/db/migration/dbiemr/V3__DB_IEMR.sql around line 11, a
whitespace/blank-line change was introduced that alters the file checksum and
breaks Flyway validation; revert that change by restoring the file to its exact
original bytes (remove the added blank line or whitespace at line 11), or
restore the file from the previous commit/original V3 migration source so the
checksum matches the applied migration.

@drtechie
Copy link
Member

@SauravBizbRolly is this PR still valid?
Also can we ensure these env changes are done in docker properties too?

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