foreman_remote_execution 14.1.1 → 14.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0c7d7e0afd2637caccf6c287144c92599fd6abb3acecdc27b4fdfa960bc12e8a
4
- data.tar.gz: 85e3859a4e3c81e03cc0441222d79bec187156e942e1abd3f4aec17b67c1a044
3
+ metadata.gz: 5e583aa5a9aac3e6a34ae0f42fa35f154d56830ad88558dbe86513389fe1dbb5
4
+ data.tar.gz: 2cd7f2449b0e5a8b4925462c0fbb4bb02912586173d204db1d25d644f0fd1bdb
5
5
  SHA512:
6
- metadata.gz: e24ea3d8af7755d15f5ed7b72b606590835414521b5bd100b137fcffdf0496bb6a2f52d94140622f18ed7121bf07725ffed2be76d7ef4ca648664f6b47a9b385
7
- data.tar.gz: b8ef21fe312ee53f7dd60e746c0fed2e8e60386c06202cddc6c3ad23da3beaccdbd0f01214517a4a80c17546d1c32fa74a80c4de4a0d783be1a78dda8703ddcd
6
+ metadata.gz: c8d3f21e337dee5e4102eeccdd4717539cf2422938302311953c6ac2bc37050c082c0cd5f68ad82041ea2b6bcebd89dd934708862694658632c5b941221b9ef4
7
+ data.tar.gz: 5dfcabcae4a0cf33e8806936b2e8b23ea5030be225cc0b1ff3b6f8f60c48eb2f4456feb7a5597b437d5f49d9d162295bfa5069fad950f73056afec35a1a166fb
@@ -64,6 +64,7 @@ class JobTemplate < ::Template
64
64
  # will overwrite (sync) an existing template if options[:update] is true.
65
65
  def import_raw(contents, options = {})
66
66
  metadata = Template.parse_metadata(contents)
67
+ return unless SeedHelper.test_template_requirements(metadata['name'], metadata['require'] || [])
67
68
  import_parsed(metadata['name'], contents, metadata, options)
68
69
  end
69
70
 
@@ -9,7 +9,7 @@ var target = $("div.terminal div.printable");
9
9
  target.html(lines);
10
10
  <% end %>
11
11
 
12
- <%= render :partial => 'refresh.js' %>
12
+ <%= render partial: 'refresh', formats: :js %>
13
13
 
14
14
  if (scrolledToBottom) {
15
15
  $("html, body").animate({ scrollTop: $(document).height() }, "slow");
@@ -6,6 +6,15 @@ class ExtendTemplateInvocationEvents < ActiveRecord::Migration[6.1]
6
6
 
7
7
  TemplateInvocationEvent.update_all("external_id = CASE WHEN event_type = 'exit' THEN 'exit' ELSE sequence_id::varchar END")
8
8
 
9
+ # For each template invocation return the lowest id of its exit event, if there is more than 1 exit event
10
+ scope = TemplateInvocationEvent.select("MIN(id) as id")
11
+ .where(external_id: 'exit')
12
+ .group(:template_invocation_id)
13
+ .having("count(*) > 1")
14
+
15
+ # Make sure there is at most one exit event per template invocation
16
+ TemplateInvocationEvent.where(:id => scope.limit(BATCH_SIZE)).delete_all while scope.any?
17
+
9
18
  remove_index :template_invocation_events, name: :unique_template_invocation_events_index
10
19
  remove_column :template_invocation_events, :sequence_id
11
20
 
@@ -0,0 +1,8 @@
1
+ class RemoveRemoteExecutionWorkersPoolSize < ActiveRecord::Migration[6.1]
2
+ def up
3
+ Setting.find_by(:name => 'remote_execution_workers_pool_size')&.delete
4
+ end
5
+
6
+ def down
7
+ end
8
+ end
@@ -28,7 +28,7 @@ module ForemanRemoteExecution
28
28
 
29
29
  initializer 'foreman_remote_execution.require_dynflow', :before => 'foreman_tasks.initialize_dynflow' do |app|
30
30
  ForemanTasks.dynflow.require!
31
- ForemanTasks.dynflow.config.queues.add(DYNFLOW_QUEUE, :pool_size => Setting['remote_execution_workers_pool_size']) if Setting.table_exists? rescue(false)
31
+ ForemanTasks.dynflow.config.queues.add(DYNFLOW_QUEUE)
32
32
  ForemanTasks.dynflow.config.eager_load_paths << File.join(ForemanRemoteExecution::Engine.root, 'app/lib/actions')
33
33
  end
34
34
 
@@ -117,11 +117,6 @@ module ForemanRemoteExecution
117
117
  default: nil,
118
118
  full_name: N_('Default SSH key passphrase'),
119
119
  encrypted: true
120
- setting 'remote_execution_workers_pool_size',
121
- type: :integer,
122
- description: N_('Amount of workers in the pool to handle the execution of the remote execution jobs. Restart of the dynflowd/foreman-tasks service is required.'),
123
- default: 5,
124
- full_name: N_('Workers pool size')
125
120
  setting 'remote_execution_cleanup_working_dirs',
126
121
  type: :boolean,
127
122
  description: N_('When enabled, working directories will be removed after task completion. You may override this per host by setting a parameter called remote_execution_cleanup_working_dirs.'),
@@ -1,3 +1,3 @@
1
1
  module ForemanRemoteExecution
2
- VERSION = '14.1.1'.freeze
2
+ VERSION = '14.1.3'.freeze
3
3
  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: 14.1.1
4
+ version: 14.1.3
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: 2024-11-12 00:00:00.000000000 Z
11
+ date: 2024-12-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: deface
@@ -341,6 +341,7 @@ files:
341
341
  - db/migrate/20240312133027_extend_template_invocation_events.rb
342
342
  - db/migrate/20240522093412_add_smart_proxy_id_to_template_invocation.rb
343
343
  - db/migrate/20240522093413_migrate_smart_proxy_ids_to_template_invocations.rb
344
+ - db/migrate/20241126150849_remove_remote_execution_workers_pool_size.rb
344
345
  - db/seeds.d/100-assign_features_with_templates.rb
345
346
  - db/seeds.d/20-permissions.rb
346
347
  - db/seeds.d/50-notification_blueprints.rb