diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-09-08 09:10:46 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-09-08 09:10:46 +0300 |
commit | 1758f49bb51884245d53fc6675f180cb522a4623 (patch) | |
tree | 106fa0dffb0e1a39dee148d1c0b2016392a8654c /lib/gitlab | |
parent | 10646673020797d5194d39188b135a3a6f19b860 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab')
-rw-r--r-- | lib/gitlab/ci/pipeline/seed/build.rb | 11 | ||||
-rw-r--r-- | lib/gitlab/ci/status/build/failed.rb | 3 | ||||
-rw-r--r-- | lib/gitlab/database/migration_helpers.rb | 1 | ||||
-rw-r--r-- | lib/gitlab/sidekiq_middleware/size_limiter/validator.rb | 7 |
4 files changed, 9 insertions, 13 deletions
diff --git a/lib/gitlab/ci/pipeline/seed/build.rb b/lib/gitlab/ci/pipeline/seed/build.rb index 9ad5d6538b7..934bf22d8ad 100644 --- a/lib/gitlab/ci/pipeline/seed/build.rb +++ b/lib/gitlab/ci/pipeline/seed/build.rb @@ -106,15 +106,10 @@ module Gitlab environment = Seed::Environment.new(build).to_resource + # If there is a validation error on environment creation, such as + # the name contains invalid character, the build falls back to a + # non-environment job. unless environment.persisted? - if Feature.enabled?(:surface_environment_creation_failure, build.project, default_enabled: :yaml) && - Feature.disabled?(:surface_environment_creation_failure_override, build.project) - return { status: :failed, failure_reason: :environment_creation_failure } - end - - # If there is a validation error on environment creation, such as - # the name contains invalid character, the build falls back to a - # non-environment job. Gitlab::ErrorTracking.track_exception( EnvironmentCreationFailure.new, project_id: build.project_id, diff --git a/lib/gitlab/ci/status/build/failed.rb b/lib/gitlab/ci/status/build/failed.rb index b9525ce97a8..dbbb9a01dab 100644 --- a/lib/gitlab/ci/status/build/failed.rb +++ b/lib/gitlab/ci/status/build/failed.rb @@ -32,8 +32,7 @@ module Gitlab user_blocked: 'pipeline user was blocked', ci_quota_exceeded: 'no more CI minutes available', no_matching_runner: 'no matching runner available', - trace_size_exceeded: 'log size limit exceeded', - environment_creation_failure: 'environment creation failure' + trace_size_exceeded: 'log size limit exceeded' }.freeze private_constant :REASONS diff --git a/lib/gitlab/database/migration_helpers.rb b/lib/gitlab/database/migration_helpers.rb index 6c8ccaa2599..a4190514de2 100644 --- a/lib/gitlab/database/migration_helpers.rb +++ b/lib/gitlab/database/migration_helpers.rb @@ -984,6 +984,7 @@ module Gitlab temporary_columns.each { |column| remove_column(table, column) } end + alias_method :cleanup_conversion_of_integer_to_bigint, :revert_initialize_conversion_of_integer_to_bigint # Reverts `cleanup_conversion_of_integer_to_bigint` # diff --git a/lib/gitlab/sidekiq_middleware/size_limiter/validator.rb b/lib/gitlab/sidekiq_middleware/size_limiter/validator.rb index b37eeb8bad1..86d91cc3580 100644 --- a/lib/gitlab/sidekiq_middleware/size_limiter/validator.rb +++ b/lib/gitlab/sidekiq_middleware/size_limiter/validator.rb @@ -47,11 +47,11 @@ module Gitlab end def validate! - return unless @size_limit > 0 - return if allow_big_payload? - job_args = compress_if_necessary(::Sidekiq.dump_json(@job['args'])) + + return if @size_limit == 0 return if job_args.bytesize <= @size_limit + return if allow_big_payload? exception = exceed_limit_error(job_args) if compress_mode? @@ -83,6 +83,7 @@ module Gitlab @size_limit = (size_limit || DEFAULT_SIZE_LIMIT).to_i if @size_limit < 0 ::Sidekiq.logger.warn "Invalid Sidekiq size limiter limit: #{@size_limit}" + @size_limit = 0 end end |