Skip to content

fix: refactor organization feature creation to use async/await for be…#876

Merged
nevil-mathew merged 1 commit into
developfrom
tenant-creation-fix
Mar 5, 2026
Merged

fix: refactor organization feature creation to use async/await for be…#876
nevil-mathew merged 1 commit into
developfrom
tenant-creation-fix

Conversation

@nevil-mathew

@nevil-mathew nevil-mathew commented Mar 5, 2026

Copy link
Copy Markdown
Collaborator

…tter readability

Summary by CodeRabbit

  • Refactor
    • Optimized internal organization feature creation flow for improved consistency and maintainability.

@coderabbitai

coderabbitai Bot commented Mar 5, 2026

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 263f6415-e630-46b6-93dd-6f3d5928758e

📥 Commits

Reviewing files that changed from the base of the PR and between 93ce352 and e08a3cd.

📒 Files selected for processing (1)
  • src/services/tenant.js

Walkthrough

Changed default org feature creation in src/services/tenant.js from concurrent Promise.all execution to sequential await-based loop iteration. Updated rollback handling to accommodate the new response structure with consistent per-feature deletion tracking.

Changes

Cohort / File(s) Summary
Sequential Feature Creation
src/services/tenant.js
Converted parallel Promise.all-based organization feature creation to sequential for-of loop with await, replacing orgFeatureCreationPromise with orgFeatureCreateResponse array. Updated rollback deletion logic to access feature.result fields from sequential responses.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 One hop, then another—no rush!
Sequential dreams in a methodical hush,
Where promises once scattered in flight,
Now await their turn, orderly and tight,
The rabbit refactors with patient delight. ✨

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch tenant-creation-fix

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


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.

@nevil-mathew
nevil-mathew merged commit 4991c25 into develop Mar 5, 2026
0 of 2 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.

1 participant