-
Notifications
You must be signed in to change notification settings - Fork 95
feat(payments-gateway): DOMA-12604 create miniapp #6958
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
base: main
Are you sure you want to change the base?
Conversation
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. WalkthroughAdds a payments-gateway service: registers it as a git submodule, updates werf to build a payments_gateway image, extends CI detect-changes and adds a gated payments-gateway test job, and adds WERF_SET_CI_PAYMENTS_GATEWAY_URL to deploy workflows. Changes
Sequence Diagram(s)sequenceDiagram
participant Detect as detect-changes
participant CI as GitHub Actions
participant Registry as Container Registry
participant DB as Postgres/Redis
participant App as payments-gateway
participant Tests as Test runner
rect rgb(233,245,233)
Detect->>CI: emit outputs (payments-gateway changed)
CI->>CI: if payments-gateway output == 'true'
CI->>Registry: docker login / pull base images
CI->>DB: start Postgres & Redis services
CI->>App: prepare, build, and start payments-gateway
CI->>App: wait for readiness
CI->>Tests: run tests against payments-gateway
Tests-->>CI: test results
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (7)
🚧 Files skipped from review as they are similar to previous changes (5)
🧰 Additional context used🧠 Learnings (1)📚 Learning: 2025-06-06T08:38:31.213ZApplied to files:
⏰ 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). (9)
🔇 Additional comments (5)
Tip 📝 Customizable high-level summaries are now available in beta!You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.
Example instruction:
Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later. 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. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| WERF_SET_CI_POS_INTEGRATION_URL: "global.ci_pos_integration_url=pos-integration.doma.ai" | ||
| WERF_SET_CI_ACCRUALS_GATEWAY_URL: "global.ci_accruals_gateway_url=accruals-gateway.doma.ai" | ||
| WERF_SET_CI_PROPERTY_AI_ASSISTANT_URL: "global.ci_property_ai_assistant_url=property-ai-assistant.doma.ai" | ||
| WERF_SET_CI_PAYMENTS_GATEWAY_URL: "global.ci_payments_gateway_url=payments-gateway.d.doma.ai" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Point payments gateway URL to production host
In deploy_production.yaml the production deployment exports WERF_SET_CI_PAYMENTS_GATEWAY_URL as payments-gateway.d.doma.ai, which is the development domain pattern, while every other production URL in this job uses the .doma.ai host. When the production workflow runs, it will bake a dev gateway URL into the release values, causing production pods to call the development payments gateway.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
.github/workflows/nodejs.condo.ci.yml (1)
618-668: Payments-gateway test job properly configured with minor version inconsistency.The new run-payments-gateway-tests job follows the standard test job template with all necessary steps (login, DB setup, app preparation, migration checks, tests). The job structure and logic are sound.
However, line 628 uses
docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef(pinned SHA), which matches the accruals-gateway job (line 732) but diverges from most other test jobs like pos-integration (line 680) that use@v3. Consider standardizing the action version across all test jobs for consistency and maintainability.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
yarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (7)
.github/workflows/deploy_development.yaml(1 hunks).github/workflows/deploy_production.yaml(1 hunks).github/workflows/nodejs.condo.ci.yml(3 hunks).gitmodules(1 hunks).helm(1 hunks)apps/payments-gateway(1 hunks)werf.yaml(1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-06-06T08:38:31.213Z
Learnt from: tolmachev21
Repo: open-condo-software/condo PR: 6268
File: .github/workflows/nodejs.condo.ci.yml:557-559
Timestamp: 2025-06-06T08:38:31.213Z
Learning: In the external-api test job in .github/workflows/nodejs.condo.ci.yml, the external-api workspace does not need to be explicitly prepared with `node bin/prepare.js -f` unlike other workspaces like meter-importer, dev-portal-api, etc.
Applied to files:
.github/workflows/nodejs.condo.ci.yml
📚 Learning: 2025-07-18T09:11:21.889Z
Learnt from: YEgorLu
Repo: open-condo-software/condo PR: 6410
File: .github/workflows/deploy_development.yaml:68-68
Timestamp: 2025-07-18T09:11:21.889Z
Learning: In the open-condo-software/condo repository, Helm templates are stored externally (not in the repository's .helm/ directory which is empty). The WERF_SET_CI_* environment variables in .github/workflows/deploy_development.yaml are used by Werf to pass configuration values to external Helm templates during deployment.
Applied to files:
.github/workflows/deploy_production.yaml.github/workflows/deploy_development.yaml
⏰ 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: Build Docker Image
🔇 Additional comments (8)
apps/payments-gateway (1)
1-1: Submodule configuration verified and properly integrated.All verification checks pass:
- ✓
.gitmodulesis correctly configured with the payments-gateway submodule- ✓
werf.yamlincludes proper build steps for the payments-gateway service (lines 1237, 1270-1271)- ✓ Commit hash is valid and accessible (supported by recent feature commits)
- ✓ No merge conflicts detected
- ✓ Infrastructure changes are properly aligned with the submodule addition
The submodule is correctly added as a new entry to the repository's build system.
.github/workflows/deploy_development.yaml (1)
78-78: Add payments-gateway URL configuration — approval pending verification.The new environment variable follows the established pattern for service URL configuration and integrates smoothly into the existing Werf deployment setup. The naming convention, URL format, and logical placement are all consistent with the other WERF_SET_CI_* variables.
Before merge, please confirm:
- Production parity: Does
.github/workflows/deploy_production.yamlcontain a corresponding change with the same variable name (adjusted with the production environment's domain if applicable)?- Helm template support: Are the external Helm templates configured to accept and use the
global.ci_payments_gateway_urlvariable during deployment?- Service accessibility: Is the payments-gateway service accessible at
payments-gateway.d.doma.aiin the development environment?Based on learnings, WERF_SET_CI_* variables are passed to external Helm templates, so template support is critical for this configuration to be applied correctly.
.helm (1)
1-1: Verify submodule commit and alignment with PR objectives.The submodule pointer has been updated to a new commit. Confirm that:
- The new commit hash (
7fc9cad8546e99a7280ff7742be9df11d167cdfa) exists in the.helmsubmodule repository- The commit contains changes that align with the PR objectives for payments-gateway integration (e.g., helm chart updates for the new service)
- The update is synchronized with related changes in
.gitmodules,werf.yaml, CI/CD workflows, and theapps/payments-gatewaysubmodule pointer.gitmodules (1)
79-81: Submodule entry correctly configured.The payments-gateway submodule registration follows the established pattern and is syntactically correct.
.github/workflows/deploy_production.yaml (1)
85-85: Verify production URL subdomain configuration for payments-gateway.The environment variable uses
payments-gateway.d.doma.ai(with.d.subdomain), whereas accruals-gateway usesaccruals-gateway.doma.ai(line 83). Confirm whether the.d.subdomain is intentional for this service in production or if it should match the accruals-gateway pattern for consistency.werf.yaml (1)
1236-1277: Werf image configuration properly integrated.The payments_gateway image block is correctly structured, mirroring the established pattern (consistent with accruals_gateway). All required sections are present and properly configured for the Node.js monorepo build system.
.github/workflows/nodejs.condo.ci.yml (2)
141-141: Output entry correctly added to detect-changes job.The payments-gateway output follows the established naming and format convention.
192-194: Path filter configuration aligns with architectural intent.The payments-gateway path filter correctly includes
apps/payments-gateway/**andapps/condo/domains/acquiring/**, mirroring the accruals-gateway filter. This is appropriate given both services handle acquiring/payment-related functionality.
141520a to
7b23425
Compare
|



Summary by CodeRabbit
New Features
Chores
✏️ Tip: You can customize this high-level summary in your review settings.