Conversation
Diff Coverage
|
📝 WalkthroughWalkthroughCaching functionality is integrated into the REST API migration flow in Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Tip Issue Planner is now in beta. Read the docs and try it out! 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. Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
apps/sage_intacct/helpers.py (1)
162-167:⚠️ Potential issue | 🟡 MinorCache won't be set if
sync_dimensionsraises.The DB is updated on lines 162–165, but if
sync_dimensionson line 166 throws before line 167 executes, the cache is never populated. On subsequent calls,validate_rest_api_connectionreturns early at line 156 (DB already says migrated), so this code path won't be re-entered to set the cache.Consider moving the
cache.setcall beforesync_dimensions:Proposed fix
FeatureConfig.objects.filter(workspace_id=workspace_id, migrated_to_rest_api=False).update( migrated_to_rest_api=True, updated_at=datetime.now(timezone.utc) ) + cache.set(CacheKeyEnum.FEATURE_CONFIG_MIGRATED_TO_REST_API.value.format(workspace_id=workspace_id), True, 172800) sync_dimensions(workspace_id=workspace_id) - cache.set(CacheKeyEnum.FEATURE_CONFIG_MIGRATED_TO_REST_API.value.format(workspace_id=workspace_id), True, 172800)
No description provided.