Skip to content

chore: migrate soap api orgs to rest api#917

Merged
Hrishabh17 merged 6 commits intomasterfrom
rest-migration-v2
Feb 10, 2026
Merged

chore: migrate soap api orgs to rest api#917
Hrishabh17 merged 6 commits intomasterfrom
rest-migration-v2

Conversation

@Hrishabh17
Copy link
Member

No description provided.

@github-actions github-actions bot added the size/S Small PR label Feb 10, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 10, 2026

📝 Walkthrough

Walkthrough

A new helper validate_rest_api_connection(workspace_id: int) -> None was added in apps/sage_intacct/helpers.py. It checks REST API connectivity by instantiating SageIntacctRestConnector, attempts a call to connection.locations.count(), and on success marks the workspace as migrated in FeatureConfig and triggers sync_dimensions. Calls to this validator were added at the start of initiate_import_to_fyle and inside check_interval_and_sync_dimension. BRAND_ID was introduced in pipeline env for the API service and imports were consolidated.

Poem

🔌 A tiny check before the sync takes flight,
Connections probed in the dim morning light,
Flags flipped true, dimensions begin to run,
A whisper of REST and a job smoothly done,
🚀 Code and data waltz until the day is bright.

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description check ⚠️ Warning No pull request description was provided, missing required sections for context and motivation. Add a description following the template with explanation of the migration approach and ClickUp link for tracking.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: migrating SOAP API organizations to REST API by adding validation and configuration for REST API connectivity.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

Coverage

Coverage Report
FileStmtsMissCoverMissing
apps
   exceptions.py471177%27, 33, 39–44, 50, 56–61, 67, 73, 79–80
apps/fyle
   actions.py124794%214, 263, 319–323
   constants.py10100% 
   helpers.py2351494%50–57, 66, 376, 470, 477–480, 483–484
   models.py3382194%315–317, 321–323, 327–329, 333–335, 339–341, 345–347, 408, 530–551, 574, 591
   queue.py500100% 
   serializers.py410100% 
   signals.py35683%22, 55–56, 69–71
   tasks.py5468784%132, 143–144, 147–148, 151–152, 174–175, 231–251, 263–268, 311–314, 339–343, 353–361, 400–410, 525–585, 906–910, 1048, 1059–1060, 1085–1086
   views.py1721591%84–91, 145, 245–246, 290–291, 316–320, 413–417
apps/internal
   actions.py39295%31–32
   helpers.py361364%18–35
   serializers.py300100% 
   tasks.py923265%35–39, 66–71, 116, 128–179
   views.py83199%39
apps/internal/services
   e2e_setup.py590100% 
   fixture_factory.py59395%218–220
apps/mappings
   constants.py20100% 
   exceptions.py71692%69–71, 79–81
   helpers.py86298%93, 163
   models.py500100% 
   schedules.py150100% 
   serializers.py100100% 
   signals.py1111487%90–92, 127, 179–184, 190–194, 200–203, 209–210
   tasks.py1792984%118–119, 142–143, 146, 210–227, 255, 258, 261, 267, 270, 276, 316–318, 329, 407
   utils.py340100% 
   views.py46491%34–35, 114–115
apps/sage_intacct
   actions.py29486%21–22, 49–50
   connector.py8471998%142, 318, 330, 336, 412, 1489, 1788, 1916–1917, 1984–1985, 2021–2022, 2052–2053, 2120–2121, 2156–2157
   dependent_fields.py2904286%345, 381–384, 413–422, 424–425, 427–429, 431–432, 434–435, 437–438, 442–444, 488, 508, 548–550, 596–598, 646–652, 656–657
   enums.py250100% 
   helpers.py68691%58, 96, 151, 155–160
   models.py9886793%78–79, 264–275, 405, 412, 456, 477–494, 567, 579, 629, 635, 670, 720–722, 736–749, 760, 796, 848–849, 949, 990, 1219, 1314–1317, 1361, 1363, 1455, 1559–1602, 1700, 1727, 1838, 2213–2215, 2277
   queue.py1711691%45, 53, 58, 105, 130–133, 173, 187, 205–208, 243, 267–270, 305, 330–333
   serializers.py350100% 
   tasks.py143314490%105, 119, 152, 188–189, 193–196, 198, 201, 251, 286–287, 407–408, 414, 417, 460–461, 502–507, 572, 578, 586, 765–766, 786–789, 860–861, 884, 899, 904, 909, 916, 922, 925–927, 930–933, 936–938, 966, 1019–1020, 1101–1102, 1106, 1127, 1161, 1261–1262, 1338–1339, 1341, 1496–1497, 1586–1587, 1590, 1611, 1626, 1632, 1638, 1645, 1651, 1654–1656, 1659–1662, 1665–1667, 1694, 1839, 1851–1860, 1902, 1905–1910, 1913–1917, 2086–2090, 2189–2190, 2396–2406, 2409, 2418–2423, 2457–2459, 2493–2496, 2564–2568, 2577, 2666–2671, 2684, 2699, 2714
   utils.py9103396%742–746, 891, 1210, 1226–1232, 1241–1242, 1983–1987, 2030–2034, 2077–2081, 2125–2129, 2199–2203, 2224, 2233, 2242, 2251–2252
   views.py1453377%127–129, 134–135, 141–142, 185–188, 258–288, 299–314, 327–331
apps/sage_intacct/errors
   errors.py20100% 
   helpers.py47198%80
apps/sage_intacct/exports
   ap_payments.py130100% 
   bills.py280100% 
   charge_card_transactions.py220100% 
   expense_reports.py280100% 
   helpers.py56296%68, 141
   journal_entries.py76889%177–180, 316–319
   reimbursements.py130100% 
apps/tasks
   models.py700100% 
   serializers.py60100% 
   views.py370100% 
apps/users
   helpers.py120100% 
   models.py530100% 
   views.py170100% 
apps/workspaces
   actions.py46980%65, 84–85, 103, 122–133, 147
   enums.py920100% 
   helpers.py80100% 
   models.py1760100% 
   permissions.py34974%33, 59–67
   serializers.py43198%54
   signals.py310100% 
   system_comments.py190100% 
   tasks.py175995%53–59, 187–194, 235, 267–268, 379
   utils.py90100% 
   views.py329997%110–112, 139–142, 702–703
apps/workspaces/apis/advanced_settings
   serializers.py80396%260, 263, 266
   triggers.py100100% 
   views.py110100% 
apps/workspaces/apis/errors
   serializers.py200100% 
   views.py150100% 
apps/workspaces/apis/export_settings
   helpers.py730100% 
   serializers.py103397%267, 270, 273
   triggers.py56296%33–34
   views.py110100% 
apps/workspaces/apis/import_settings
   serializers.py1411887%232–238, 243–249, 257–265, 283, 286, 314, 317–318, 326
   triggers.py47198%31
   views.py330100% 
fyle_integrations_imports
   dataclasses.py310100% 
   models.py230100% 
   queues.py34585%24, 99, 136, 148–149
   signals.py100100% 
   tasks.py1278136%69–111, 120–126, 139–208, 212–227, 252–255, 257, 259, 264
fyle_integrations_imports/modules
   base.py1881095%75, 91–92, 95, 126, 230–231, 237–238, 351
   categories.py1773381%80, 96, 99–100, 103–104, 272–273, 283, 296, 298, 342, 351–355, 364–410
   cost_centers.py961288%132–133, 152–153, 162, 178, 180, 226, 235–239
   expense_custom_fields.py121794%83–88, 247, 263, 265, 294
   merchants.py1062576%80–83, 111–129, 155–162, 179–180, 190, 203, 205, 235, 238–242
   projects.py1234067%88, 103–168, 188–189, 199, 223, 270, 284–288
   tax_groups.py180100% 
   webhook_attributes.py130695%98, 100–102, 213–214
workers
   actions.py210100% 
   helpers.py430100% 
   worker.py56591%44–45, 77–78, 125
TOTAL1087893091% 

Tests Skipped Failures Errors Time
830 0 💤 0 ❌ 0 🔥 1m 8s ⏱️

@github-actions
Copy link

Coverage

Coverage Report
FileStmtsMissCoverMissing
apps
   exceptions.py471177%27, 33, 39–44, 50, 56–61, 67, 73, 79–80
apps/fyle
   actions.py124794%214, 263, 319–323
   constants.py10100% 
   helpers.py2351494%50–57, 66, 376, 470, 477–480, 483–484
   models.py3382194%315–317, 321–323, 327–329, 333–335, 339–341, 345–347, 408, 530–551, 574, 591
   queue.py500100% 
   serializers.py410100% 
   signals.py35683%22, 55–56, 69–71
   tasks.py5468784%132, 143–144, 147–148, 151–152, 174–175, 231–251, 263–268, 311–314, 339–343, 353–361, 400–410, 525–585, 906–910, 1048, 1059–1060, 1085–1086
   views.py1721591%84–91, 145, 245–246, 290–291, 316–320, 413–417
apps/internal
   actions.py39295%31–32
   helpers.py361364%18–35
   serializers.py300100% 
   tasks.py923265%35–39, 66–71, 116, 128–179
   views.py83199%39
apps/internal/services
   e2e_setup.py590100% 
   fixture_factory.py59395%218–220
apps/mappings
   constants.py20100% 
   exceptions.py71692%69–71, 79–81
   helpers.py86298%93, 163
   models.py500100% 
   schedules.py150100% 
   serializers.py100100% 
   signals.py1111487%90–92, 127, 179–184, 190–194, 200–203, 209–210
   tasks.py1792984%118–119, 142–143, 146, 210–227, 255, 258, 261, 267, 270, 276, 316–318, 329, 407
   utils.py340100% 
   views.py46491%34–35, 114–115
apps/sage_intacct
   actions.py29486%21–22, 49–50
   connector.py8471998%142, 318, 330, 336, 412, 1489, 1788, 1916–1917, 1984–1985, 2021–2022, 2052–2053, 2120–2121, 2156–2157
   dependent_fields.py2904286%345, 381–384, 413–422, 424–425, 427–429, 431–432, 434–435, 437–438, 442–444, 488, 508, 548–550, 596–598, 646–652, 656–657
   enums.py250100% 
   helpers.py68691%58, 96, 151, 155–160
   models.py9886793%78–79, 264–275, 405, 412, 456, 477–494, 567, 579, 629, 635, 670, 720–722, 736–749, 760, 796, 848–849, 949, 990, 1219, 1314–1317, 1361, 1363, 1455, 1559–1602, 1700, 1727, 1838, 2213–2215, 2277
   queue.py1711691%45, 53, 58, 105, 130–133, 173, 187, 205–208, 243, 267–270, 305, 330–333
   serializers.py350100% 
   tasks.py143314490%105, 119, 152, 188–189, 193–196, 198, 201, 251, 286–287, 407–408, 414, 417, 460–461, 502–507, 572, 578, 586, 765–766, 786–789, 860–861, 884, 899, 904, 909, 916, 922, 925–927, 930–933, 936–938, 966, 1019–1020, 1101–1102, 1106, 1127, 1161, 1261–1262, 1338–1339, 1341, 1496–1497, 1586–1587, 1590, 1611, 1626, 1632, 1638, 1645, 1651, 1654–1656, 1659–1662, 1665–1667, 1694, 1839, 1851–1860, 1902, 1905–1910, 1913–1917, 2086–2090, 2189–2190, 2396–2406, 2409, 2418–2423, 2457–2459, 2493–2496, 2564–2568, 2577, 2666–2671, 2684, 2699, 2714
   utils.py9103396%742–746, 891, 1210, 1226–1232, 1241–1242, 1983–1987, 2030–2034, 2077–2081, 2125–2129, 2199–2203, 2224, 2233, 2242, 2251–2252
   views.py1453377%127–129, 134–135, 141–142, 185–188, 258–288, 299–314, 327–331
apps/sage_intacct/errors
   errors.py20100% 
   helpers.py47198%80
apps/sage_intacct/exports
   ap_payments.py130100% 
   bills.py280100% 
   charge_card_transactions.py220100% 
   expense_reports.py280100% 
   helpers.py56296%68, 141
   journal_entries.py76889%177–180, 316–319
   reimbursements.py130100% 
apps/tasks
   models.py700100% 
   serializers.py60100% 
   views.py370100% 
apps/users
   helpers.py120100% 
   models.py530100% 
   views.py170100% 
apps/workspaces
   actions.py46980%65, 84–85, 103, 122–133, 147
   enums.py920100% 
   helpers.py80100% 
   models.py1760100% 
   permissions.py34974%33, 59–67
   serializers.py43198%54
   signals.py310100% 
   system_comments.py190100% 
   tasks.py175995%53–59, 187–194, 235, 267–268, 379
   utils.py90100% 
   views.py329997%110–112, 139–142, 702–703
apps/workspaces/apis/advanced_settings
   serializers.py80396%260, 263, 266
   triggers.py100100% 
   views.py110100% 
apps/workspaces/apis/errors
   serializers.py200100% 
   views.py150100% 
apps/workspaces/apis/export_settings
   helpers.py730100% 
   serializers.py103397%267, 270, 273
   triggers.py56296%33–34
   views.py110100% 
apps/workspaces/apis/import_settings
   serializers.py1411887%232–238, 243–249, 257–265, 283, 286, 314, 317–318, 326
   triggers.py47198%31
   views.py330100% 
fyle_integrations_imports
   dataclasses.py310100% 
   models.py230100% 
   queues.py34585%24, 99, 136, 148–149
   signals.py100100% 
   tasks.py1278136%69–111, 120–126, 139–208, 212–227, 252–255, 257, 259, 264
fyle_integrations_imports/modules
   base.py1881095%75, 91–92, 95, 126, 230–231, 237–238, 351
   categories.py1773381%80, 96, 99–100, 103–104, 272–273, 283, 296, 298, 342, 351–355, 364–410
   cost_centers.py961288%132–133, 152–153, 162, 178, 180, 226, 235–239
   expense_custom_fields.py121794%83–88, 247, 263, 265, 294
   merchants.py1062576%80–83, 111–129, 155–162, 179–180, 190, 203, 205, 235, 238–242
   projects.py1234067%88, 103–168, 188–189, 199, 223, 270, 284–288
   tax_groups.py180100% 
   webhook_attributes.py130695%98, 100–102, 213–214
workers
   actions.py210100% 
   helpers.py430100% 
   worker.py56591%44–45, 77–78, 125
TOTAL1087893091% 

Tests Skipped Failures Errors Time
830 0 💤 0 ❌ 0 🔥 1m 8s ⏱️

@github-actions
Copy link

Failure. Coverage is below 90%.

Diff Coverage
Diff: origin/master..HEAD, staged and unstaged changes

apps/mappings/tasks.py (100%)
apps/sage_intacct/helpers.py (66.7%): Missing lines 151,155-156,160

Total: 14 lines
Missing: 4 lines
Coverage: 71%

1 similar comment
@github-actions
Copy link

Failure. Coverage is below 90%.

Diff Coverage
Diff: origin/master..HEAD, staged and unstaged changes

apps/mappings/tasks.py (100%)
apps/sage_intacct/helpers.py (66.7%): Missing lines 151,155-156,160

Total: 14 lines
Missing: 4 lines
Coverage: 71%

Copy link
Contributor

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

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)

87-94: ⚠️ Potential issue | 🟡 Minor

Double sync_dimensions call on first migration.

When validate_rest_api_connection successfully migrates a workspace, it calls sync_dimensions (line 160). Then check_interval_and_sync_dimension calls sync_dimensions again at line 92 (since destination_synced_at will still satisfy the condition). This results in two full dimension syncs back-to-back on the first run after migration.

Consider having validate_rest_api_connection return a boolean indicating whether a sync was performed, and skip the second sync here if so.

🤖 Fix all issues with AI agents
In `@apps/sage_intacct/helpers.py`:
- Around line 149-159: After updating the DB with
FeatureConfig.objects.filter(...).update(...), invalidate or update the cached
feature entry so subsequent calls to
FeatureConfig.get_feature_config(workspace_id=workspace_id,
key='migrated_to_rest_api') return True immediately; implement this by calling
the existing cache invalidation helper (e.g., FeatureConfig.invalidate_cache or
clear_cache) for that workspace/key or, if no helper exists, write a small
helper to set the cached value to True (or add a force_refresh flag to
get_feature_config and call it) right after the update so
get_sage_intacct_connection stops using the SOAP connector.

@github-actions
Copy link

Coverage

Coverage Report
FileStmtsMissCoverMissing
apps
   exceptions.py471177%27, 33, 39–44, 50, 56–61, 67, 73, 79–80
apps/fyle
   actions.py124794%214, 263, 319–323
   constants.py10100% 
   helpers.py2351494%50–57, 66, 376, 470, 477–480, 483–484
   models.py3382194%315–317, 321–323, 327–329, 333–335, 339–341, 345–347, 408, 530–551, 574, 591
   queue.py500100% 
   serializers.py410100% 
   signals.py35683%22, 55–56, 69–71
   tasks.py5468784%132, 143–144, 147–148, 151–152, 174–175, 231–251, 263–268, 311–314, 339–343, 353–361, 400–410, 525–585, 906–910, 1048, 1059–1060, 1085–1086
   views.py1721591%84–91, 145, 245–246, 290–291, 316–320, 413–417
apps/internal
   actions.py39295%31–32
   helpers.py361364%18–35
   serializers.py300100% 
   tasks.py923265%35–39, 66–71, 116, 128–179
   views.py83199%39
apps/internal/services
   e2e_setup.py590100% 
   fixture_factory.py59395%218–220
apps/mappings
   constants.py20100% 
   exceptions.py71692%69–71, 79–81
   helpers.py86298%93, 163
   models.py500100% 
   schedules.py150100% 
   serializers.py100100% 
   signals.py1111487%90–92, 127, 179–184, 190–194, 200–203, 209–210
   tasks.py1792984%118–119, 142–143, 146, 210–227, 255, 258, 261, 267, 270, 276, 316–318, 329, 407
   utils.py340100% 
   views.py46491%34–35, 114–115
apps/sage_intacct
   actions.py29486%21–22, 49–50
   connector.py8471998%142, 318, 330, 336, 412, 1489, 1788, 1916–1917, 1984–1985, 2021–2022, 2052–2053, 2120–2121, 2156–2157
   dependent_fields.py2904286%345, 381–384, 413–422, 424–425, 427–429, 431–432, 434–435, 437–438, 442–444, 488, 508, 548–550, 596–598, 646–652, 656–657
   enums.py250100% 
   helpers.py68691%58, 96, 151, 155–160
   models.py9886793%78–79, 264–275, 405, 412, 456, 477–494, 567, 579, 629, 635, 670, 720–722, 736–749, 760, 796, 848–849, 949, 990, 1219, 1314–1317, 1361, 1363, 1455, 1559–1602, 1700, 1727, 1838, 2213–2215, 2277
   queue.py1711691%45, 53, 58, 105, 130–133, 173, 187, 205–208, 243, 267–270, 305, 330–333
   serializers.py350100% 
   tasks.py143314490%105, 119, 152, 188–189, 193–196, 198, 201, 251, 286–287, 407–408, 414, 417, 460–461, 502–507, 572, 578, 586, 765–766, 786–789, 860–861, 884, 899, 904, 909, 916, 922, 925–927, 930–933, 936–938, 966, 1019–1020, 1101–1102, 1106, 1127, 1161, 1261–1262, 1338–1339, 1341, 1496–1497, 1586–1587, 1590, 1611, 1626, 1632, 1638, 1645, 1651, 1654–1656, 1659–1662, 1665–1667, 1694, 1839, 1851–1860, 1902, 1905–1910, 1913–1917, 2086–2090, 2189–2190, 2396–2406, 2409, 2418–2423, 2457–2459, 2493–2496, 2564–2568, 2577, 2666–2671, 2684, 2699, 2714
   utils.py9103396%742–746, 891, 1210, 1226–1232, 1241–1242, 1983–1987, 2030–2034, 2077–2081, 2125–2129, 2199–2203, 2224, 2233, 2242, 2251–2252
   views.py1453377%127–129, 134–135, 141–142, 185–188, 258–288, 299–314, 327–331
apps/sage_intacct/errors
   errors.py20100% 
   helpers.py47198%80
apps/sage_intacct/exports
   ap_payments.py130100% 
   bills.py280100% 
   charge_card_transactions.py220100% 
   expense_reports.py280100% 
   helpers.py56296%68, 141
   journal_entries.py76889%177–180, 316–319
   reimbursements.py130100% 
apps/tasks
   models.py700100% 
   serializers.py60100% 
   views.py370100% 
apps/users
   helpers.py120100% 
   models.py530100% 
   views.py170100% 
apps/workspaces
   actions.py46980%65, 84–85, 103, 122–133, 147
   enums.py920100% 
   helpers.py80100% 
   models.py1760100% 
   permissions.py34974%33, 59–67
   serializers.py43198%54
   signals.py310100% 
   system_comments.py190100% 
   tasks.py175995%53–59, 187–194, 235, 267–268, 379
   utils.py90100% 
   views.py329997%110–112, 139–142, 702–703
apps/workspaces/apis/advanced_settings
   serializers.py80396%260, 263, 266
   triggers.py100100% 
   views.py110100% 
apps/workspaces/apis/errors
   serializers.py200100% 
   views.py150100% 
apps/workspaces/apis/export_settings
   helpers.py730100% 
   serializers.py103397%267, 270, 273
   triggers.py56296%33–34
   views.py110100% 
apps/workspaces/apis/import_settings
   serializers.py1411887%232–238, 243–249, 257–265, 283, 286, 314, 317–318, 326
   triggers.py47198%31
   views.py330100% 
fyle_integrations_imports
   dataclasses.py310100% 
   models.py230100% 
   queues.py34585%24, 99, 136, 148–149
   signals.py100100% 
   tasks.py1278136%69–111, 120–126, 139–208, 212–227, 252–255, 257, 259, 264
fyle_integrations_imports/modules
   base.py1881095%75, 91–92, 95, 126, 230–231, 237–238, 351
   categories.py1773381%80, 96, 99–100, 103–104, 272–273, 283, 296, 298, 342, 351–355, 364–410
   cost_centers.py961288%132–133, 152–153, 162, 178, 180, 226, 235–239
   expense_custom_fields.py121794%83–88, 247, 263, 265, 294
   merchants.py1062576%80–83, 111–129, 155–162, 179–180, 190, 203, 205, 235, 238–242
   projects.py1304764%88–91, 106–182, 202–203, 213, 237, 284, 298–302
   tax_groups.py180100% 
   webhook_attributes.py130695%98, 100–102, 213–214
workers
   actions.py210100% 
   helpers.py430100% 
   worker.py56591%44–45, 77–78, 125
TOTAL1088593791% 

Tests Skipped Failures Errors Time
830 0 💤 0 ❌ 0 🔥 1m 9s ⏱️

@github-actions
Copy link

Failure. Coverage is below 90%.

Diff Coverage
Diff: origin/master..HEAD, staged and unstaged changes

apps/mappings/tasks.py (100%)
apps/sage_intacct/helpers.py (66.7%): Missing lines 151,155-156,160

Total: 14 lines
Missing: 4 lines
Coverage: 71%

@github-actions github-actions bot added size/M Medium PR and removed size/S Small PR labels Feb 10, 2026
@github-actions
Copy link

Coverage

Coverage Report
FileStmtsMissCoverMissing
apps
   exceptions.py471177%27, 33, 39–44, 50, 56–61, 67, 73, 79–80
apps/fyle
   actions.py124794%214, 263, 319–323
   constants.py10100% 
   helpers.py2351494%50–57, 66, 376, 470, 477–480, 483–484
   models.py3382194%315–317, 321–323, 327–329, 333–335, 339–341, 345–347, 408, 530–551, 574, 591
   queue.py500100% 
   serializers.py410100% 
   signals.py35683%22, 55–56, 69–71
   tasks.py5468784%132, 143–144, 147–148, 151–152, 174–175, 231–251, 263–268, 311–314, 339–343, 353–361, 400–410, 525–585, 906–910, 1048, 1059–1060, 1085–1086
   views.py1721591%84–91, 145, 245–246, 290–291, 316–320, 413–417
apps/internal
   actions.py39295%31–32
   helpers.py361364%18–35
   serializers.py300100% 
   tasks.py923265%35–39, 66–71, 116, 128–179
   views.py83199%39
apps/internal/services
   e2e_setup.py590100% 
   fixture_factory.py59395%218–220
apps/mappings
   constants.py20100% 
   exceptions.py71692%69–71, 79–81
   helpers.py86298%93, 163
   models.py500100% 
   schedules.py150100% 
   serializers.py100100% 
   signals.py1111487%90–92, 127, 179–184, 190–194, 200–203, 209–210
   tasks.py1792984%118–119, 142–143, 146, 210–227, 255, 258, 261, 267, 270, 276, 316–318, 329, 407
   utils.py340100% 
   views.py46491%34–35, 114–115
apps/sage_intacct
   actions.py29486%21–22, 49–50
   connector.py8471998%142, 318, 330, 336, 412, 1489, 1788, 1916–1917, 1984–1985, 2021–2022, 2052–2053, 2120–2121, 2156–2157
   dependent_fields.py2904286%345, 381–384, 413–422, 424–425, 427–429, 431–432, 434–435, 437–438, 442–444, 488, 508, 548–550, 596–598, 646–652, 656–657
   enums.py250100% 
   helpers.py68297%58, 96
   models.py9886793%78–79, 264–275, 405, 412, 456, 477–494, 567, 579, 629, 635, 670, 720–722, 736–749, 760, 796, 848–849, 949, 990, 1219, 1314–1317, 1361, 1363, 1455, 1559–1602, 1700, 1727, 1838, 2213–2215, 2277
   queue.py1711691%45, 53, 58, 105, 130–133, 173, 187, 205–208, 243, 267–270, 305, 330–333
   serializers.py350100% 
   tasks.py143314490%105, 119, 152, 188–189, 193–196, 198, 201, 251, 286–287, 407–408, 414, 417, 460–461, 502–507, 572, 578, 586, 765–766, 786–789, 860–861, 884, 899, 904, 909, 916, 922, 925–927, 930–933, 936–938, 966, 1019–1020, 1101–1102, 1106, 1127, 1161, 1261–1262, 1338–1339, 1341, 1496–1497, 1586–1587, 1590, 1611, 1626, 1632, 1638, 1645, 1651, 1654–1656, 1659–1662, 1665–1667, 1694, 1839, 1851–1860, 1902, 1905–1910, 1913–1917, 2086–2090, 2189–2190, 2396–2406, 2409, 2418–2423, 2457–2459, 2493–2496, 2564–2568, 2577, 2666–2671, 2684, 2699, 2714
   utils.py9103396%742–746, 891, 1210, 1226–1232, 1241–1242, 1983–1987, 2030–2034, 2077–2081, 2125–2129, 2199–2203, 2224, 2233, 2242, 2251–2252
   views.py1453377%127–129, 134–135, 141–142, 185–188, 258–288, 299–314, 327–331
apps/sage_intacct/errors
   errors.py20100% 
   helpers.py47198%80
apps/sage_intacct/exports
   ap_payments.py130100% 
   bills.py280100% 
   charge_card_transactions.py220100% 
   expense_reports.py280100% 
   helpers.py56296%68, 141
   journal_entries.py76889%177–180, 316–319
   reimbursements.py130100% 
apps/tasks
   models.py700100% 
   serializers.py60100% 
   views.py370100% 
apps/users
   helpers.py120100% 
   models.py530100% 
   views.py170100% 
apps/workspaces
   actions.py46980%65, 84–85, 103, 122–133, 147
   enums.py920100% 
   helpers.py80100% 
   models.py1760100% 
   permissions.py34974%33, 59–67
   serializers.py43198%54
   signals.py310100% 
   system_comments.py190100% 
   tasks.py175995%53–59, 187–194, 235, 267–268, 379
   utils.py90100% 
   views.py329997%110–112, 139–142, 702–703
apps/workspaces/apis/advanced_settings
   serializers.py80396%260, 263, 266
   triggers.py100100% 
   views.py110100% 
apps/workspaces/apis/errors
   serializers.py200100% 
   views.py150100% 
apps/workspaces/apis/export_settings
   helpers.py730100% 
   serializers.py103397%267, 270, 273
   triggers.py56296%33–34
   views.py110100% 
apps/workspaces/apis/import_settings
   serializers.py1411887%232–238, 243–249, 257–265, 283, 286, 314, 317–318, 326
   triggers.py47198%31
   views.py330100% 
fyle_integrations_imports
   dataclasses.py310100% 
   models.py230100% 
   queues.py34585%24, 99, 136, 148–149
   signals.py100100% 
   tasks.py1278136%69–111, 120–126, 139–208, 212–227, 252–255, 257, 259, 264
fyle_integrations_imports/modules
   base.py1881095%75, 91–92, 95, 126, 230–231, 237–238, 351
   categories.py1773381%80, 96, 99–100, 103–104, 272–273, 283, 296, 298, 342, 351–355, 364–410
   cost_centers.py961288%132–133, 152–153, 162, 178, 180, 226, 235–239
   expense_custom_fields.py121794%83–88, 247, 263, 265, 294
   merchants.py1062576%80–83, 111–129, 155–162, 179–180, 190, 203, 205, 235, 238–242
   projects.py1304764%88–91, 106–182, 202–203, 213, 237, 284, 298–302
   tax_groups.py180100% 
   webhook_attributes.py130695%98, 100–102, 213–214
workers
   actions.py210100% 
   helpers.py430100% 
   worker.py56591%44–45, 77–78, 125
TOTAL1088593391% 

Tests Skipped Failures Errors Time
833 0 💤 0 ❌ 0 🔥 1m 13s ⏱️

@github-actions
Copy link


Diff Coverage
Diff: origin/master..HEAD, staged and unstaged changes

apps/mappings/tasks.py (100%)
apps/sage_intacct/helpers.py (100%)

Total: 14 lines
Missing: 0 lines
Coverage: 100%

@github-actions
Copy link

Coverage

Coverage Report
FileStmtsMissCoverMissing
apps
   exceptions.py471177%27, 33, 39–44, 50, 56–61, 67, 73, 79–80
apps/fyle
   actions.py124794%214, 263, 319–323
   constants.py10100% 
   helpers.py2351494%50–57, 66, 376, 470, 477–480, 483–484
   models.py3382194%315–317, 321–323, 327–329, 333–335, 339–341, 345–347, 408, 530–551, 574, 591
   queue.py500100% 
   serializers.py410100% 
   signals.py35683%22, 55–56, 69–71
   tasks.py5468784%132, 143–144, 147–148, 151–152, 174–175, 231–251, 263–268, 311–314, 339–343, 353–361, 400–410, 525–585, 906–910, 1048, 1059–1060, 1085–1086
   views.py1721591%84–91, 145, 245–246, 290–291, 316–320, 413–417
apps/internal
   actions.py39295%31–32
   helpers.py361364%18–35
   serializers.py300100% 
   tasks.py923265%35–39, 66–71, 116, 128–179
   views.py83199%39
apps/internal/services
   e2e_setup.py590100% 
   fixture_factory.py59395%218–220
apps/mappings
   constants.py20100% 
   exceptions.py71692%69–71, 79–81
   helpers.py86298%93, 163
   models.py500100% 
   schedules.py150100% 
   serializers.py100100% 
   signals.py1111487%90–92, 127, 179–184, 190–194, 200–203, 209–210
   tasks.py1792984%118–119, 142–143, 146, 210–227, 255, 258, 261, 267, 270, 276, 316–318, 329, 407
   utils.py340100% 
   views.py46491%34–35, 114–115
apps/sage_intacct
   actions.py29486%21–22, 49–50
   connector.py8471998%142, 318, 330, 336, 412, 1489, 1788, 1916–1917, 1984–1985, 2021–2022, 2052–2053, 2120–2121, 2156–2157
   dependent_fields.py2904286%345, 381–384, 413–422, 424–425, 427–429, 431–432, 434–435, 437–438, 442–444, 488, 508, 548–550, 596–598, 646–652, 656–657
   enums.py250100% 
   helpers.py71396%59, 97, 151
   models.py9886793%78–79, 264–275, 405, 412, 456, 477–494, 567, 579, 629, 635, 670, 720–722, 736–749, 760, 796, 848–849, 949, 990, 1219, 1314–1317, 1361, 1363, 1455, 1559–1602, 1700, 1727, 1838, 2213–2215, 2277
   queue.py1711691%45, 53, 58, 105, 130–133, 173, 187, 205–208, 243, 267–270, 305, 330–333
   serializers.py350100% 
   tasks.py143314490%105, 119, 152, 188–189, 193–196, 198, 201, 251, 286–287, 407–408, 414, 417, 460–461, 502–507, 572, 578, 586, 765–766, 786–789, 860–861, 884, 899, 904, 909, 916, 922, 925–927, 930–933, 936–938, 966, 1019–1020, 1101–1102, 1106, 1127, 1161, 1261–1262, 1338–1339, 1341, 1496–1497, 1586–1587, 1590, 1611, 1626, 1632, 1638, 1645, 1651, 1654–1656, 1659–1662, 1665–1667, 1694, 1839, 1851–1860, 1902, 1905–1910, 1913–1917, 2086–2090, 2189–2190, 2396–2406, 2409, 2418–2423, 2457–2459, 2493–2496, 2564–2568, 2577, 2666–2671, 2684, 2699, 2714
   utils.py9103396%742–746, 891, 1210, 1226–1232, 1241–1242, 1983–1987, 2030–2034, 2077–2081, 2125–2129, 2199–2203, 2224, 2233, 2242, 2251–2252
   views.py1453377%127–129, 134–135, 141–142, 185–188, 258–288, 299–314, 327–331
apps/sage_intacct/errors
   errors.py20100% 
   helpers.py47198%80
apps/sage_intacct/exports
   ap_payments.py130100% 
   bills.py280100% 
   charge_card_transactions.py220100% 
   expense_reports.py280100% 
   helpers.py56296%68, 141
   journal_entries.py76889%177–180, 316–319
   reimbursements.py130100% 
apps/tasks
   models.py700100% 
   serializers.py60100% 
   views.py370100% 
apps/users
   helpers.py120100% 
   models.py530100% 
   views.py170100% 
apps/workspaces
   actions.py46980%65, 84–85, 103, 122–133, 147
   enums.py920100% 
   helpers.py80100% 
   models.py1760100% 
   permissions.py34974%33, 59–67
   serializers.py43198%54
   signals.py310100% 
   system_comments.py190100% 
   tasks.py175995%53–59, 187–194, 235, 267–268, 379
   utils.py90100% 
   views.py329997%110–112, 139–142, 702–703
apps/workspaces/apis/advanced_settings
   serializers.py80396%260, 263, 266
   triggers.py100100% 
   views.py110100% 
apps/workspaces/apis/errors
   serializers.py200100% 
   views.py150100% 
apps/workspaces/apis/export_settings
   helpers.py730100% 
   serializers.py103397%267, 270, 273
   triggers.py56296%33–34
   views.py110100% 
apps/workspaces/apis/import_settings
   serializers.py1411887%232–238, 243–249, 257–265, 283, 286, 314, 317–318, 326
   triggers.py47198%31
   views.py330100% 
fyle_integrations_imports
   dataclasses.py310100% 
   models.py230100% 
   queues.py34585%24, 99, 136, 148–149
   signals.py100100% 
   tasks.py1278136%69–111, 120–126, 139–208, 212–227, 252–255, 257, 259, 264
fyle_integrations_imports/modules
   base.py1881095%75, 91–92, 95, 126, 230–231, 237–238, 351
   categories.py1773381%80, 96, 99–100, 103–104, 272–273, 283, 296, 298, 342, 351–355, 364–410
   cost_centers.py961288%132–133, 152–153, 162, 178, 180, 226, 235–239
   expense_custom_fields.py121794%83–88, 247, 263, 265, 294
   merchants.py1062576%80–83, 111–129, 155–162, 179–180, 190, 203, 205, 235, 238–242
   projects.py1304764%88–91, 106–182, 202–203, 213, 237, 284, 298–302
   tax_groups.py180100% 
   webhook_attributes.py130695%98, 100–102, 213–214
workers
   actions.py210100% 
   helpers.py430100% 
   worker.py56591%44–45, 77–78, 125
TOTAL1088893491% 

Tests Skipped Failures Errors Time
833 0 💤 0 ❌ 0 🔥 1m 9s ⏱️

@github-actions
Copy link


Diff Coverage
Diff: origin/master..HEAD, staged and unstaged changes

apps/mappings/tasks.py (100%)
apps/sage_intacct/helpers.py (93.3%): Missing lines 151

Total: 17 lines
Missing: 1 line
Coverage: 94%

Copy link
Contributor

@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.

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)

88-93: ⚠️ Potential issue | 🟠 Major

Bug: sync_dimensions called twice on migration.

When validate_rest_api_connection succeeds for the first time, it calls sync_dimensions at line 164. Control then returns here, but the local workspace object (fetched at line 86) is stale — destination_synced_at is still None even though sync_dimensions just updated it via a separate query. So line 92 evaluates to True and sync_dimensions runs a second time.

Either skip the outer sync when validate_rest_api_connection already performed one (e.g., by returning a boolean), or remove the sync_dimensions call from inside validate_rest_api_connection and let the caller handle it.

@Hrishabh17 Hrishabh17 merged commit fb356e0 into master Feb 10, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M Medium PR

Development

Successfully merging this pull request may close these issues.

2 participants