forest_admin_agent 1.35.1 → 1.35.2

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: 15a2d513ed232a5bca5bba8c389cf2a58187dd25aa5c33e36a61422d08ce92bf
4
- data.tar.gz: 89fd3b7ec0fd5640cfb8ed49b187947b63cc3652ade97f5c71520318ce2642ff
3
+ metadata.gz: 15d12af04878fa524aa9b4777a494f4007c632eac82f846cdde8b040f20362bd
4
+ data.tar.gz: 2cf2846e4b62c8f40f327cdcac8641353dd8220aa2ee69bad4262cc39ee348d9
5
5
  SHA512:
6
- metadata.gz: bbacdd41de813dda9656c1907767bf2f2ab247d2754532071e5dbee178257b57e71e960fade3c95286f7822dda95d96a78bade0f09290e4c27ab1a6a01716da7
7
- data.tar.gz: 571a81800a30a96709711340c7efce1e89ffc92c4322c40388a8705cdc90d1933e5e0515fdc30d1f5930be4493fbfa5ff653b035c441cf27140d8c5aec6f70da
6
+ metadata.gz: eee41846089c048442fb8729f2e3121751bd6cdec6da30a6b7b2a5f6f5449eb9e85b47d865ba218355b8cc2cd93d8d4bc104dd44ebe1f46143a8599a81252caf
7
+ data.tar.gz: c3bc4bcfd27d3529587cc3f4bd9fb3ce5aa316f83f9d37156cee08c018aa1306b94b25d408aea083b69d3d43886afc3cd79d6d2e461869981d9bb0ba667374dc
@@ -99,6 +99,8 @@ module ForestAdminAgent
99
99
 
100
100
  # Reset route cache before sending schema to ensure routes are recomputed with all customizations
101
101
  ForestAdminAgent::Http::Router.reset_cached_routes!
102
+ # The datasource was rebuilt, so the serializer's primary-key cache may be stale
103
+ ForestAdminAgent::Serializer::ForestSerializer.reset_cache!
102
104
  @logger.log('Info', 'route cache cleared due to agent reload')
103
105
 
104
106
  send_schema
@@ -24,11 +24,15 @@ module ForestAdminAgent
24
24
  @@class_names[class_name] ||= class_name.gsub('::', '__')
25
25
  end
26
26
 
27
+ def self.reset_cache!
28
+ @@primary_keys = {}
29
+ end
30
+
27
31
  def id
28
- forest_collection = ForestAdminAgent::Facades::Container.datasource.get_collection(
29
- @options[:class_name].gsub('::', '__')
32
+ @@primary_keys ||= {}
33
+ primary_keys = @@primary_keys[type] ||= ForestAdminDatasourceToolkit::Utils::Schema.primary_keys(
34
+ ForestAdminAgent::Facades::Container.datasource.get_collection(type)
30
35
  )
31
- primary_keys = ForestAdminDatasourceToolkit::Utils::Schema.primary_keys(forest_collection)
32
36
  primary_keys.map { |key| @object[key] }.join('|')
33
37
  end
34
38
 
@@ -6,7 +6,7 @@ module ForestAdminAgent
6
6
  module Schema
7
7
  class SchemaEmitter
8
8
  LIANA_NAME = "agent-ruby"
9
- LIANA_VERSION = "1.35.1"
9
+ LIANA_VERSION = "1.35.2"
10
10
 
11
11
  def self.generate(datasource)
12
12
  datasource.collections
@@ -1,3 +1,3 @@
1
1
  module ForestAdminAgent
2
- VERSION = "1.35.1"
2
+ VERSION = "1.35.2"
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.35.1
4
+ version: 1.35.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthieu