This instance will be upgraded to Heptapod 0.31.0 (final) on 2022-05-24 at 14:00 UTC+2 (a few minutes of down time)

Commit ebd69c5f authored by Grzegorz Bizon's avatar Grzegorz Bizon
Browse files

Remove artifacts metadata column from database

parent c58d0ba3e386
......@@ -16,6 +16,7 @@ def download
def browse
current_path = params[:path] ? "./#{params[:path]}/" : './'
artifacts_metadata = build.artifacts_metadata(current_path)
@path = Gitlab::StringPath.new(current_path, artifacts_metadata)
end
......@@ -29,10 +30,6 @@ def artifacts_file
@artifacts_file ||= build.artifacts_file
end
def artifacts_metadata
@artifacts_metadata ||= build.artifacts_metadata
end
def authorize_download_build_artifacts!
unless can?(current_user, :download_build_artifacts, @project)
if current_user.nil?
......
......@@ -30,7 +30,6 @@
# description :string(255)
# artifacts_file :text
# gl_project_id :integer
# artifacts_metadata :text
#
module Ci
......@@ -41,7 +40,6 @@ class Build < CommitStatus
belongs_to :trigger_request, class_name: 'Ci::TriggerRequest'
serialize :options
serialize :artifacts_metadata
validates :coverage, numericality: true, allow_blank: true
validates_presence_of :ref
......@@ -336,6 +334,10 @@ def execute_hooks
project.execute_services(build_data.dup, :build_hooks)
end
def artifacts_metadata(path)
[]
end
private
def yaml_variables
......
......@@ -18,3 +18,6 @@
%th Download
= render partial: 'tree_directory', collection: @path.directories!, as: :directory
= render partial: 'tree_file', collection: @path.files, as: :file
- if @path.children.empty?
.center Empty
......@@ -12,7 +12,6 @@ def seed!
FileUtils.copy(artifacts_path, artifacts_cache_file_path)
File.open(artifacts_cache_file_path, 'r') do |file|
build.artifacts_file = file
build.artifacts_metadata = artifacts_metadata
end
begin
......@@ -57,12 +56,6 @@ def artifacts_path
def artifacts_cache_file_path
artifacts_path.to_s.gsub('ci_', "p#{@project.id}_")
end
def artifacts_metadata
return @artifacts_metadata if @artifacts_metadata
logs, _exit_status = Gitlab::Popen.popen(%W(tar tzf #{artifacts_path}))
@artifacts_metadata = logs.split(/\n/)
end
end
Gitlab::Seeder.quiet do
......
class AddArtifactsMetadataToCiBuild < ActiveRecord::Migration
def change
add_column :ci_builds, :artifacts_metadata, :text, limit: 4294967295
end
end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment