Skip to content

fix(project transfer): Clone shared workflows when transferring project#116522

Open
ceorourke wants to merge 3 commits into
masterfrom
ceorourke/project-transfer-clone-workflows
Open

fix(project transfer): Clone shared workflows when transferring project#116522
ceorourke wants to merge 3 commits into
masterfrom
ceorourke/project-transfer-clone-workflows

Conversation

@ceorourke
Copy link
Copy Markdown
Member

When a project is transferred to a new organization we move over all of the Rule and AlertRule objects but don't necessarily move over all the Workflow objects. Workflows can be connected to multiple detectors that could be in multiple projects, and if that is the case, we don't transfer them. This leaves us in an inconsistent state because we've dual written most (except for recently created ones) workflows with a rule or alert rule and we've ended up with AlertRuleWorkflow rows that reference 2 organizations. When we use that model to look something up, we could end up fetching data from the wrong organization. Previous PRs have added checks against that, but this fixes the project transfer to deeply clone the Workflow if it is shared so that it can live in both organizations and avoid this problem.

@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label May 29, 2026
@ceorourke ceorourke marked this pull request as ready for review May 29, 2026 20:55
@ceorourke ceorourke requested review from a team as code owners May 29, 2026 20:55
@ceorourke ceorourke requested review from a team and kcons and removed request for a team May 29, 2026 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant