Skip to content
代码片段 群组 项目
未验证 提交 0a5f7cb5 编辑于 作者: Brett Walker's avatar Brett Walker 提交者: GitLab
浏览文件

Rename DISABLE_BANZAI_TIMEOUT

to GITLAB_DISABLE_MARKDOWN_TIMEOUT
上级 7034be92
No related branches found
No related tags found
无相关合并请求
...@@ -43,6 +43,7 @@ You can use the following environment variables to override certain values: ...@@ -43,6 +43,7 @@ You can use the following environment variables to override certain values:
| `GITLAB_RAILS_CACHE_DEFAULT_TTL_SECONDS` | integer | The default TTL used for entries stored in the Rails-cache. Default is `28800`. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/95042) in 15.3. | | `GITLAB_RAILS_CACHE_DEFAULT_TTL_SECONDS` | integer | The default TTL used for entries stored in the Rails-cache. Default is `28800`. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/95042) in 15.3. |
| `GITLAB_CI_CONFIG_FETCH_TIMEOUT_SECONDS` | integer | Timeout for resolving remote includes in CI config in seconds. Must be between `0` and `60`. Default is `30`. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/116383) in 15.11. | | `GITLAB_CI_CONFIG_FETCH_TIMEOUT_SECONDS` | integer | Timeout for resolving remote includes in CI config in seconds. Must be between `0` and `60`. Default is `30`. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/116383) in 15.11. |
| `GITLAB_DISABLE_TOKEN_EXPIRATION_BANNER` | string | If set to `true`, `1`, or `yes`, the token expiration banner is not shown. Default is `false`. | | `GITLAB_DISABLE_TOKEN_EXPIRATION_BANNER` | string | If set to `true`, `1`, or `yes`, the token expiration banner is not shown. Default is `false`. |
| `GITLAB_DISABLE_MARKDOWN_TIMEOUT` | string | If set to `true`, `1`, or `yes`, Markdown rendering on the backend does not time out. Default is `false`. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/163662) in 17.4.|
| `GITLAB_LFS_MAX_OID_TO_FETCH` | integer | Sets the maximum number of LFS objects to link. Default is `100,000`. | | `GITLAB_LFS_MAX_OID_TO_FETCH` | integer | Sets the maximum number of LFS objects to link. Default is `100,000`. |
| `SIDEKIQ_SEMI_RELIABLE_FETCH_TIMEOUT` | integer | Sets the timeout for Sidekiq semi-reliable fetch. Default is `5`. [Before GitLab 16.7](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/139583), default was `3`. If you experience high Redis CPU consumption on GitLab 16.6 and earlier, or if you have customized this variable, you should update this variable to `5`. | | `SIDEKIQ_SEMI_RELIABLE_FETCH_TIMEOUT` | integer | Sets the timeout for Sidekiq semi-reliable fetch. Default is `5`. [Before GitLab 16.7](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/139583), default was `3`. If you experience high Redis CPU consumption on GitLab 16.6 and earlier, or if you have customized this variable, you should update this variable to `5`. |
......
...@@ -12,7 +12,7 @@ def self.timeout(background: BACKGROUND, foreground: FOREGROUND, &block) ...@@ -12,7 +12,7 @@ def self.timeout(background: BACKGROUND, foreground: FOREGROUND, &block)
end end
def self.banzai_timeout_disabled? def self.banzai_timeout_disabled?
Gitlab::Utils.to_boolean(ENV['DISABLE_BANZAI_TIMEOUT'], default: false) Gitlab::Utils.to_boolean(ENV['GITLAB_DISABLE_MARKDOWN_TIMEOUT'], default: false)
end end
end end
end end
...@@ -28,9 +28,9 @@ ...@@ -28,9 +28,9 @@
expect(described_class.new('text').exceeded_pipeline_max?).to be_falsey expect(described_class.new('text').exceeded_pipeline_max?).to be_falsey
end end
context 'when DISABLE_BANZAI_TIMEOUT set' do context 'when GITLAB_DISABLE_MARKDOWN_TIMEOUT set' do
it 'ignores MAX_PIPELINE_SECONDS' do it 'ignores MAX_PIPELINE_SECONDS' do
stub_env('DISABLE_BANZAI_TIMEOUT' => '1') stub_env('GITLAB_DISABLE_MARKDOWN_TIMEOUT' => '1')
allow_next_instance_of(described_class) do |instance| allow_next_instance_of(described_class) do |instance|
allow(instance).to receive(:result).and_return({ pipeline_timing: 1.1 }) allow(instance).to receive(:result).and_return({ pipeline_timing: 1.1 })
end end
......
...@@ -39,9 +39,9 @@ ...@@ -39,9 +39,9 @@
end end
end end
context 'when DISABLE_BANZAI_TIMEOUT set' do context 'when GITLAB_DISABLE_MARKDOWN_TIMEOUT set' do
before do before do
stub_env('DISABLE_BANZAI_TIMEOUT' => '1') stub_env('GITLAB_DISABLE_MARKDOWN_TIMEOUT' => '1')
stub_const 'TimeoutTest', Class.new(HTML::Pipeline::Filter) stub_const 'TimeoutTest', Class.new(HTML::Pipeline::Filter)
TimeoutTest.class_eval { include Banzai::Filter::Concerns::TimeoutFilterHandler } TimeoutTest.class_eval { include Banzai::Filter::Concerns::TimeoutFilterHandler }
end end
......
...@@ -24,15 +24,15 @@ def expect_timeout(period) ...@@ -24,15 +24,15 @@ def expect_timeout(period)
end end
describe 'banzai_timeout_disabled?' do describe 'banzai_timeout_disabled?' do
context 'when DISABLE_BANZAI_TIMEOUT set' do context 'when GITLAB_DISABLE_MARKDOWN_TIMEOUT set' do
it 'returns true' do it 'returns true' do
stub_env('DISABLE_BANZAI_TIMEOUT' => '1') stub_env('GITLAB_DISABLE_MARKDOWN_TIMEOUT' => '1')
expect(described_class.banzai_timeout_disabled?).to be_truthy expect(described_class.banzai_timeout_disabled?).to be_truthy
end end
end end
context 'when DISABLE_BANZAI_TIMEOUT is not set' do context 'when GITLAB_DISABLE_MARKDOWN_TIMEOUT is not set' do
it 'returns false' do it 'returns false' do
expect(described_class.banzai_timeout_disabled?).to be_falsey expect(described_class.banzai_timeout_disabled?).to be_falsey
end end
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册