Skip to content

[14.0][IMP] connector_extension: add user_id field and work_on override#871

Merged
eantones merged 1 commit into14.0from
14.0-imp-connector_extension-user_id
Mar 26, 2026
Merged

[14.0][IMP] connector_extension: add user_id field and work_on override#871
eantones merged 1 commit into14.0from
14.0-imp-connector_extension-user_id

Conversation

@eantones
Copy link
Copy Markdown
Member

Summary

  • Add optional user_id field on the connector backend to configure a default user for all sync operations
  • Override work_on to switch to this user before creating the WorkContext, ensuring all components, record creation, and child jobs (including delayed ones) run under the configured user context
  • Prevents records from being created under the session user when imports are triggered manually from the backend form

Test plan

  • Set user_id on a backend, trigger import manually — verify records are created under the configured user
  • Leave user_id empty — verify behavior is unchanged (records created under session user)
  • Trigger import via cron — verify the backend's user_id overrides the cron's user

Add optional user_id field on the backend to define a default user
for all operations. Override work_on to switch to this user before
creating the WorkContext, ensuring all components, record creation,
and child jobs run under the configured user context. This prevents
records from being created under the session user when imports are
triggered manually from the backend form.
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 26, 2026

Codecov Report

❌ Patch coverage is 37.50000% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 50.53%. Comparing base (ce814c2) to head (a04f67c).
⚠️ Report is 1 commits behind head on 14.0.

Files with missing lines Patch % Lines
connector_extension/models/backend/backend.py 37.50% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             14.0     #871      +/-   ##
==========================================
- Coverage   50.53%   50.53%   -0.01%     
==========================================
  Files         979      979              
  Lines       16685    16693       +8     
  Branches     3558     3559       +1     
==========================================
+ Hits         8432     8436       +4     
- Misses       8034     8039       +5     
+ Partials      219      218       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@eantones eantones merged commit e20419a into 14.0 Mar 26, 2026
12 of 13 checks passed
@eantones eantones deleted the 14.0-imp-connector_extension-user_id branch March 26, 2026 21:38
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