foreman_remote_execution 13.2.7 → 13.2.8
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f0995bba1565ba78151872654d71a89d64c73fc66fe4b814800c273eabc3e5cb
|
4
|
+
data.tar.gz: 22cc0e52dc17539db11a40a9230e69c7d9d5a3c0ae2a21a245d7c22652d4a0bd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 76c8f7e4e9b6ab06ebc5e6ba6562be5dafbce07f02172e46dae24604040c9ef6b89c31111bdcda46bee2cf163e526a83158b7cb010c34c73585225fd60f1fb42
|
7
|
+
data.tar.gz: db5baca331f172e40b24b740b46f9cb36b2ccf100d31193b11355c76772e748b2155e4afe42eb59c526841efdaa23ac5d92787c6e23304428788897f49f146b5
|
@@ -1,10 +1,13 @@
|
|
1
1
|
class MigrateSmartProxyIdsToTemplateInvocations < ActiveRecord::Migration[6.0]
|
2
2
|
def up
|
3
|
+
proxy_lookup_cache = {}
|
3
4
|
ForemanTasks::Link.joins(:task)
|
4
5
|
.where(resource_type: 'SmartProxy', task: { label: 'Actions::RemoteExecution::RunHostJob' })
|
5
6
|
.where.not(resource_id: nil)
|
6
7
|
.find_in_batches do |batch|
|
7
8
|
batch.group_by(&:resource_id).each do |resource_id, links|
|
9
|
+
proxy_lookup_cache[resource_id] = SmartProxy.where(id: resource_id).exists? unless proxy_lookup_cache.key?(resource_id)
|
10
|
+
next unless proxy_lookup_cache[resource_id]
|
8
11
|
template_invocation_ids = ForemanTasks::Link.where(resource_type: 'TemplateInvocation', task_id: links.map(&:task_id)).select(:resource_id)
|
9
12
|
TemplateInvocation.where(id: template_invocation_ids).update_all(smart_proxy_id: resource_id)
|
10
13
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_remote_execution
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 13.2.
|
4
|
+
version: 13.2.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Foreman Remote Execution team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-03-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: deface
|