-
Notifications
You must be signed in to change notification settings - Fork 941
fix: dummy workflow per tenant #4600
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4600 +/- ##
===========================================
+ Coverage 30.95% 46.65% +15.69%
===========================================
Files 93 164 +71
Lines 10534 16894 +6360
===========================================
+ Hits 3261 7882 +4621
- Misses 7273 9012 +1739 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
This PR addresses a critical multi-tenancy issue by implementing tenant-specific test workflows. Here's a concise summary of the key changes:
- Added
is_test
andis_test_run
boolean columns toworkflow
andworkflowexecution
tables respectively to properly track test workflows per tenant - Implemented thread-safe
get_or_create_dummy_workflow
function indb_utils.py
to handle per-tenant test workflow creation - Modified workflow queries to filter out test workflows using
Workflow.is_test == False
condition - Added migration script to clean up deprecated system-test-workflow tenant data while maintaining referential integrity
- Updated test run functionality to use actual workflow IDs when available instead of defaulting to system-wide test workflow
Key points to review:
- Migration script properly handles cleanup of old data while maintaining FK constraints
- Thread-safe implementation of
get_or_create
prevents race conditions - Proper tenant isolation is maintained throughout the workflow execution chain
- Test workflows are now properly scoped to their respective tenants
- Clear separation between test and production workflows through
is_test
flag
10 file(s) reviewed, 3 comment(s)
Edit PR Review Bot Settings | Greptile
Closes #4599