[fix] make names non-nullable#8332
Conversation
john-bodley
left a comment
There was a problem hiding this comment.
@serenajiang would you mind adding the Alembic migration to the PR?
Codecov Report
@@ Coverage Diff @@
## master #8332 +/- ##
==========================================
+ Coverage 67.7% 73.22% +5.52%
==========================================
Files 447 115 -332
Lines 22652 12404 -10248
Branches 2363 0 -2363
==========================================
- Hits 15336 9083 -6253
+ Misses 7178 3321 -3857
+ Partials 138 0 -138
Continue to review full report at Codecov.
|
f9d6566 to
6c8b2fa
Compare
e3153a0 to
2989c9e
Compare
There was a problem hiding this comment.
Please remove this as the migration should fail if there are NULL values. Instead please add a line item to UPDATING.md to indicate that this migration may fail (see other examples).
There was a problem hiding this comment.
Please use the generic SQLAlchemy types as used in other migrations.
2989c9e to
acbbbd4
Compare
|
One other request, can you add sql snippets to the PR explaining how to find the bad rows if the migration fails? you can follow the format here as an example: #5451 |
This reverts commit 65a05ca.
CATEGORY
Choose one
SUMMARY
If a user somehow creates a table with a null name, 503 errors occur whenever
repr(table)is called because__repr__returns a non-string type.Fixed schema to make columns referenced by
__repr__non-nullable.Before running the migration, you must manually fix any records with null
clusters.cluster_name,dbs.database_name, ortables.table_name. To find problematic records, run a query like:TEST PLAN
Confirmed that after upgrade, I get a warning if I try to insert a row with a null
table_name.Confirmed that after downgrade, I am able to insert a row with a null
table_namewith no problem.ADDITIONAL INFORMATION
REVIEWERS
@graceguo-supercat @etr2460 @john-bodley