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
99468602
Commit
99468602
authored
Aug 09, 2021
by
Marius Bobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove ci_jobs_trace_size_limit feature flag
Add size limit to job logs Changelog: added
parent
0ef98c4a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
3 additions
and
58 deletions
+3
-58
app/services/ci/append_build_trace_service.rb
app/services/ci/append_build_trace_service.rb
+1
-2
config/feature_flags/development/ci_jobs_trace_size_limit.yml
...ig/feature_flags/development/ci_jobs_trace_size_limit.yml
+0
-8
doc/administration/instance_limits.md
doc/administration/instance_limits.md
+2
-28
spec/services/ci/append_build_trace_service_spec.rb
spec/services/ci/append_build_trace_service_spec.rb
+0
-20
No files found.
app/services/ci/append_build_trace_service.rb
View file @
99468602
...
@@ -71,8 +71,7 @@ module Ci
...
@@ -71,8 +71,7 @@ module Ci
end
end
def
trace_size_exceeded?
(
size
)
def
trace_size_exceeded?
(
size
)
Feature
.
enabled?
(
:ci_jobs_trace_size_limit
,
project
,
default_enabled: :yaml
)
&&
project
.
actual_limits
.
exceeded?
(
:ci_jobs_trace_size_limit
,
size
/
1
.
megabyte
)
project
.
actual_limits
.
exceeded?
(
:ci_jobs_trace_size_limit
,
size
/
1
.
megabyte
)
end
end
end
end
end
end
config/feature_flags/development/ci_jobs_trace_size_limit.yml
deleted
100644 → 0
View file @
0ef98c4a
---
name
:
ci_jobs_trace_size_limit
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/65349
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/335259
milestone
:
'
14.1'
type
:
development
group
:
group::pipeline execution
default_enabled
:
false
doc/administration/instance_limits.md
View file @
99468602
...
@@ -499,15 +499,8 @@ A runner's registration fails if it exceeds the limit for the scope determined b
...
@@ -499,15 +499,8 @@ A runner's registration fails if it exceeds the limit for the scope determined b
### Maximum file size for job logs
### Maximum file size for job logs
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/276192) in GitLab 14.1.
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/276192) in GitLab 14.1, disabled by default.
> - [Deployed behind a feature flag](../user/feature_flags.md), disabled by default.
> - Enabled by default and [feature flag `ci_jobs_trace_size_limit` removed](https://gitlab.com/gitlab-org/gitlab/-/issues/335259) in GitLab 14.2.
> - Disabled on GitLab.com.
> - Not recommended for production use.
> - To use in GitLab self-managed instances, ask a GitLab administrator to [enable it](#enable-or-disable-job-log-limits). **(FREE SELF)**
This in-development feature might not be available for your use. There can be
[
risks when enabling features still in development
](
../administration/feature_flags.md#risks-when-enabling-features-still-in-development
)
.
Refer to this feature's version history for more details.
The job log file size limit is 100 megabytes by default. Any job that exceeds this value is dropped.
The job log file size limit is 100 megabytes by default. Any job that exceeds this value is dropped.
...
@@ -518,25 +511,6 @@ Update `ci_jobs_trace_size_limit` with the new value in megabytes:
...
@@ -518,25 +511,6 @@ Update `ci_jobs_trace_size_limit` with the new value in megabytes:
Plan
.
default
.
actual_limits
.
update!
(
ci_jobs_trace_size_limit:
125
)
Plan
.
default
.
actual_limits
.
update!
(
ci_jobs_trace_size_limit:
125
)
```
```
#### Enable or disable job log limits **(FREE SELF)**
This feature is under development and not ready for production use. It is
deployed behind a feature flag that is
**disabled by default**
.
[
GitLab administrators with access to the GitLab Rails console
](
feature_flags.md
)
can enable it.
To enable it:
```
ruby
Feature
.
enable
(
:ci_jobs_trace_size_limit
)
```
To disable it:
```
ruby
Feature
.
disable
(
:ci_jobs_trace_size_limit
)
```
## Instance monitoring and metrics
## Instance monitoring and metrics
### Incident Management inbound alert limits
### Incident Management inbound alert limits
...
...
spec/services/ci/append_build_trace_service_spec.rb
View file @
99468602
...
@@ -75,25 +75,5 @@ RSpec.describe Ci::AppendBuildTraceService do
...
@@ -75,25 +75,5 @@ RSpec.describe Ci::AppendBuildTraceService do
expect
(
build
.
reload
).
to
be_failed
expect
(
build
.
reload
).
to
be_failed
expect
(
build
.
failure_reason
).
to
eq
'trace_size_exceeded'
expect
(
build
.
failure_reason
).
to
eq
'trace_size_exceeded'
end
end
context
'when the feature flag is disabled'
do
before
do
stub_feature_flags
(
ci_jobs_trace_size_limit:
false
)
end
it
'appends trace chunks'
do
stream_size
=
1.25
.
megabytes
body_data
=
'x'
*
stream_size
content_range
=
"0-
#{
stream_size
}
"
result
=
described_class
.
new
(
build
,
content_range:
content_range
)
.
execute
(
body_data
)
expect
(
result
.
status
).
to
eq
202
expect
(
result
.
stream_size
).
to
eq
stream_size
expect
(
build
.
trace_chunks
.
count
).
to
eq
10
end
end
end
end
end
end
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