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

Set SQL auto-incremement sequences to Javascript-unsafe integers for tests #1367

Closed
adamalton opened this issue May 27, 2022 · 0 comments · Fixed by #2020
Closed

Set SQL auto-incremement sequences to Javascript-unsafe integers for tests #1367

adamalton opened this issue May 27, 2022 · 0 comments · Fixed by #2020
Labels
kind/enhancement A net-new feature or improvement to an existing feature need/triage Needs initial labeling and prioritization potential/support-pi

Comments

@adamalton
Copy link
Contributor

A recurring gotcha is that we get bitten by the Javascript maximum integer when using SQL BIGINT columns, we unwittingly get hold of them as a Number at some point, which if the value is above the JS maximum integer value causes it to overflow and give us a different value.

We've got various measures and techniques in place to avoid this, but when running the tests the DB's auto-increment columns are usually initialised to 1, so any bugs only surface when we deploy to staging, or worse, to production.

If we could initialise the sequences for these columns to a high value when running the tests, it would catch these bugs much earlier and avoid pain.

@adamalton adamalton added kind/enhancement A net-new feature or improvement to an existing feature need/triage Needs initial labeling and prioritization labels May 27, 2022
yusefnapora added a commit that referenced this issue Oct 17, 2022
We got hit by this recently during the rollout of tiered pricing, so I
decided to pick it up this morning. Closes #1367
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement A net-new feature or improvement to an existing feature need/triage Needs initial labeling and prioritization potential/support-pi
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants