Fix --relatives bug to generate distinct org_ids per relative - #172
Conversation
The _get_relatives() method was incorrectly creating the same org_id for all relatives by calling self._get_account() once outside the loop and reusing the value. This caused all hosts to be associated with the same organization regardless of the --relatives parameter value. Fixed by moving self._get_account() calls inside the list comprehension so each relative gets a unique org_id, enabling proper multi-tenant performance testing scenarios. Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
| { | ||
| "account": common_acc_orgid, | ||
| "orgid": common_acc_orgid, | ||
| "account": self._get_account(), |
There was a problem hiding this comment.
This way "account" and "orgid" will be different. I do not see a problem with current code.
Calling _get_account() twice per relative could mismatch account and org_id; generate once and reuse so multi-tenant host distribution works. Co-authored-by: Cursor <cursoragent@cursor.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe inventory ingress generator now creates a separate account, organization ID, satellite ID, and satellite instance ID for each relative when account data is absent. ChangesInventory relative generation
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
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 |
|
Thank you! |
The _get_relatives() method was incorrectly creating the same org_id for all relatives by calling self._get_account() once outside the loop and reusing the value. This caused all hosts to be associated with the same organization regardless of the --relatives parameter value.
Fixed by moving self._get_account() calls inside the list comprehension so each relative gets a unique org_id, enabling proper multi-tenant performance testing scenarios.