railwatch 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ace6fc321d145d2e579b808a8ce2813b23bc85060d320f39dde2586da8c7db72
4
- data.tar.gz: 545154019cd93d2d3e605da2b5edf7318265d5c9b43c6e086b514da06a0fe43d
3
+ metadata.gz: 6efded747b3ad71d6a52964ab2d2f32b7a94a862a706d573ac983f013c720b75
4
+ data.tar.gz: 7310f931fc2f1215acf83345a7469c554be1692185fd76fb5f7af1d9fe80637e
5
5
  SHA512:
6
- metadata.gz: 20299db14a1865dcff87eddb613254b2fe83fc7ffc67f55afff8dd4b08e5c4593ee11b6082a4d57a9a7777045c4d5e3fa5df34c5c103bca008fde2bbe2663475
7
- data.tar.gz: f1105cf854e7b671aeb72b268959e49207101d09afb97f40ac90715d61739562fb2d494f2c21c443f09a86c49f5e2019af998848394c9d368b2ad0c2e602e0aa
6
+ metadata.gz: 74988c5b9f75e56774d8166c0c30fc4d87a9f23b22fed11e3b3d05b6e2b5044da1e069eaadce118ee7a84ec307d1f043bc1852b59e2b375a09f5ea6323368672
7
+ data.tar.gz: 0d183de6bf27ce94efb729b5000d7e37225520e1fe5fd38574392893bf7e8b0f2a3b170cf98bab74394b83bd08976b8726b8d5a919cffd1a5c793e4141fc4e59
data/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.1 (2026-09-19)
4
+
5
+ - Fix production boot for cloud-only installs with no Railwatch databases.
6
+ Versions 0.2.0 through 0.3.0 eagerly loaded embedded models even when
7
+ reporting over HTTP. Hosts using `activerecord-tenanted` (or disabling
8
+ `active_record.check_schema_cache_dump_version`) then failed with
9
+ `Railwatch::DatabaseNotConfigured` when Rails inspected their connection
10
+ pools. Hosts without Solid Queue also failed while loading embedded jobs.
11
+ HTTP installs now leave embedded models, jobs and dashboard controllers
12
+ out of eager loading; the browser beacon and HTTP reporting still work.
13
+ `transport = :local` keeps its existing eager loading and database guards.
14
+ - Add production subprocess regressions with only a primary database,
15
+ checking boot, health, browser beacons and HTTP exception delivery without
16
+ loading `TelemetryRecord` or any embedded database model.
17
+
3
18
  ## 0.3.0 (2026-09-19)
4
19
 
5
20
  - An embedded install can now also mirror its telemetry to Railwatch Cloud,
@@ -57,6 +57,24 @@ module Railwatch
57
57
  app.middleware.insert_before 0, Railwatch::Middleware::Request
58
58
  end
59
59
 
60
+ # HTTP installs have no embedded databases or job backend. Loading their
61
+ # models still registers them with Active Record, whose schema-cache boot
62
+ # hook asks every descendant for its connection_pool (e.g. with
63
+ # activerecord-tenanted). Decide after the host's initializer selects the
64
+ # transport. Keep autoloading available for the local installer and tools;
65
+ # only local installs should eagerly load the embedded models and jobs.
66
+ # Dashboard controllers also reference model constants in their class
67
+ # bodies. The beacon is the only controller a cloud install needs.
68
+ initializer "railwatch.embedded_eager_loading", after: :load_config_initializers, before: :setup_main_autoloader do
69
+ next if Railwatch.config.local?
70
+
71
+ Rails.autoloaders.main.do_not_eager_load(root.join("app/models"))
72
+ Rails.autoloaders.main.do_not_eager_load(root.join("app/jobs"))
73
+ root.glob("app/controllers/railwatch/*.rb").each do |path|
74
+ Rails.autoloaders.main.do_not_eager_load(path) unless path.basename.to_s == "beacon_controller.rb"
75
+ end
76
+ end
77
+
60
78
  # Before anything subscribes or starts a thread, and after the app's own
61
79
  # initializer has had its say about config: a console captures nothing.
62
80
  initializer "railwatch.console", after: :load_config_initializers, before: "railwatch.subscribe" do
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Railwatch
4
- VERSION = "0.3.0"
4
+ VERSION = "0.3.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: railwatch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cole Robertson