Ignore file_md5 column in VirtualRegistries::Container::Cache::Entry

What does this MR do and why?

This MR implements Release M of the three-release process to remove the file_md5 column from the virtual_registries_container_cache_entries table.

Following the guidelines in Avoiding downtime in migrations - Ignoring the column (Release M).

Why remove file_md5?

The file_md5 column is not needed - we use file_sha1 for container images.

Changes in this MR (Release M)

  • Add ignore_column :file_md5 directive to the VirtualRegistries::Container::Cache::Entry model
  • Remove sha_attribute :file_md5 declaration
  • Remove validation for file_md5
  • Remove all code references to file_md5:
    • VirtualRegistries::Container::Cache::Entries::CreateOrUpdateService
    • VirtualRegistries::Container::HandleFileRequestService
    • API entity API::Entities::VirtualRegistries::Container::Cache::Entry
  • Update factory and specs to remove file_md5 references

Next steps

  • Release M+1 (18.8): Drop the file_md5 column from the database
  • Release M+2 (18.9): Remove the ignore_column directive

Related

Related to !205956 (merged) (comment 2790898109)

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Radamanthus Batnag

Merge request reports

Loading