Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
76893705a1
commit
d19a19ce85
|
@ -4,9 +4,6 @@ GraphQL/OrderedArguments:
|
||||||
- app/graphql/resolvers/base_issues_resolver.rb
|
- app/graphql/resolvers/base_issues_resolver.rb
|
||||||
- app/graphql/resolvers/design_management/designs_resolver.rb
|
- app/graphql/resolvers/design_management/designs_resolver.rb
|
||||||
- app/graphql/resolvers/design_management/version/design_at_version_resolver.rb
|
- app/graphql/resolvers/design_management/version/design_at_version_resolver.rb
|
||||||
- app/graphql/resolvers/design_management/version/designs_at_version_resolver.rb
|
|
||||||
- app/graphql/resolvers/design_management/version_in_collection_resolver.rb
|
|
||||||
- app/graphql/resolvers/group_milestones_resolver.rb
|
|
||||||
- app/graphql/resolvers/merge_requests_resolver.rb
|
- app/graphql/resolvers/merge_requests_resolver.rb
|
||||||
- app/graphql/resolvers/paginated_tree_resolver.rb
|
- app/graphql/resolvers/paginated_tree_resolver.rb
|
||||||
- app/graphql/resolvers/tree_resolver.rb
|
- app/graphql/resolvers/tree_resolver.rb
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
1.49.0
|
1.50.0
|
||||||
|
|
|
@ -47,6 +47,9 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
safeHtmlConfig: {
|
||||||
|
ADD_TAGS: ['copy-code'],
|
||||||
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -62,7 +65,11 @@ export default {
|
||||||
</div>
|
</div>
|
||||||
<div class="blob-viewer" data-qa-selector="blob_viewer_content" itemprop="about">
|
<div class="blob-viewer" data-qa-selector="blob_viewer_content" itemprop="about">
|
||||||
<gl-loading-icon v-if="loading > 0" size="md" color="dark" class="my-4 mx-auto" />
|
<gl-loading-icon v-if="loading > 0" size="md" color="dark" class="my-4 mx-auto" />
|
||||||
<div v-else-if="readme" ref="readme" v-safe-html="readme.html"></div>
|
<div
|
||||||
|
v-else-if="readme"
|
||||||
|
ref="readme"
|
||||||
|
v-safe-html:[$options.safeHtmlConfig]="readme.html"
|
||||||
|
></div>
|
||||||
</div>
|
</div>
|
||||||
</article>
|
</article>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -13,13 +13,13 @@ module Resolvers
|
||||||
|
|
||||||
DesignID = ::Types::GlobalIDType[::DesignManagement::Design]
|
DesignID = ::Types::GlobalIDType[::DesignManagement::Design]
|
||||||
|
|
||||||
argument :ids, [DesignID],
|
|
||||||
required: false,
|
|
||||||
description: 'Filters designs by their ID.'
|
|
||||||
argument :filenames,
|
argument :filenames,
|
||||||
[GraphQL::Types::String],
|
[GraphQL::Types::String],
|
||||||
required: false,
|
required: false,
|
||||||
description: 'Filters designs by their filename.'
|
description: 'Filters designs by their filename.'
|
||||||
|
argument :ids, [DesignID],
|
||||||
|
required: false,
|
||||||
|
description: 'Filters designs by their ID.'
|
||||||
|
|
||||||
def self.single
|
def self.single
|
||||||
::Resolvers::DesignManagement::Version::DesignAtVersionResolver
|
::Resolvers::DesignManagement::Version::DesignAtVersionResolver
|
||||||
|
|
|
@ -15,13 +15,13 @@ module Resolvers
|
||||||
|
|
||||||
VersionID = ::Types::GlobalIDType[::DesignManagement::Version]
|
VersionID = ::Types::GlobalIDType[::DesignManagement::Version]
|
||||||
|
|
||||||
argument :sha, GraphQL::Types::String,
|
|
||||||
required: false,
|
|
||||||
description: "SHA256 of a specific version."
|
|
||||||
argument :id, VersionID,
|
argument :id, VersionID,
|
||||||
as: :version_id,
|
as: :version_id,
|
||||||
required: false,
|
required: false,
|
||||||
description: 'Global ID of the version.'
|
description: 'Global ID of the version.'
|
||||||
|
argument :sha, GraphQL::Types::String,
|
||||||
|
required: false,
|
||||||
|
description: "SHA256 of a specific version."
|
||||||
|
|
||||||
def resolve(version_id: nil, sha: nil)
|
def resolve(version_id: nil, sha: nil)
|
||||||
# TODO: remove this line when the compatibility layer is removed
|
# TODO: remove this line when the compatibility layer is removed
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
|
|
||||||
module Resolvers
|
module Resolvers
|
||||||
class GroupMilestonesResolver < MilestonesResolver
|
class GroupMilestonesResolver < MilestonesResolver
|
||||||
argument :include_descendants, GraphQL::Types::Boolean,
|
|
||||||
required: false,
|
|
||||||
description: 'Include milestones from all subgroups and subprojects.'
|
|
||||||
argument :include_ancestors, GraphQL::Types::Boolean,
|
argument :include_ancestors, GraphQL::Types::Boolean,
|
||||||
required: false,
|
required: false,
|
||||||
description: 'Include milestones from all parent groups.'
|
description: 'Include milestones from all parent groups.'
|
||||||
|
argument :include_descendants, GraphQL::Types::Boolean,
|
||||||
|
required: false,
|
||||||
|
description: 'Include milestones from all subgroups and subprojects.'
|
||||||
|
|
||||||
type Types::MilestoneType.connection_type, null: true
|
type Types::MilestoneType.connection_type, null: true
|
||||||
|
|
||||||
|
|
|
@ -1021,7 +1021,15 @@ module Ci
|
||||||
transaction do
|
transaction do
|
||||||
update_columns(status: :failed, failure_reason: :data_integrity_failure)
|
update_columns(status: :failed, failure_reason: :data_integrity_failure)
|
||||||
all_queuing_entries.delete_all
|
all_queuing_entries.delete_all
|
||||||
|
all_runtime_metadata.delete_all
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Gitlab::AppLogger.info(
|
||||||
|
message: 'Build doomed',
|
||||||
|
class: self.class.name,
|
||||||
|
build_id: id,
|
||||||
|
pipeline_id: pipeline_id,
|
||||||
|
project_id: project_id)
|
||||||
end
|
end
|
||||||
|
|
||||||
def degradation_threshold
|
def degradation_threshold
|
||||||
|
@ -1067,6 +1075,10 @@ module Ci
|
||||||
::Ci::PendingBuild.upsert_from_build!(self)
|
::Ci::PendingBuild.upsert_from_build!(self)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def create_runtime_metadata!
|
||||||
|
::Ci::RunningBuild.upsert_shared_runner_build!(self)
|
||||||
|
end
|
||||||
|
|
||||||
##
|
##
|
||||||
# We can have only one queuing entry or running build tracking entry,
|
# We can have only one queuing entry or running build tracking entry,
|
||||||
# because there is a unique index on `build_id` in each table, but we need
|
# because there is a unique index on `build_id` in each table, but we need
|
||||||
|
|
|
@ -34,7 +34,7 @@ module Ci
|
||||||
# rubocop: enable CodeReuse/ActiveRecord
|
# rubocop: enable CodeReuse/ActiveRecord
|
||||||
|
|
||||||
def drop_build(type, build, reason)
|
def drop_build(type, build, reason)
|
||||||
Gitlab::AppLogger.info "#{self.class}: Dropping #{type} build #{build.id} for runner #{build.runner_id} (status: #{build.status}, failure_reason: #{reason})"
|
log_dropping_message(type, build, reason)
|
||||||
Gitlab::OptimisticLocking.retry_lock(build, 3, name: 'stuck_ci_jobs_worker_drop_build') do |b|
|
Gitlab::OptimisticLocking.retry_lock(build, 3, name: 'stuck_ci_jobs_worker_drop_build') do |b|
|
||||||
b.drop(reason)
|
b.drop(reason)
|
||||||
end
|
end
|
||||||
|
@ -53,6 +53,16 @@ module Ci
|
||||||
project_id: build.project_id
|
project_id: build.project_id
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def log_dropping_message(type, build, reason)
|
||||||
|
Gitlab::AppLogger.info(class: self.class.name,
|
||||||
|
message: "Dropping #{type} build",
|
||||||
|
build_stuck_type: type,
|
||||||
|
build_id: build.id,
|
||||||
|
runner_id: build.runner_id,
|
||||||
|
build_status: build.status,
|
||||||
|
build_failure_reason: reason)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -6,11 +6,11 @@ info: To determine the technical writer assigned to the Stage/Group associated w
|
||||||
|
|
||||||
# Audit event streaming **(ULTIMATE)**
|
# Audit event streaming **(ULTIMATE)**
|
||||||
|
|
||||||
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/332747) in GitLab 14.5 [with a flag](../administration/feature_flags.md) named `ff_external_audit_events_namespace`. Disabled by default.
|
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/332747) in GitLab 14.5 [with a flag](../administration/feature_flags.md) named `ff_external_audit_events_namespace`. Disabled by default.
|
||||||
|
> - [Enabled on GitLab.com and self-managed](https://gitlab.com/gitlab-org/gitlab/-/issues/338939) in GitLab 14.7.
|
||||||
|
|
||||||
FLAG:
|
FLAG:
|
||||||
On self-managed GitLab, by default this feature is not available. To make it available per group, ask an administrator to [enable the feature flag](../administration/feature_flags.md) named `ff_external_audit_events_namespace`. On GitLab.com, this feature is not available.
|
On self-managed GitLab, by default this feature is available. To hide the feature per group, ask an administrator to [disable the feature flag](../administration/feature_flags.md) named `ff_external_audit_events_namespace`. On GitLab.com, this feature is available.
|
||||||
You should not use this feature for production environments.
|
|
||||||
|
|
||||||
Event streaming allows owners of top-level groups to set an HTTP endpoint to receive **all** audit events about the group, and its
|
Event streaming allows owners of top-level groups to set an HTTP endpoint to receive **all** audit events about the group, and its
|
||||||
subgroups and projects.
|
subgroups and projects.
|
||||||
|
|
|
@ -512,6 +512,7 @@ instance and project.
|
||||||
| Change project configuration | | | ✓ | ✓ |
|
| Change project configuration | | | ✓ | ✓ |
|
||||||
| Add specific runners | | | ✓ | ✓ |
|
| Add specific runners | | | ✓ | ✓ |
|
||||||
| Add shared runners | | | | ✓ |
|
| Add shared runners | | | | ✓ |
|
||||||
|
| Clear runner caches manually | | | ✓ | ✓ |
|
||||||
| See events in the system | | | | ✓ |
|
| See events in the system | | | | ✓ |
|
||||||
| Admin Area | | | | ✓ |
|
| Admin Area | | | | ✓ |
|
||||||
|
|
||||||
|
|
|
@ -200,9 +200,7 @@ module Gitlab
|
||||||
end
|
end
|
||||||
|
|
||||||
def sidekiq_exporter_enabled?
|
def sidekiq_exporter_enabled?
|
||||||
::Settings.monitoring.sidekiq_exporter.enabled
|
::Settings.dig('monitoring', 'sidekiq_exporter', 'enabled')
|
||||||
rescue Settingslogic::MissingSetting
|
|
||||||
nil
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def exporter_has_a_unique_port?
|
def exporter_has_a_unique_port?
|
||||||
|
@ -216,15 +214,11 @@ module Gitlab
|
||||||
end
|
end
|
||||||
|
|
||||||
def sidekiq_exporter_port
|
def sidekiq_exporter_port
|
||||||
::Settings.monitoring.sidekiq_exporter.port
|
::Settings.dig('monitoring', 'sidekiq_exporter', 'port')
|
||||||
rescue Settingslogic::MissingSetting
|
|
||||||
nil
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def sidekiq_health_check_port
|
def sidekiq_health_check_port
|
||||||
::Settings.monitoring.sidekiq_health_checks.port
|
::Settings.dig('monitoring', 'sidekiq_health_checks', 'port')
|
||||||
rescue Settingslogic::MissingSetting
|
|
||||||
nil
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def metrics_server_enabled?
|
def metrics_server_enabled?
|
||||||
|
|
|
@ -5,7 +5,7 @@ require 'rspec-parameterized'
|
||||||
|
|
||||||
require_relative '../../../sidekiq_cluster/cli'
|
require_relative '../../../sidekiq_cluster/cli'
|
||||||
|
|
||||||
RSpec.describe Gitlab::SidekiqCluster::CLI do # rubocop:disable RSpec/FilePath
|
RSpec.describe Gitlab::SidekiqCluster::CLI, stubbing_settings_source: true do # rubocop:disable RSpec/FilePath
|
||||||
let(:cli) { described_class.new('/dev/null') }
|
let(:cli) { described_class.new('/dev/null') }
|
||||||
let(:timeout) { Gitlab::SidekiqCluster::DEFAULT_SOFT_TIMEOUT_SECONDS }
|
let(:timeout) { Gitlab::SidekiqCluster::DEFAULT_SOFT_TIMEOUT_SECONDS }
|
||||||
let(:default_options) do
|
let(:default_options) do
|
||||||
|
@ -16,19 +16,39 @@ RSpec.describe Gitlab::SidekiqCluster::CLI do # rubocop:disable RSpec/FilePath
|
||||||
let(:sidekiq_exporter_port) { '3807' }
|
let(:sidekiq_exporter_port) { '3807' }
|
||||||
let(:sidekiq_health_checks_port) { '3807' }
|
let(:sidekiq_health_checks_port) { '3807' }
|
||||||
|
|
||||||
|
let(:config_file) { Tempfile.new('gitlab.yml') }
|
||||||
|
let(:config) do
|
||||||
|
{
|
||||||
|
'test' => {
|
||||||
|
'monitoring' => {
|
||||||
|
'sidekiq_exporter' => {
|
||||||
|
'address' => 'localhost',
|
||||||
|
'enabled' => sidekiq_exporter_enabled,
|
||||||
|
'port' => sidekiq_exporter_port
|
||||||
|
},
|
||||||
|
'sidekiq_health_checks' => {
|
||||||
|
'address' => 'localhost',
|
||||||
|
'enabled' => sidekiq_exporter_enabled,
|
||||||
|
'port' => sidekiq_health_checks_port
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
before do
|
before do
|
||||||
stub_env('RAILS_ENV', 'test')
|
stub_env('RAILS_ENV', 'test')
|
||||||
stub_config(
|
|
||||||
monitoring: {
|
config_file.write(YAML.dump(config))
|
||||||
sidekiq_exporter: {
|
config_file.close
|
||||||
enabled: sidekiq_exporter_enabled,
|
|
||||||
port: sidekiq_exporter_port
|
allow(::Settings).to receive(:source).and_return(config_file.path)
|
||||||
},
|
|
||||||
sidekiq_health_checks: {
|
::Settings.reload!
|
||||||
port: sidekiq_health_checks_port
|
end
|
||||||
}
|
|
||||||
}
|
after do
|
||||||
)
|
config_file.unlink
|
||||||
end
|
end
|
||||||
|
|
||||||
describe '#run' do
|
describe '#run' do
|
||||||
|
@ -272,16 +292,9 @@ RSpec.describe Gitlab::SidekiqCluster::CLI do # rubocop:disable RSpec/FilePath
|
||||||
context 'starting the server' do
|
context 'starting the server' do
|
||||||
context 'without --dryrun' do
|
context 'without --dryrun' do
|
||||||
context 'when there are no sidekiq_health_checks settings set' do
|
context 'when there are no sidekiq_health_checks settings set' do
|
||||||
before do
|
let(:sidekiq_exporter_enabled) { true }
|
||||||
stub_config(
|
|
||||||
monitoring: {
|
|
||||||
sidekiq_exporter: {
|
|
||||||
enabled: true,
|
|
||||||
port: sidekiq_exporter_port
|
|
||||||
}
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
|
before do
|
||||||
allow(Gitlab::SidekiqCluster).to receive(:start)
|
allow(Gitlab::SidekiqCluster).to receive(:start)
|
||||||
allow(cli).to receive(:write_pid)
|
allow(cli).to receive(:write_pid)
|
||||||
allow(cli).to receive(:trap_signals)
|
allow(cli).to receive(:trap_signals)
|
||||||
|
@ -293,25 +306,12 @@ RSpec.describe Gitlab::SidekiqCluster::CLI do # rubocop:disable RSpec/FilePath
|
||||||
|
|
||||||
cli.run(%w(foo))
|
cli.run(%w(foo))
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'rescues Settingslogic::MissingSetting' do
|
|
||||||
expect { cli.run(%w(foo)) }.not_to raise_error(Settingslogic::MissingSetting)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'when the sidekiq_exporter.port setting is not set' do
|
context 'when the sidekiq_exporter.port setting is not set' do
|
||||||
before do
|
let(:sidekiq_exporter_enabled) { true }
|
||||||
stub_config(
|
|
||||||
monitoring: {
|
|
||||||
sidekiq_exporter: {
|
|
||||||
enabled: true
|
|
||||||
},
|
|
||||||
sidekiq_health_checks: {
|
|
||||||
port: sidekiq_health_checks_port
|
|
||||||
}
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
|
before do
|
||||||
allow(Gitlab::SidekiqCluster).to receive(:start)
|
allow(Gitlab::SidekiqCluster).to receive(:start)
|
||||||
allow(cli).to receive(:write_pid)
|
allow(cli).to receive(:write_pid)
|
||||||
allow(cli).to receive(:trap_signals)
|
allow(cli).to receive(:trap_signals)
|
||||||
|
@ -323,23 +323,25 @@ RSpec.describe Gitlab::SidekiqCluster::CLI do # rubocop:disable RSpec/FilePath
|
||||||
|
|
||||||
cli.run(%w(foo))
|
cli.run(%w(foo))
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'rescues Settingslogic::MissingSetting' do
|
|
||||||
expect { cli.run(%w(foo)) }.not_to raise_error(Settingslogic::MissingSetting)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'when sidekiq_exporter.enabled setting is not set' do
|
context 'when sidekiq_exporter.enabled setting is not set' do
|
||||||
before do
|
let(:config) do
|
||||||
stub_config(
|
{
|
||||||
monitoring: {
|
'test' => {
|
||||||
sidekiq_exporter: {},
|
'monitoring' => {
|
||||||
sidekiq_health_checks: {
|
'sidekiq_exporter' => {},
|
||||||
port: sidekiq_health_checks_port
|
'sidekiq_health_checks' => {
|
||||||
|
'address' => 'localhost',
|
||||||
|
'enabled' => sidekiq_exporter_enabled,
|
||||||
|
'port' => sidekiq_health_checks_port
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
}
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
before do
|
||||||
allow(Gitlab::SidekiqCluster).to receive(:start)
|
allow(Gitlab::SidekiqCluster).to receive(:start)
|
||||||
allow(cli).to receive(:write_pid)
|
allow(cli).to receive(:write_pid)
|
||||||
allow(cli).to receive(:trap_signals)
|
allow(cli).to receive(:trap_signals)
|
||||||
|
@ -353,6 +355,36 @@ RSpec.describe Gitlab::SidekiqCluster::CLI do # rubocop:disable RSpec/FilePath
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
context 'with a blank sidekiq_exporter setting' do
|
||||||
|
let(:config) do
|
||||||
|
{
|
||||||
|
'test' => {
|
||||||
|
'monitoring' => {
|
||||||
|
'sidekiq_exporter' => nil,
|
||||||
|
'sidekiq_health_checks' => nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
before do
|
||||||
|
allow(Gitlab::SidekiqCluster).to receive(:start)
|
||||||
|
allow(cli).to receive(:write_pid)
|
||||||
|
allow(cli).to receive(:trap_signals)
|
||||||
|
allow(cli).to receive(:start_loop)
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'does not start a sidekiq metrics server' do
|
||||||
|
expect(MetricsServer).not_to receive(:spawn)
|
||||||
|
|
||||||
|
cli.run(%w(foo))
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'does not throw an error' do
|
||||||
|
expect { cli.run(%w(foo)) }.not_to raise_error
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
context 'with valid settings' do
|
context 'with valid settings' do
|
||||||
using RSpec::Parameterized::TableSyntax
|
using RSpec::Parameterized::TableSyntax
|
||||||
|
|
||||||
|
|
|
@ -335,6 +335,10 @@ FactoryBot.define do
|
||||||
running
|
running
|
||||||
|
|
||||||
runner factory: :ci_runner
|
runner factory: :ci_runner
|
||||||
|
|
||||||
|
after(:create) do |build|
|
||||||
|
build.create_runtime_metadata!
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
trait :artifacts do
|
trait :artifacts do
|
||||||
|
|
|
@ -5427,7 +5427,8 @@ RSpec.describe Ci::Build do
|
||||||
describe '#doom!' do
|
describe '#doom!' do
|
||||||
subject { build.doom! }
|
subject { build.doom! }
|
||||||
|
|
||||||
let_it_be(:build) { create(:ci_build, :queued) }
|
let(:traits) { [] }
|
||||||
|
let(:build) { create(:ci_build, *traits, pipeline: pipeline) }
|
||||||
|
|
||||||
it 'updates status and failure_reason', :aggregate_failures do
|
it 'updates status and failure_reason', :aggregate_failures do
|
||||||
subject
|
subject
|
||||||
|
@ -5436,6 +5437,18 @@ RSpec.describe Ci::Build do
|
||||||
expect(build.failure_reason).to eq("data_integrity_failure")
|
expect(build.failure_reason).to eq("data_integrity_failure")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it 'logs a message' do
|
||||||
|
expect(Gitlab::AppLogger)
|
||||||
|
.to receive(:info)
|
||||||
|
.with(a_hash_including(message: 'Build doomed', class: build.class.name, build_id: build.id))
|
||||||
|
.and_call_original
|
||||||
|
|
||||||
|
subject
|
||||||
|
end
|
||||||
|
|
||||||
|
context 'with queued builds' do
|
||||||
|
let(:traits) { [:queued] }
|
||||||
|
|
||||||
it 'drops associated pending build' do
|
it 'drops associated pending build' do
|
||||||
subject
|
subject
|
||||||
|
|
||||||
|
@ -5443,6 +5456,17 @@ RSpec.describe Ci::Build do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
context 'with running builds' do
|
||||||
|
let(:traits) { [:picked] }
|
||||||
|
|
||||||
|
it 'drops associated runtime metadata' do
|
||||||
|
subject
|
||||||
|
|
||||||
|
expect(build.reload.runtime_metadata).not_to be_present
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
it 'does not generate cross DB queries when a record is created via FactoryBot' do
|
it 'does not generate cross DB queries when a record is created via FactoryBot' do
|
||||||
with_cross_database_modification_prevented do
|
with_cross_database_modification_prevented do
|
||||||
create(:ci_build)
|
create(:ci_build)
|
||||||
|
|
|
@ -463,6 +463,14 @@ RSpec.configure do |config|
|
||||||
$stdout = STDOUT
|
$stdout = STDOUT
|
||||||
end
|
end
|
||||||
|
|
||||||
|
config.around(:each, stubbing_settings_source: true) do |example|
|
||||||
|
original_instance = ::Settings.instance_variable_get(:@instance)
|
||||||
|
|
||||||
|
example.run
|
||||||
|
|
||||||
|
::Settings.instance_variable_set(:@instance, original_instance)
|
||||||
|
end
|
||||||
|
|
||||||
config.disable_monkey_patching!
|
config.disable_monkey_patching!
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue