-
Notifications
You must be signed in to change notification settings - Fork 4
Implement cross-system issue synchronization #7
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: ecosystem-sync-integration-before
Are you sure you want to change the base?
Implement cross-system issue synchronization #7
Conversation
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||||
User description
PR #7
PR Type
Bug fix, Enhancement
Description
Implement
AssignmentSourcetracking to prevent sync cyclesAdd assignment source parameter to sync methods
Prevent outbound sync when source matches target integration
Update group assignee operations to pass assignment source
Diagram Walkthrough
flowchart LR A["Assignment Action"] --> B["AssignmentSource Created"] B --> C["Sync Methods Check Source"] C --> D{"Source == Target Integration?"} D -->|Yes| E["Skip Sync - Prevent Cycle"] D -->|No| F["Proceed with Sync"]File Walkthrough
assignment_source.py
New assignment source tracking dataclasssrc/sentry/integrations/services/assignment_source.py
AssignmentSourceto track sync operation originsource_name,integration_id, andqueuedtimestampfrom_integration()factory method for creating instancesto_dict()andfrom_dict()for serializationsync_assignee_outbound.py
Thread assignment source through outbound sync tasksrc/sentry/integrations/tasks/sync_assignee_outbound.py
assignment_source_dictparameter tosync_assignee_outbound()taskAssignmentSource.from_dict()should_sync()andsync_assignee_outbound()callssync.py
Add assignment source propagation to sync utilitiessrc/sentry/integrations/utils/sync.py
AssignmentSourceclasssync_group_assignee_inbound()to pass assignment source whenassigning/deassigning
sync_group_assignee_outbound()to accept and forward assignmentsource parameter
groupassignee.py
Add assignment source to group assignee operationssrc/sentry/models/groupassignee.py
AssignmentSourceclassassignment_sourceparameter toassign()methodassignment_sourceparameter todeassign()methodsync_group_assignee_outbound()callsissues.py
Add sync cycle prevention to integration mixinssrc/sentry/integrations/mixins/issues.py
AssignmentSourceimportshould_sync()method signature to accept optionalsync_sourceparameter
IssueSyncIntegration.should_sync()tocheck if source integration matches target
sync_status_outbound()abstract method signature to includeassignment_sourceparametertest_assignment_source.py
New tests for assignment source serializationtests/sentry/integrations/services/test_assignment_source.py
from_dict()with empty dictionary returns Nonefrom_dict()with invalid data returns Nonefrom_dict()with valid data creates proper instanceto_dict()serialization includes all fieldstest_groupassignee.py
Add tests for sync cycle preventiontests/sentry/models/test_groupassignee.py
AssignmentSourceclassassignment_source=Noneparametertest_assignee_sync_outbound_assign_with_matching_source_integration()to verify sync is skipped when source matches target