Helm Charts Package Manager MVC
What does this MR do?
First steps of Helm Charts Package Manager MVC:
- Bootstrap:
- Add
helm_package
feature flag - Add helm regexps
- Add
helm
package type
- Add
- Model and services
- Create
packages_helm_file_metadata
table - Add
Packages::Helm::FileMetadatum
model
- Create
Migrations
up
== 20210316171009 CreatePackagesHelmFileMetadata: migrating ===================
-- create_table(:packages_helm_file_metadata, {:id=>false})
-- quote_column_name(:channel)
-> 0.0000s
-> 0.0267s
-- quote_table_name("check_c34067922d")
-> 0.0000s
-- quote_table_name(:packages_helm_file_metadata)
-> 0.0000s
-- execute("ALTER TABLE \"packages_helm_file_metadata\"\nADD CONSTRAINT \"check_c34067922d\" CHECK (char_length(\"channel\") <= 64)\n")
-> 0.0023s
-- add_index(:packages_helm_file_metadata, :channel)
-> 0.0113s
== 20210316171009 CreatePackagesHelmFileMetadata: migrated (0.0501s) ==========
== 20210319071214 AddHelmMaxFileSizeToPlanLimits: migrating ===================
-- add_column(:plan_limits, :helm_max_file_size, :bigint, {:default=>1048576, :null=>false})
-> 0.0055s
== 20210319071214 AddHelmMaxFileSizeToPlanLimits: migrated (0.0056s) ==========
down
== 20210319071214 AddHelmMaxFileSizeToPlanLimits: reverting ===================
-- remove_column(:plan_limits, :helm_max_file_size, :bigint, {:default=>1048576, :null=>false})
-> 0.0078s
== 20210319071214 AddHelmMaxFileSizeToPlanLimits: reverted (0.0105s) ==========
== 20210316171009 CreatePackagesHelmFileMetadata: reverting ===================
-- drop_table(:packages_helm_file_metadata)
-> 0.0075s
== 20210316171009 CreatePackagesHelmFileMetadata: reverted (0.0076s) ==========
Explain plans
with_helm_channel
Packages::PackageFile.with_helm_channel('stable')
SELECT "packages_package_files".* FROM "packages_package_files" INNER JOIN "packages_helm_file_metadata" ON "packages_helm_file_metadata"."package_file_id" = "packages_package_files"."id" WHERE "packages_helm_file_metadata"."channel" = 'stable'
https://explain.depesz.com/s/EuDV
preload_helm_file_metadata
Packages::PackageFile.preload_helm_file_metadata
SELECT "packages_package_files".* FROM "packages_package_files"
SELECT "packages_helm_file_metadata".* FROM "packages_helm_file_metadata" WHERE "packages_helm_file_metadata"."package_file_id" IN (1, 2, 3, 4, 5, 6, 7)
https://explain.depesz.com/s/aq5y
Does this MR meet the acceptance criteria?
Conformity
-
📋 Does this MR need a changelog?-
I have included a changelog entry. -
I have not included a changelog entry because there are no user-facing features yet.
-
-
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
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
Edited by Mathieu Parent