Skip to content
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

fix(workspaces): non region enabled workspace project creation #3847

Merged

Conversation

gjedlicska
Copy link
Contributor

Description & motivation

Changes:

To-do before merge:

Screenshots:

Validation of changes:

Checklist:

  • My pull request follows the guidelines in the Contributing guide?
  • My pull request does not duplicate any other open Pull Requests for the same update/change?
  • My commits are related to the pull request and do not amend unrelated code or documentation.
  • My code follows a similar style to existing code.
  • I have added appropriate tests.
  • I have updated or added relevant documentation.

References

Copy link

linear bot commented Jan 17, 2025

workspaceId: input.workspaceId
})
if (!workspace) throw new WorkspaceNotFoundError()
await upsertWorkspaceFactory({ db: projectDb })({ workspace })
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this effectively migrating a workspace to a region from the main DB?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, in the region, we only need the workspace's id to exists. Its state is stored in the mainDb always.

This was the cause of the default project region switch bug, we had two
almost identical implementations...
…gergo/web-2478-copy-workspace-if-not-in-default-project-region
@gjedlicska
Copy link
Contributor Author

@iainsproat reviewed this in person

@gjedlicska gjedlicska merged commit 188c333 into main Jan 27, 2025
26 of 28 checks passed
@gjedlicska gjedlicska deleted the gergo/web-2478-copy-workspace-if-not-in-default-project-region branch January 27, 2025 16:45
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.

2 participants