Skip to content

Add models for dependency proxy ttl policies

Steve Abrams requested to merge 294187-image-ttl-migration into master

🔎 What does this MR do?

The dependency proxy is a pull-through cache for DockerHub images. Currently, users can clear the entire cache, but there are no automated controls over this functionality. In #294187 (closed) we are adding TTL (time-to-live) policies so users can adjust to automatically clear cached files older than a specific number of days (90 by default).

In this MR, we add the initial table and model that will be used to manage these policies.

💾 Database

Migration Output:

→ be rake db:migrate:redo VERSION=20210823213417
== 20210823213417 CreateDependencyProxyImageTtlGroupPolicies: reverting =======
-- drop_table(:dependency_proxy_image_ttl_group_policies)
   -> 0.0035s
== 20210823213417 CreateDependencyProxyImageTtlGroupPolicies: reverted (0.0294s)

== 20210823213417 CreateDependencyProxyImageTtlGroupPolicies: migrating =======
-- create_table(:dependency_proxy_image_ttl_group_policies, {:id=>false, :primary_key=>:group_id})
   -> 0.0127s
== 20210823213417 CreateDependencyProxyImageTtlGroupPolicies: migrated (0.0201s)

Screenshots or Screencasts (strongly suggested)

N/A

How to setup and validate locally (strongly suggested)

N/A

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.

  • [-] Label as security and @ mention @gitlab-com/gl-security/appsec
  • [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • [-] Security reports checked/validated by a reviewer from the AppSec team

Related to #294187 (closed)

Edited by Steve Abrams

Merge request reports