Commit 44796f34 authored by Fabio Pitino's avatar Fabio Pitino

Turn job_log_json feature flag on by default

Ensure that all specs run against the new log
parent bc4ad61f
...@@ -12,7 +12,7 @@ class Projects::JobsController < Projects::ApplicationController ...@@ -12,7 +12,7 @@ class Projects::JobsController < Projects::ApplicationController
before_action :authorize_use_build_terminal!, only: [:terminal, :terminal_websocket_authorize] before_action :authorize_use_build_terminal!, only: [:terminal, :terminal_websocket_authorize]
before_action :verify_api_request!, only: :terminal_websocket_authorize before_action :verify_api_request!, only: :terminal_websocket_authorize
before_action only: [:show] do before_action only: [:show] do
push_frontend_feature_flag(:job_log_json, project) push_frontend_feature_flag(:job_log_json, project, default_enabled: true)
end end
layout 'project' layout 'project'
...@@ -53,7 +53,7 @@ class Projects::JobsController < Projects::ApplicationController ...@@ -53,7 +53,7 @@ class Projects::JobsController < Projects::ApplicationController
format.json do format.json do
# TODO: when the feature flag is removed we should not pass # TODO: when the feature flag is removed we should not pass
# content_format to serialize method. # content_format to serialize method.
content_format = Feature.enabled?(:job_log_json, @project) ? :json : :html content_format = Feature.enabled?(:job_log_json, @project, default_enabled: true) ? :json : :html
build_trace = Ci::BuildTrace.new( build_trace = Ci::BuildTrace.new(
build: @build, build: @build,
......
...@@ -11,7 +11,6 @@ describe Projects::JobsController, :clean_gitlab_redis_shared_state do ...@@ -11,7 +11,6 @@ describe Projects::JobsController, :clean_gitlab_redis_shared_state do
before do before do
stub_feature_flags(ci_enable_live_trace: true) stub_feature_flags(ci_enable_live_trace: true)
stub_feature_flags(job_log_json: false)
stub_not_protect_default_branch stub_not_protect_default_branch
end end
...@@ -527,7 +526,6 @@ describe Projects::JobsController, :clean_gitlab_redis_shared_state do ...@@ -527,7 +526,6 @@ describe Projects::JobsController, :clean_gitlab_redis_shared_state do
describe 'GET trace.json' do describe 'GET trace.json' do
before do before do
stub_feature_flags(job_log_json: true)
get_trace get_trace
end end
...@@ -634,6 +632,7 @@ describe Projects::JobsController, :clean_gitlab_redis_shared_state do ...@@ -634,6 +632,7 @@ describe Projects::JobsController, :clean_gitlab_redis_shared_state do
describe 'GET legacy trace.json' do describe 'GET legacy trace.json' do
before do before do
stub_feature_flags(job_log_json: false)
get_trace get_trace
end end
......
...@@ -10,7 +10,6 @@ describe 'Project Jobs Permissions' do ...@@ -10,7 +10,6 @@ describe 'Project Jobs Permissions' do
let!(:job) { create(:ci_build, :running, :coverage, :trace_artifact, pipeline: pipeline) } let!(:job) { create(:ci_build, :running, :coverage, :trace_artifact, pipeline: pipeline) }
before do before do
stub_feature_flags(job_log_json: true)
sign_in(user) sign_in(user)
project.enable_ci project.enable_ci
......
...@@ -10,8 +10,6 @@ describe 'User browses a job', :js do ...@@ -10,8 +10,6 @@ describe 'User browses a job', :js do
let!(:build) { create(:ci_build, :success, :trace_artifact, :coverage, pipeline: pipeline) } let!(:build) { create(:ci_build, :success, :trace_artifact, :coverage, pipeline: pipeline) }
before do before do
stub_feature_flags(job_log_json: false)
project.add_maintainer(user) project.add_maintainer(user)
project.enable_ci project.enable_ci
......
...@@ -22,7 +22,6 @@ describe 'Jobs', :clean_gitlab_redis_shared_state do ...@@ -22,7 +22,6 @@ describe 'Jobs', :clean_gitlab_redis_shared_state do
before do before do
project.add_role(user, user_access_level) project.add_role(user, user_access_level)
sign_in(user) sign_in(user)
stub_feature_flags(job_log_json: false)
end end
describe "GET /:project/jobs" do describe "GET /:project/jobs" do
......
...@@ -7,10 +7,6 @@ describe "Internal Project Access" do ...@@ -7,10 +7,6 @@ describe "Internal Project Access" do
set(:project) { create(:project, :internal, :repository) } set(:project) { create(:project, :internal, :repository) }
before do
stub_feature_flags(job_log_json: false)
end
describe "Project should be internal" do describe "Project should be internal" do
describe '#internal?' do describe '#internal?' do
subject { project.internal? } subject { project.internal? }
......
...@@ -7,10 +7,6 @@ describe "Private Project Access" do ...@@ -7,10 +7,6 @@ describe "Private Project Access" do
set(:project) { create(:project, :private, :repository, public_builds: false) } set(:project) { create(:project, :private, :repository, public_builds: false) }
before do
stub_feature_flags(job_log_json: false)
end
describe "Project should be private" do describe "Project should be private" do
describe '#private?' do describe '#private?' do
subject { project.private? } subject { project.private? }
......
...@@ -7,10 +7,6 @@ describe "Public Project Access" do ...@@ -7,10 +7,6 @@ describe "Public Project Access" do
set(:project) { create(:project, :public, :repository) } set(:project) { create(:project, :public, :repository) }
before do
stub_feature_flags(job_log_json: false)
end
describe "Project should be public" do describe "Project should be public" do
describe '#public?' do describe '#public?' do
subject { project.public? } subject { project.public? }
......
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