-
Notifications
You must be signed in to change notification settings - Fork 27
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
🐛 catalog-api: Fixes validation errors on /services entrypoint #7268
🐛 catalog-api: Fixes validation errors on /services entrypoint #7268
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #7268 +/- ##
==========================================
+ Coverage 86.97% 88.22% +1.24%
==========================================
Files 1686 1454 -232
Lines 65340 57900 -7440
Branches 1115 616 -499
==========================================
- Hits 56832 51084 -5748
+ Misses 8190 6644 -1546
+ Partials 318 172 -146
Continue to review full report in Codecov by Sentry.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙏 thanks a lot!
Does this mean that an empty string is not a valid value? |
68121ed
to
114204e
Compare
@odeimaiz in the database is not an expected value when the column is nullable. At least for the columns we are speaking about in this PR
|
|
What do these changes do?
This PR fixes a validation issue caused by invalid values in the database.
A request to the catalog service was failing due to an invalid value in the database:
The issue occurred because the
icon
column in the second row was set to an empty string instead of either a valid URL orNULL
.This could have been introduced manually in the database or as a result of an unintended transformation between models in the system.
To address this, we implemented the following changes:
NULL
in nullable string columns.Since these values should not be modified in the database directly, we consider additional constraints at the database level unnecessary, as the existing code-level checks are sufficient.
Related issue/s
How to test
Dev-ops
None