Skip to content

Ignore fingerprint column on sbom_sources

Brian Williams requested to merge bwill/ignore-source-fingerprint into master

What does this MR do and why?

Describe in detail what your merge request does and why.

The fingerprint column was something that we thought we would need when doing early database design, but in practice we have realized that it's not necessary. This change begins the process of removing it by:

  1. Removing the NOT NULL constraint on the column
  2. Removing any code which populates the fingerprint
  3. Ignoring the column on the model

Note: On production this table is currently empty. It will begin being populated when !96575 (merged) is merged.

Migrations

$ scripts/db_tasks db:migrate:down VERSION=20220914174705
main: == 20220914174705 RemoveNotNullConstraintFromSbomSourceFingerprint: reverting =
main: -- change_column_null(:sbom_sources, :fingerprint, false)
main:    -> 0.0014s
main: == 20220914174705 RemoveNotNullConstraintFromSbomSourceFingerprint: reverted (0.0051s) 
$ scripts/db_tasks db:migrate
main: == 20220914174705 RemoveNotNullConstraintFromSbomSourceFingerprint: migrating =
main: -- change_column_null(:sbom_sources, :fingerprint, true)
main:    -> 0.0017s
main: == 20220914174705 RemoveNotNullConstraintFromSbomSourceFingerprint: migrated (0.0025s) 

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

N/A: No user-facing changes.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Brian Williams

Merge request reports