Commit a4b7b511 authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Merge branch 'toggle-job-log-json-flag-on' into 'master'

Turn job_log_json feature flag on by default

See merge request gitlab-org/gitlab!21543
parents 214927fd ed7a75ca
......@@ -12,7 +12,7 @@ class Projects::JobsController < Projects::ApplicationController
before_action :authorize_use_build_terminal!, only: [:terminal, :terminal_websocket_authorize]
before_action :verify_api_request!, only: :terminal_websocket_authorize
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
layout 'project'
......@@ -53,7 +53,7 @@ class Projects::JobsController < Projects::ApplicationController
format.json do
# TODO: when the feature flag is removed we should not pass
# 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: @build,
......
---
title: Enable new job log by default
merge_request: 21543
author:
type: added
doc/ci/img/collapsible_log.png

59.3 KB | W: | H:

doc/ci/img/collapsible_log.png

272 KB | W: | H:

doc/ci/img/collapsible_log.png
doc/ci/img/collapsible_log.png
doc/ci/img/collapsible_log.png
doc/ci/img/collapsible_log.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -149,12 +149,13 @@ The union of A, B, and C is (1, 4) and (6, 7). Therefore, the total running time
> [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/issues/14664) in GitLab
> 12.0.
Job logs are divided into sections that can be collapsed or expanded.
Job logs are divided into sections that can be collapsed or expanded. Each section will display
the duration.
In the following example:
- Two sections are expanded and can be collapsed.
- One section is collapsed and can be expanded.
- Two sections are collapsed and can be expanded.
- Three sections are expanded and can be collapsed.
![Collapsible sections](img/collapsible_log.png)
......
......@@ -11,7 +11,6 @@ describe Projects::JobsController, :clean_gitlab_redis_shared_state do
before do
stub_feature_flags(ci_enable_live_trace: true)
stub_feature_flags(job_log_json: false)
stub_not_protect_default_branch
end
......@@ -527,7 +526,6 @@ describe Projects::JobsController, :clean_gitlab_redis_shared_state do
describe 'GET trace.json' do
before do
stub_feature_flags(job_log_json: true)
get_trace
end
......@@ -634,6 +632,7 @@ describe Projects::JobsController, :clean_gitlab_redis_shared_state do
describe 'GET legacy trace.json' do
before do
stub_feature_flags(job_log_json: false)
get_trace
end
......
......@@ -10,7 +10,6 @@ describe 'Project Jobs Permissions' do
let!(:job) { create(:ci_build, :running, :coverage, :trace_artifact, pipeline: pipeline) }
before do
stub_feature_flags(job_log_json: true)
sign_in(user)
project.enable_ci
......
......@@ -10,8 +10,6 @@ describe 'User browses a job', :js do
let!(:build) { create(:ci_build, :success, :trace_artifact, :coverage, pipeline: pipeline) }
before do
stub_feature_flags(job_log_json: false)
project.add_maintainer(user)
project.enable_ci
......@@ -24,7 +22,7 @@ describe 'User browses a job', :js do
wait_for_requests
expect(page).to have_content("Job ##{build.id}")
expect(page).to have_css('.js-build-trace')
expect(page).to have_css('.job-log')
# scroll to the top of the page first
execute_script "window.scrollTo(0,0)"
......
......@@ -22,7 +22,6 @@ describe 'Jobs', :clean_gitlab_redis_shared_state do
before do
project.add_role(user, user_access_level)
sign_in(user)
stub_feature_flags(job_log_json: false)
end
describe "GET /:project/jobs" do
......@@ -810,7 +809,7 @@ describe 'Jobs', :clean_gitlab_redis_shared_state do
it 'renders job log' do
wait_for_all_requests
expect(page).to have_selector('.js-build-trace')
expect(page).to have_selector('.job-log')
end
end
......
......@@ -7,10 +7,6 @@ describe "Internal Project Access" do
set(:project) { create(:project, :internal, :repository) }
before do
stub_feature_flags(job_log_json: false)
end
describe "Project should be internal" do
describe '#internal?' do
subject { project.internal? }
......
......@@ -7,10 +7,6 @@ describe "Private Project Access" do
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 '#private?' do
subject { project.private? }
......
......@@ -7,10 +7,6 @@ describe "Public Project Access" do
set(:project) { create(:project, :public, :repository) }
before do
stub_feature_flags(job_log_json: false)
end
describe "Project should be public" do
describe '#public?' do
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