feat(ecosystem): Implement cross-system issue synchronization#11
feat(ecosystem): Implement cross-system issue synchronization#11zaibkhan wants to merge 1 commit into
Conversation
Codoki PR ReviewSummary: Fix assignment source timestamp, guard API compatibility Issues (Critical & High only)
Showing top 2 issues. Critical: 0, High: 2. See inline suggestions for more. Key Feedback (click to expand)
Confidence: 3/5 — Needs work before merge (2 high · status: Requires changes) Sequence DiagramsequenceDiagram
participant Caller
participant Utils
participant Task
participant Installation
Caller->>Utils: sync_group_assignee_outbound(group, user_id, assign, assignment_source)
Utils->>Task: sync_assignee_outbound.apply_async(kwargs)
Task->>Installation: should_sync("outbound_assignee", assignment_source?)
alt should_sync returns true
Task->>Installation: sync_assignee_outbound(external_issue, user, assign, assignment_source)
else should_sync returns false
Task-->>Caller: no-op
end
React with 👍 or 👎 if you found this review useful. |
| class AssignmentSource: | ||
| source_name: str | ||
| integration_id: int | ||
| queued: datetime = timezone.now() |
There was a problem hiding this comment.
| queued: datetime = timezone.now() | |
| from dataclasses import asdict, dataclass, field | |
| @dataclass(frozen=True) | |
| class AssignmentSource: | |
| source_name: str | |
| integration_id: int | |
| queued: datetime = field(default_factory=timezone.now) |
|
|
||
| if installation.should_sync("outbound_assignee"): | ||
| parsed_assignment_source = ( | ||
| AssignmentSource.from_dict(assignment_source_dict) if assignment_source_dict else None |
There was a problem hiding this comment.
| AssignmentSource.from_dict(assignment_source_dict) if assignment_source_dict else None | |
| try: | |
| _should_sync = installation.should_sync("outbound_assignee", parsed_assignment_source) | |
| except TypeError: | |
| _should_sync = installation.should_sync("outbound_assignee") | |
| if _should_sync: |
| sync_assignee_outbound.apply_async( | ||
| kwargs={"external_issue_id": external_issue_id, "user_id": user_id, "assign": assign} | ||
| kwargs={ | ||
| "external_issue_id": external_issue_id, |
There was a problem hiding this comment.
🔷 Medium: assignment_source.to_dict() includes a datetime (queued) which may not be JSON-serializable in some Celery configurations. Since only integration_id/source_name are used downstream, pass a minimal dict to avoid serialization issues.
Mirrors ai-code-review-evaluation#7 for like-for-like benchmarking.
ecosystem-sync-integration-beforeecosystem-sync-integration-afterOriginal PR excerpt: