forest_admin_agent 1.23.2 → 1.23.3

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: 31c8113dcfdf539cc8bce30b1d61066e3ae29484ff675217e2f601e813829db8
4
- data.tar.gz: 60c2d04f5d0653a01ed53aeade0199d9bd08594acf64cf54411f0bd805c2dead
3
+ metadata.gz: f3ad3ae17fca69b00f59412bfaed1badbb92a6b759687d8d06b0ae6d5748f1dd
4
+ data.tar.gz: 30787bb99d88d2ef2aaa9640b8499881336ae53ec46b8bc585de48402e5a0639
5
5
  SHA512:
6
- metadata.gz: 59d684cc52d57302a44b30c07acd3738a6db642e101da557002341ac5fc0a528359c23f185321ece04767eb6227c640ee393a7304143efc373077bb569f84de9
7
- data.tar.gz: 32e5c5e21f455aa0101dad6d13121039634e6065c46063b02dad914f181ec34d716476ef47f140b2543bf72237e546cf28d6788b19ac077c05dcbe1eb7b6ae20
6
+ metadata.gz: 9a29219249daba534a3994b435fc946c9c5c71d2cafdb46fb733f9b7f8717f86683922b62d93fc8430c36a0f1a1f3067de1b456fc8dd4545df0fec83703dd76b
7
+ data.tar.gz: d3a895d0174197c58cec193d98eb88f1533de8d40db7682753a761292c0275a3846894850afc02967a90d962041df703ade7cf8f3bed2721158659eaa2ec5fb3
@@ -161,9 +161,7 @@ module ForestAdminAgent
161
161
  should_send = do_server_want_schema(api_map[:meta][:schemaFileHash])
162
162
 
163
163
  if should_send || force
164
- client = ForestAdminAgent::Http::ForestAdminApiRequester.new
165
- client.post('/forest/apimaps', api_map.to_json)
166
- ForestAdminAgent::Facades::Container.logger.log('Info', 'schema was updated, sending new version')
164
+ send_schema_to_server(api_map)
167
165
  else
168
166
  @container.resolve(:logger)
169
167
  ForestAdminAgent::Facades::Container.logger.log('Info', 'Schema was not updated since last run')
@@ -241,6 +239,25 @@ module ForestAdminAgent
241
239
  @logger.log('Info',
242
240
  "[ForestAdmin] Running in #{environment} mode")
243
241
  end
242
+
243
+ def send_schema_to_server(api_map)
244
+ ForestAdminAgent::Facades::Container.logger.log('Info', 'schema was updated, sending new version')
245
+ client = ForestAdminAgent::Http::ForestAdminApiRequester.new
246
+ client.post('/forest/apimaps', api_map.to_json)
247
+ rescue Faraday::Error => e
248
+ status = e.response[:status] if e.response
249
+ if status
250
+ ForestAdminAgent::Facades::Container.logger.log(
251
+ 'Error',
252
+ "Failed to send schema: invalid request (HTTP #{status})"
253
+ )
254
+ else
255
+ ForestAdminAgent::Facades::Container.logger.log(
256
+ 'Error',
257
+ 'Failed to send schema: cannot reach ForestAdmin server'
258
+ )
259
+ end
260
+ end
244
261
  end
245
262
  end
246
263
  end
@@ -6,7 +6,7 @@ module ForestAdminAgent
6
6
  module Schema
7
7
  class SchemaEmitter
8
8
  LIANA_NAME = "agent-ruby"
9
- LIANA_VERSION = "1.23.2"
9
+ LIANA_VERSION = "1.23.3"
10
10
 
11
11
  def self.generate(datasource)
12
12
  datasource.collections
@@ -1,3 +1,3 @@
1
1
  module ForestAdminAgent
2
- VERSION = "1.23.2"
2
+ VERSION = "1.23.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: forest_admin_agent
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.23.2
4
+ version: 1.23.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthieu
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2026-02-06 00:00:00.000000000 Z
12
+ date: 2026-02-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport