Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
288e709c
Commit
288e709c
authored
Aug 30, 2019
by
Filipa Lacerda
Committed by
Mayra Cabrera
Aug 30, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Creates Feature Flag for job log
Updates frontend code and specs to allow for the new feature flag
parent
e5398754
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
48 additions
and
2 deletions
+48
-2
app/assets/javascripts/jobs/components/job_app.vue
app/assets/javascripts/jobs/components/job_app.vue
+4
-2
app/assets/javascripts/jobs/components/job_log_json.vue
app/assets/javascripts/jobs/components/job_log_json.vue
+10
-0
app/controllers/projects/jobs_controller.rb
app/controllers/projects/jobs_controller.rb
+15
-0
locale/gitlab.pot
locale/gitlab.pot
+3
-0
spec/controllers/projects/jobs_controller_spec.rb
spec/controllers/projects/jobs_controller_spec.rb
+1
-0
spec/features/projects/jobs/user_browses_job_spec.rb
spec/features/projects/jobs/user_browses_job_spec.rb
+2
-0
spec/features/projects/jobs_spec.rb
spec/features/projects/jobs_spec.rb
+1
-0
spec/features/security/project/internal_access_spec.rb
spec/features/security/project/internal_access_spec.rb
+4
-0
spec/features/security/project/private_access_spec.rb
spec/features/security/project/private_access_spec.rb
+4
-0
spec/features/security/project/public_access_spec.rb
spec/features/security/project/public_access_spec.rb
+4
-0
No files found.
app/assets/javascripts/jobs/components/job_app.vue
View file @
288e709c
...
...
@@ -12,7 +12,6 @@ import createStore from '../store';
import
EmptyState
from
'
./empty_state.vue
'
;
import
EnvironmentsBlock
from
'
./environments_block.vue
'
;
import
ErasedBlock
from
'
./erased_block.vue
'
;
import
Log
from
'
./job_log.vue
'
;
import
LogTopBar
from
'
./job_log_controllers.vue
'
;
import
StuckBlock
from
'
./stuck_block.vue
'
;
import
UnmetPrerequisitesBlock
from
'
./unmet_prerequisites_block.vue
'
;
...
...
@@ -30,7 +29,10 @@ export default {
EnvironmentsBlock
,
ErasedBlock
,
Icon
,
Log
,
Log
:
()
=>
gon
&&
gon
.
features
&&
gon
.
features
.
jobLogJson
?
import
(
'
./job_log_json.vue
'
)
:
import
(
'
./job_log.vue
'
),
LogTopBar
,
StuckBlock
,
UnmetPrerequisitesBlock
,
...
...
app/assets/javascripts/jobs/components/job_log_json.vue
0 → 100644
View file @
288e709c
<
script
>
export
default
{
name
:
'
JobLogJSON
'
,
};
</
script
>
<
template
>
<pre>
{{
__
(
'
This feature is in development. Please disable the `job_log_json` feature flag
'
)
}}
</pre>
</
template
>
app/controllers/projects/jobs_controller.rb
View file @
288e709c
...
...
@@ -11,6 +11,9 @@ class Projects::JobsController < Projects::ApplicationController
before_action
:authorize_erase_build!
,
only:
[
:erase
]
before_action
:authorize_use_build_terminal!
,
only:
[
:terminal
,
:terminal_websocket_authorize
]
before_action
:verify_api_request!
,
only: :terminal_websocket_authorize
before_action
only:
[
:trace
]
do
push_frontend_feature_flag
(
:job_log_json
)
end
layout
'project'
...
...
@@ -64,6 +67,14 @@ class Projects::JobsController < Projects::ApplicationController
# rubocop: enable CodeReuse/ActiveRecord
def
trace
if
Feature
.
enabled?
(
:job_log_json
,
@project
)
json_trace
else
html_trace
end
end
def
html_trace
build
.
trace
.
read
do
|
stream
|
respond_to
do
|
format
|
format
.
json
do
...
...
@@ -84,6 +95,10 @@ class Projects::JobsController < Projects::ApplicationController
end
end
def
json_trace
# will be implemented with https://gitlab.com/gitlab-org/gitlab-ce/issues/66454
end
def
retry
return
respond_422
unless
@build
.
retryable?
...
...
locale/gitlab.pot
View file @
288e709c
...
...
@@ -11760,6 +11760,9 @@ msgstr ""
msgid "This domain is not verified. You will need to verify ownership before access is enabled."
msgstr ""
msgid "This feature is in development. Please disable the `job_log_json` feature flag"
msgstr ""
msgid "This feature requires local storage to be enabled"
msgstr ""
...
...
spec/controllers/projects/jobs_controller_spec.rb
View file @
288e709c
...
...
@@ -12,6 +12,7 @@ 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
...
...
spec/features/projects/jobs/user_browses_job_spec.rb
View file @
288e709c
...
...
@@ -10,6 +10,8 @@ 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
...
...
spec/features/projects/jobs_spec.rb
View file @
288e709c
...
...
@@ -20,6 +20,7 @@ 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
...
...
spec/features/security/project/internal_access_spec.rb
View file @
288e709c
...
...
@@ -7,6 +7,10 @@ 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?
}
...
...
spec/features/security/project/private_access_spec.rb
View file @
288e709c
...
...
@@ -7,6 +7,10 @@ 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?
}
...
...
spec/features/security/project/public_access_spec.rb
View file @
288e709c
...
...
@@ -7,6 +7,10 @@ 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?
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment