ductwork 1.1.1 → 1.1.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 +4 -4
- data/CHANGELOG-PRO.md +10 -2
- data/CHANGELOG.md +5 -0
- data/lib/ductwork/engine.rb +0 -1
- data/lib/ductwork/models/execution.rb +1 -1
- data/lib/ductwork/models/step.rb +6 -7
- data/lib/ductwork/version.rb +1 -1
- data/lib/ductwork.rb +6 -2
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 936ce40a67d02217db84222c1a30d002c2214b73585c04a05022ce91d87160a6
|
|
4
|
+
data.tar.gz: c87fc48ed8be92be080f4ecf7c1c58f33d09a532d6ff7ca8c9d99143e2f21dae
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 237854d56ac87c1552813541a1ef1d275db94fe16637b96ca7997ee7939a31a5d442b145851d1e25c49a37a4320a39421de338fb9260848c5b51f5d678efdf2a
|
|
7
|
+
data.tar.gz: 7c18082ff55ca438f2a9c7d5f0cb8932c5933d66462a43bb6a1637807d0dd301ec51190e432d84ec370b916e4b666fe93574b2cea38c260c60bddef8dbda7ab7
|
data/CHANGELOG-PRO.md
CHANGED
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
# Ductwork Pro Changelog
|
|
2
2
|
|
|
3
|
-
## [1.1.1]
|
|
4
|
-
|
|
3
|
+
## [1.1.1]
|
|
4
|
+
|
|
5
|
+
- fix: use `Ductwork::DatabaseClock` instead of `Time.current` for every `started_at` Pro stamps, mirroring the OSS fix
|
|
6
|
+
- fix: evaluate the step-timeout deadline in the database (`DatabaseClock.ago_sql`) instead of subtracting `attempt.started_at` from the worker's `Time.current`, so an NTP correction mid-job cannot stretch or collapse a step's timeout
|
|
7
|
+
- fix: temporarily handle multiple return types from `Branch.with_latest_claimed` - this is a result of changes in OSS from v1.1.0 and v1.1.1
|
|
8
|
+
- fix: log the claimed job/branch of a dead thread before the restart clears it
|
|
9
|
+
- fix: add rubocop cop for ensuring `updated_at` is updated (copied from OSS)
|
|
10
|
+
- fix: explicitly set `updated_at` for queries that update the record directly
|
|
11
|
+
- fix: mirror OSS `halt_branch_and_resolve_run_without_rescue!` implementation
|
|
12
|
+
- fix: walk the `collapse` fan-in with an explicit keyset scan so each batch is one indexed range seek, instead of a per-batch subquery plus a second `in_batches` query that re-ran the whole scope
|
|
5
13
|
- fix: don't use `unique_by` argument for `insert_all` for mysql and trilogy database adapters
|
|
6
14
|
|
|
7
15
|
## [1.1.0]
|
data/CHANGELOG.md
CHANGED
data/lib/ductwork/engine.rb
CHANGED
|
@@ -29,7 +29,7 @@ module Ductwork
|
|
|
29
29
|
job_klass: job.klass
|
|
30
30
|
)
|
|
31
31
|
args = JSON.parse(job.input_args)["args"]
|
|
32
|
-
instance = Object.const_get(job.klass).build_for_execution(job.step.run_id, *args)
|
|
32
|
+
instance = Object.const_get(job.klass).build_for_execution(job.step.run_id, job.step.id, *args)
|
|
33
33
|
create_attempt!(started_at: Time.current)
|
|
34
34
|
output_payload = nil
|
|
35
35
|
|
data/lib/ductwork/models/step.rb
CHANGED
|
@@ -40,23 +40,22 @@ module Ductwork
|
|
|
40
40
|
converge: "converge",
|
|
41
41
|
dampen: "dampen"
|
|
42
42
|
|
|
43
|
-
def self.build_for_execution(run_id, *, **)
|
|
43
|
+
def self.build_for_execution(run_id, idempotency_key, *, **)
|
|
44
44
|
instance = allocate
|
|
45
45
|
instance.instance_variable_set(:@run_id, run_id)
|
|
46
|
+
instance.instance_variable_set(:@idempotency_key, idempotency_key)
|
|
46
47
|
instance.send(:initialize, *, **)
|
|
47
48
|
instance
|
|
48
49
|
end
|
|
49
50
|
|
|
50
|
-
alias_attribute :idempotency_key, :id
|
|
51
|
-
|
|
52
51
|
def run_id
|
|
53
52
|
@run_id || (@attributes && super)
|
|
54
53
|
end
|
|
55
54
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
55
|
+
def idempotency_key
|
|
56
|
+
@idempotency_key || (@attributes && id)
|
|
57
|
+
end
|
|
58
|
+
|
|
60
59
|
def terminal_result_type
|
|
61
60
|
return if job.blank?
|
|
62
61
|
|
data/lib/ductwork/version.rb
CHANGED
data/lib/ductwork.rb
CHANGED
|
@@ -11,8 +11,12 @@ require "zeitwerk"
|
|
|
11
11
|
|
|
12
12
|
module Ductwork
|
|
13
13
|
class << self
|
|
14
|
-
attr_accessor :app_executor, :
|
|
15
|
-
attr_writer :defined_pipelines, :hooks
|
|
14
|
+
attr_accessor :app_executor, :loader, :logger
|
|
15
|
+
attr_writer :configuration, :defined_pipelines, :hooks
|
|
16
|
+
|
|
17
|
+
def configuration
|
|
18
|
+
@configuration ||= Ductwork::Configuration.new
|
|
19
|
+
end
|
|
16
20
|
|
|
17
21
|
def eager_load
|
|
18
22
|
loader.eager_load
|