Commit c61415d6 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Add feature flags controlling new build traces behavior

parent 8970f01f
......@@ -45,7 +45,7 @@ module Ci
def overwrite_trace!
metrics.increment_trace_operation(operation: :overwrite)
build.trace.set(params[:trace]) # TODO, disable by default using a new FF
build.trace.set(params[:trace]) if Gitlab::Ci::Features.trace_overwrite?
end
def update_build_state!
......@@ -118,7 +118,7 @@ module Ci
end
def chunks_migration_enabled?
Feature.enabled?(:ci_enable_live_trace, build.project)
::Gitlab::Ci::Features.accept_trace?(build.project)
end
end
end
---
name: ci_accept_trace
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/41304
rollout_issue_url:
group: group::continuous integration
type: ops
default_enabled: false
\ No newline at end of file
---
name: ci_trace_overwrite
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/41304
rollout_issue_url:
group: group::continuous integration
type: ops
default_enabled: false
\ No newline at end of file
......@@ -74,6 +74,15 @@ module Gitlab
def self.child_of_child_pipeline_enabled?(project)
::Feature.enabled?(:ci_child_of_child_pipeline, project, default_enabled: false)
end
def self.trace_overwrite?
::Feature.enabled?(:ci_trace_overwrite, type: :ops, default_enabled: false)
end
def self.accept_trace?(project)
::Feature.enabled?(:ci_enable_live_trace, project) &&
::Feature.enabled?(:ci_accept_trace, project, type: :ops, default_enabled: false)
end
end
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