Skip to content

Commit 40debd0

Browse files
committed
Merge remote-tracking branch 'origin/main' into TNZ-44895-recreate
2 parents b98f8ea + badaab8 commit 40debd0

32 files changed

+439
-38
lines changed

Gemfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ GEM
486486
rubocop-ast (>= 1.44.0, < 2.0)
487487
ruby-progressbar (~> 1.7)
488488
unicode-display_width (>= 2.4.0, < 4.0)
489-
rubocop-ast (1.44.1)
489+
rubocop-ast (1.45.1)
490490
parser (>= 3.3.7.2)
491491
prism (~> 1.4)
492492
rubocop-capybara (2.22.1)
@@ -544,7 +544,7 @@ GEM
544544
rack-protection (= 3.2.0)
545545
sinatra (= 3.2.0)
546546
tilt (~> 2.0)
547-
solargraph (0.55.0)
547+
solargraph (0.55.1)
548548
backport (~> 1.2)
549549
benchmark (~> 0.4)
550550
bundler (~> 2.0)

app/controllers/internal/metrics_controller.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
module VCAP::CloudController
55
module Internal
6+
# This controller is only used when the webserver is not Puma
7+
# When using Puma, the metrics are served by a separate webserver in the main process
68
class MetricsController < RestController::BaseController
79
allow_unauthenticated_access
810
get '/internal/v4/metrics', :index

app/jobs/runtime/failed_jobs_cleanup.rb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,18 @@ def perform
2020

2121
old_delayed_jobs.delete
2222

23+
# There were some very old jobs in the table which did not get cleaned up
24+
# This deletes those orphaned jobs, which were scheduled to run before the cutoff age + 1 day
25+
force_delete_after = cutoff_age_in_days.to_i + 1
26+
orphaned_delayed_jobs = Delayed::Job.
27+
where(Sequel.lit("run_at < CURRENT_TIMESTAMP - INTERVAL '?' DAY", force_delete_after))
28+
29+
unless orphaned_delayed_jobs.count.zero?
30+
logger.info("Deleting #{orphaned_delayed_jobs.count} orphaned Delayed Jobs older than #{force_delete_after} days")
31+
32+
orphaned_delayed_jobs.delete
33+
end
34+
2335
return if max_number_of_failed_delayed_jobs.nil?
2436

2537
ids_exceeding_limit = Delayed::Job.

app/models/runtime/app_model.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,12 @@ def database_uri
125125
DatabaseUriGenerator.new(service_binding_uris).database_uri
126126
end
127127

128+
def windows_gmsa_credential_refs
129+
service_bindings.sort_by(&:id).map do |binding|
130+
binding.credentials['credhub-windows-gmsa-credential-ref'] if binding.credentials.present?
131+
end.compact
132+
end
133+
128134
def staging_in_progress?
129135
builds_dataset.where(state: BuildModel::STAGING_STATE).any?
130136
end

app/models/runtime/process_model.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,8 @@ def database_uri
453453
DatabaseUriGenerator.new(service_binding_uris).database_uri
454454
end
455455

456+
delegate :windows_gmsa_credential_refs, to: :app
457+
456458
def max_app_disk_in_mb
457459
VCAP::CloudController::Config.config.get(:maximum_app_disk_in_mb)
458460
end

config/version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.196.0
1+
3.197.0

config/version_v2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.261.0
1+
2.262.0

docs/v2/info/get_info.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ <h4>Body</h4>
103103
"token_endpoint": "http://localhost:8080/uaa",
104104
"min_cli_version": null,
105105
"min_recommended_cli_version": null,
106-
"api_version": "2.261.0",
106+
"api_version": "2.262.0",
107107
"app_ssh_endpoint": "ssh.system.domain.example.com:2222",
108108
"app_ssh_host_key_fingerprint": "47:0d:d1:c8:c3:3d:0a:36:d1:49:2f:f2:90:27:31:d0",
109109
"app_ssh_oauth_client": null,

docs/v3/Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ GEM
3737
http_parser.rb (0.8.0)
3838
i18n (1.6.0)
3939
concurrent-ruby (~> 1.0)
40-
json (2.11.3)
40+
json (2.12.2)
4141
kramdown (2.4.0)
4242
rexml
4343
libv8-node (23.6.1.0)

lib/cloud_controller/config_schemas/base/api_schema.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,8 @@ class ApiSchema < VCAP::Config
134134

135135
nginx: {
136136
use_nginx: bool,
137-
instance_socket: String
137+
instance_socket: String,
138+
optional(:metrics_socket) => String
138139
},
139140

140141
quota_definitions: Hash,

0 commit comments

Comments
 (0)