Reset column information when we encounter an error
What does this MR do and why?
Reset column information when we encounter an error
To reduce time to mitigation, we reset the column information for the model when we encounter an error where the columns are not the same for a UNION query
Related issue: #412980 (closed)
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
- In a rails console, run
User.first.authorized_groups.load
. The query should succeed - In a
psql
console, runALTER TABLE namespaces ADD COLUMN test_column_added int;
- In the rails console, run
User.first.authorized_groups.load
again. The query should error. - Run
User.first.authorized_groups.load
again. Onmaster
, the query will still error. On this branch, the query will now succeeed.
Clean-up
- In a
psql
console, runALTER TABLE namespaces DROP COLUMN test_column_added;
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Thong Kuah