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

Move parallel auto ID row creation test to row.spec.ts. #13644

Merged
merged 3 commits into from
May 9, 2024

Conversation

samwho
Copy link
Collaborator

@samwho samwho commented May 9, 2024

Description

The original purpose of this PR was to move the tests in src/sdk/app/rows/tests/internal.spec.ts into packages/server/src/api/routes/tests/row.spec.ts. The latter is a comprehensive suite of functional tests, and the former is just a smattering of unit tests.

However, in doing this it was revealed that creating rows with auto ID columns actually ends up updating datasource entries for external datasources. This creates a huge number of document conflict errors in the rest of the tests, also signalling that this would be quite problematic in production as well. Fortunately, as of right now, you can't create auto ID columns on external datasources. We're going to prevent that and not support it going forward.

The code I wrote in #13606 actually turns out to not be more robust, either. If anything, it appeared to make it more likely to give you document conflict errors. For that reason, I've removed it in this PR and gone back to making retrying document conflict errors the responsibility of the API caller.

@samwho samwho requested a review from mike12345567 May 9, 2024 11:03
@samwho samwho marked this pull request as ready for review May 9, 2024 11:03
@samwho samwho requested a review from a team as a code owner May 9, 2024 11:03
@samwho samwho enabled auto-merge May 9, 2024 11:03
Copy link
Collaborator

@mike12345567 mike12345567 left a comment

Choose a reason for hiding this comment

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

Very nice - LGTM!

@samwho samwho merged commit b7722c0 into master May 9, 2024
10 checks passed
@samwho samwho deleted the remove-some-unit-tests branch May 9, 2024 11:13
@github-actions github-actions bot locked and limited conversation to collaborators May 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants