katello 4.1.0.rc1 → 4.1.0.rc1.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of katello might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cc20921c082e7725e89028befc8b8e9469b5088304795b5cbeb4cfc9bc343866
4
- data.tar.gz: aee4945d14f0e66a96d516eb3e47ee0e93fc02d9bb7384e28f5d360646a73a88
3
+ metadata.gz: 8fa898f182416d7da9cfa56ef84ea10f11e4a18981202e4ba0ad65367408a4ca
4
+ data.tar.gz: e917344f18c0c835e31acc4463bfff10808a41e66fad2c3f9d833c55c234abae
5
5
  SHA512:
6
- metadata.gz: b868b400fb3a0be4e7db0755700b45b5388e4c433a447dfe335c7bc156f40b5dc557fce7553aa79fa2eaa61bb83e0ceae3c27cbb7deb2458efb15f7ac890df22
7
- data.tar.gz: 550c55ae8bec58857cfa5b75d33579f9c9de56013a58f273487fdccdf9378890f2d47ac257fdf8b2b29a89fd648cdd8e668725358b169dcf35f0277d7758e0a3
6
+ metadata.gz: 98470123a70cff266bec4e69e281bba4b492192ff815d57f92f1a1decadbbff15aeabbe5b02abd97c7a60a2fc20f9b853addfec46075dcdbdd1dd3893ae03380
7
+ data.tar.gz: c9a0bc998ef5413fb348f983b132d385dbdd9d1039098dbee25adc71456b34fd9ec31b45e26c93ade8f9b02672bc0be75a6d08772ccb6da1716a6b6da02d2833
@@ -83,7 +83,12 @@ module Actions
83
83
  end
84
84
 
85
85
  unless history.finished?
86
- fail _("Host did not finish content action in %s seconds. The task has been cancelled.") % finish_timeout
86
+ # we could be processing the accept_timeout here
87
+ # only fail for finish_timeout unless the actual duration has elapsed
88
+ finish_limit = history.accepted_at + finish_timeout
89
+ if finish_limit < DateTime.now
90
+ fail _("Host did not finish content action in %s seconds. The task has been cancelled.") % finish_timeout
91
+ end
87
92
  end
88
93
  end
89
94
 
@@ -34,9 +34,17 @@ module Katello
34
34
  private
35
35
 
36
36
  def handle_dynflow_event
37
- task_exists = ForemanTasks::Task.exists?(external_id: @dispatch_history.dynflow_execution_plan_id, result: 'pending')
38
- unless task_exists
39
- logger.warn("Couldn't find pending task with external_id=#{@dispatch_history.dynflow_execution_plan_id} dispatch_history_id=#{@dispatch_history.id}")
37
+ return unless accepted? || result
38
+
39
+ task = ForemanTasks::Task.find_by_external_id(@dispatch_history.dynflow_execution_plan_id)
40
+
41
+ unless task
42
+ logger.info("Task external_id=#{@dispatch_history.dynflow_execution_plan_id} wasn't found. Skipping dynflow event dispatch")
43
+ return
44
+ end
45
+
46
+ unless task.result == 'pending'
47
+ logger.info("Task is no longer pending. Skipping dynflow event dispatch. task_result=#{task.result} external_id=#{@dispatch_history.dynflow_execution_plan_id} dispatch_history_id=#{@dispatch_history.id}")
40
48
  return
41
49
  end
42
50
 
@@ -1,3 +1,3 @@
1
1
  module Katello
2
- VERSION = "4.1.0.rc1".freeze
2
+ VERSION = "4.1.0.rc1.1".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: katello
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.0.rc1
4
+ version: 4.1.0.rc1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - N/A
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-12 00:00:00.000000000 Z
11
+ date: 2021-05-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails