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

fix: sbom license migration to update nulls #1176

Merged
merged 1 commit into from
Jan 22, 2025
Merged

Conversation

dejanb
Copy link
Contributor

@dejanb dejanb commented Jan 21, 2025

This is a fix for trustification/trustify-load-test-runs#5

The fix is to use USING COALESCE to update NULL values before set the constraint. As I couldn't find an easy way to do that in sea-orm, I converted the migration to raw sql

Copy link
Collaborator

@JimFuller-RedHat JimFuller-RedHat left a comment

Choose a reason for hiding this comment

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

LGTM - though curious that any other existing tests around license do not bork on this change (or said tests are not changed in this PR) ... perhaps this indicates we need a few more tests ?

@dejanb dejanb added this pull request to the merge queue Jan 22, 2025
@dejanb
Copy link
Contributor Author

dejanb commented Jan 22, 2025

This would affect only folks that used system and ingest some sboms without licenses between migrations 690 and 720, which I think is only @ctron and our load tests :)

Merged via the queue into main with commit b048e4b Jan 22, 2025
4 checks passed
@dejanb dejanb deleted the license_null_migration branch January 22, 2025 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants