Skip to content

Commit 975d9b0

Browse files
committed
Integrate steno logging library directly into cloud_controller_ng
This integrates the steno logging library as an internal component rather than an external gem dependency, allowing for better control, customization, and maintainability within the Cloud Controller codebase. Key Changes: - Integrated steno library code from cloudfoundry/steno repository - Removed steno gem dependency from Gemfile - Flattened steno directory structure under lib/steno/ - Removed unused steno features (Windows support, context providers, tagged logging) - Updated all require paths from 'steno' to 'steno/steno' - Removed lib/steno.rb wrapper file Steno Modifications: - Replaced Yajl with Oj JSON parser for better performance - Added syslog gem dependency for syslog sink functionality - Removed unused yajl-ruby gem - Applied RuboCop auto-corrections to integrated steno code - Integrated custom RFC3339 codec (lib/steno/codec/codec_rfc3339.rb) - Documented modification policy in README.md Bug Fixes: - Fixed race condition in syslog reset for parallel test execution - Added reset! method to Syslog singleton for proper test cleanup - Added nil guard to syslog sink add_record method - Fixed syslog sink mock leakage between tests - Fixed steno JSON codec timestamp test to accept Numeric types Test Infrastructure: - Moved steno tests to spec/isolated_specs/steno/ to prevent mock leakage - Restored and updated all steno unit tests - Fixed test isolation issues with syslog mocking - Created isolated test helper (spec/isolated_specs/steno/spec_helper.rb) Documentation: - Added NOTICE file from original steno repository - Added LICENSE file (Apache 2.0) - Created comprehensive README.md with integration history - Documented Rails/Delegate RuboCop change Related Changes: - Removed unused ByteQuantity class (replaced by ByteConverter) - Updated cloud_controller version files This integration enables better debugging, faster iteration, and eliminates external dependency management for a critical logging component.
1 parent 8062e38 commit 975d9b0

60 files changed

Lines changed: 8931 additions & 414 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/gem_freshness_report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
cat gem_freshness_report.md >> "$GITHUB_STEP_SUMMARY"
2323
2424
- name: Upload report artifact
25-
uses: actions/upload-artifact@v7
25+
uses: actions/upload-artifact@v6
2626
with:
2727
path: gem_freshness_report.md
2828
retention-days: 140

Gemfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ gem 'newrelic_rpm'
2222
gem 'nokogiri', '>=1.10.5'
2323
gem 'oj'
2424
gem 'openssl', '>= 3.2'
25+
gem 'palm_civet'
2526
gem 'prometheus-client'
2627
gem 'public_suffix'
2728
gem 'puma'
@@ -33,7 +34,7 @@ gem 'sequel_pg', require: 'sequel'
3334
gem 'sinatra', '~> 4.2'
3435
gem 'sinatra-contrib'
3536
gem 'statsd-ruby', '~> 1.5.0'
36-
gem 'steno'
37+
gem 'syslog'
3738
gem 'talentbox-delayed_job_sequel', '~> 4.4.0'
3839
gem 'uri', '~> 1.1'
3940
gem 'vmstat', '~> 2.3'
@@ -78,7 +79,7 @@ group :test do
7879
gem 'rspec-its'
7980
gem 'rspec-rails', '~> 8.0.3'
8081
gem 'rspec-wait'
81-
gem 'rubocop', '~> 1.85.0'
82+
gem 'rubocop', '~> 1.84.2'
8283
gem 'rubocop-capybara'
8384
gem 'rubocop-factory_bot'
8485
gem 'rubocop-rails', '~> 2.34'

Gemfile.lock

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -231,15 +231,15 @@ GEM
231231
google-apis-core (>= 0.11.0, < 2.a)
232232
google-cloud-env (1.6.0)
233233
faraday (>= 0.17.3, < 3.0)
234-
google-protobuf (4.34.0)
234+
google-protobuf (4.33.5)
235235
bigdecimal
236-
rake (~> 13.3)
237-
google-protobuf (4.34.0-x86_64-darwin)
236+
rake (>= 13)
237+
google-protobuf (4.33.5-x86_64-darwin)
238238
bigdecimal
239-
rake (~> 13.3)
240-
google-protobuf (4.34.0-x86_64-linux-gnu)
239+
rake (>= 13)
240+
google-protobuf (4.33.5-x86_64-linux-gnu)
241241
bigdecimal
242-
rake (~> 13.3)
242+
rake (>= 13)
243243
googleapis-common-protos (1.9.0)
244244
google-protobuf (~> 4.26)
245245
googleapis-common-protos-types (~> 1.21)
@@ -301,18 +301,15 @@ GEM
301301
crass (~> 1.0.2)
302302
nokogiri (>= 1.12.0)
303303
machinist (1.0.6)
304-
mcp (0.7.1)
305-
json-schema (>= 4.1)
306304
membrane (1.1.0)
307305
method_source (1.1.0)
308306
mime-types (3.7.0)
309307
logger
310308
mime-types-data (~> 3.2025, >= 3.2025.0507)
311-
mime-types-data (3.2026.0224)
309+
mime-types-data (3.2026.0203)
312310
mini_mime (1.1.5)
313311
mini_portile2 (2.8.9)
314-
minitest (6.0.2)
315-
drb (~> 2.0)
312+
minitest (6.0.1)
316313
prism (~> 1.5)
317314
mock_redis (0.53.0)
318315
redis (~> 5)
@@ -356,6 +353,7 @@ GEM
356353
openssl (4.0.1)
357354
os (1.1.4)
358355
ostruct (0.6.3)
356+
palm_civet (1.1.0)
359357
parallel (1.27.0)
360358
parallel_tests (5.6.0)
361359
parallel
@@ -401,8 +399,8 @@ GEM
401399
activesupport (>= 5.0.0)
402400
minitest
403401
nokogiri (>= 1.6)
404-
rails-html-sanitizer (1.7.0)
405-
loofah (~> 2.25)
402+
rails-html-sanitizer (1.6.2)
403+
loofah (~> 2.21)
406404
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
407405
railties (8.1.2)
408406
actionpack (= 8.1.2)
@@ -481,11 +479,10 @@ GEM
481479
activesupport (>= 3.0.0)
482480
mustache (~> 1.0, >= 0.99.4)
483481
rspec (~> 3.0)
484-
rubocop (1.85.0)
482+
rubocop (1.84.2)
485483
json (~> 2.3)
486484
language_server-protocol (~> 3.17.0.2)
487485
lint_roller (~> 1.1.0)
488-
mcp (~> 0.6)
489486
parallel (~> 1.10)
490487
parser (>= 3.3.0.2)
491488
rainbow (>= 2.2.2, < 4.0)
@@ -581,10 +578,8 @@ GEM
581578
spring-commands-rspec (1.0.4)
582579
spring (>= 0.9.1)
583580
statsd-ruby (1.5.0)
584-
steno (1.3.5)
585-
fluent-logger
586-
yajl-ruby (~> 1.0)
587581
stringio (3.2.0)
582+
syslog (0.1.2)
588583
talentbox-delayed_job_sequel (4.4.0)
589584
delayed_job (~> 4.1)
590585
sequel (>= 5.0, < 6.0)
@@ -612,7 +607,6 @@ GEM
612607
webrick (1.9.2)
613608
xml-simple (1.1.9)
614609
rexml
615-
yajl-ruby (1.4.3)
616610
yard (0.9.38)
617611
yard-activesupport-concern (0.0.1)
618612
yard (>= 0.8)
@@ -667,6 +661,7 @@ DEPENDENCIES
667661
nokogiri (>= 1.10.5)
668662
oj
669663
openssl (>= 3.2)
664+
palm_civet
670665
parallel_tests
671666
pg
672667
prometheus-client
@@ -685,7 +680,7 @@ DEPENDENCIES
685680
rspec-rails (~> 8.0.3)
686681
rspec-wait
687682
rspec_api_documentation (>= 6.1.0)
688-
rubocop (~> 1.85.0)
683+
rubocop (~> 1.84.2)
689684
rubocop-capybara
690685
rubocop-factory_bot
691686
rubocop-rails (~> 2.34)
@@ -702,7 +697,7 @@ DEPENDENCIES
702697
spring
703698
spring-commands-rspec
704699
statsd-ruby (~> 1.5.0)
705-
steno
700+
syslog
706701
talentbox-delayed_job_sequel (~> 4.4.0)
707702
timecop
708703
uri (~> 1.1)

Rakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ require File.expand_path('config/boot', __dir__)
99

1010
require 'yaml'
1111
require 'sequel'
12-
require 'steno'
12+
require 'steno/steno'
1313
require 'cloud_controller'
1414
require_relative 'lib/tasks/rake_config'
1515

app/models/runtime/process_model.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ def started_command
385385
def run_action_user
386386
return user if user.present?
387387

388-
app&.docker? ? docker_run_action_user : AppModel::DEFAULT_CONTAINER_USER
388+
docker? ? docker_run_action_user : AppModel::DEFAULT_CONTAINER_USER
389389
end
390390

391391
def specified_or_detected_command

config/version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.215.0
1+
3.214.0

config/version_v2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.280.0
1+
2.279.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.280.0",
106+
"api_version": "2.279.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: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,11 @@ GEM
108108
middleman-syntax (3.6.1)
109109
middleman-core (>= 3.2)
110110
rouge (~> 3.2)
111-
mini_racer (0.20.0)
111+
mini_racer (0.19.2)
112112
libv8-node (~> 24.12.0.1)
113113
minitest (6.0.1)
114114
prism (~> 1.5)
115+
mutex_m (0.3.0)
115116
nokogiri (1.19.1-arm64-darwin)
116117
racc (~> 1.4)
117118
nokogiri (1.19.1-x86_64-darwin)

0 commit comments

Comments
 (0)