ductwork 1.1.2 → 1.2.0

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: 936ce40a67d02217db84222c1a30d002c2214b73585c04a05022ce91d87160a6
4
- data.tar.gz: c87fc48ed8be92be080f4ecf7c1c58f33d09a532d6ff7ca8c9d99143e2f21dae
3
+ metadata.gz: 402e7de6f5703214be13a443e54a5b74f113500a22ad42727db969a7bcb39b69
4
+ data.tar.gz: 9889dd598476068548da0f6cf9e63cf94f72e6e124b837d3abe2994de6a2770f
5
5
  SHA512:
6
- metadata.gz: 237854d56ac87c1552813541a1ef1d275db94fe16637b96ca7997ee7939a31a5d442b145851d1e25c49a37a4320a39421de338fb9260848c5b51f5d678efdf2a
7
- data.tar.gz: 7c18082ff55ca438f2a9c7d5f0cb8932c5933d66462a43bb6a1637807d0dd301ec51190e432d84ec370b916e4b666fe93574b2cea38c260c60bddef8dbda7ab7
6
+ metadata.gz: 2eb520b852ff56484b7afd3f89a525f4e444ba2a04a03ff3d97152bdad625cf5d393a2500a72bcdd2ca8a4122f726caaadcd8aa4c626e70e8ba6397ec84bd5df
7
+ data.tar.gz: 8667ad5225297be4b5c98383fbe0ad3766e18a33391912d110e9aae94bcaa5c9949089fb2c8f4eb0d6f0f17c8588626e82e6c7abe90aa0293a2081dffe8aef82
data/CHANGELOG-PRO.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Ductwork Pro Changelog
2
2
 
3
+ ## [1.1.2]
4
+
5
+ - fix: remove unnecessary setting of configuration object during class-level evaluation - this catches up with OSS changes
6
+ - fix: pass extra step id argument when instantiating steps during execution - this catches up with current OSS changes
7
+
3
8
  ## [1.1.1]
4
9
 
5
10
  - fix: use `Ductwork::DatabaseClock` instead of `Time.current` for every `started_at` Pro stamps, mirroring the OSS fix
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Ductwork Changelog
2
2
 
3
+ ## [1.2.0]
4
+
5
+ - feat: add `add_availability_claim_index` and `remove_availability_claim_index` to `Ductwork::MigrationHelper`, which own the adapter-specific shape and the name of the availability claim index
6
+ - chore: build the availability claim index through the new migration helpers
7
+
3
8
  ## [1.1.2]
4
9
 
5
10
  - fix: lazily create configuration
@@ -2,6 +2,29 @@
2
2
 
3
3
  module Ductwork
4
4
  module MigrationHelper
5
+ AVAILABILITY_CLAIM_INDEX_NAME = "index_ductwork_availabilities_on_claim_latest"
6
+
7
+ def add_availability_claim_index(extra_columns: [], where_extra: nil)
8
+ if mysql?
9
+ add_index :ductwork_availabilities,
10
+ [:pipeline_klass, :completed_at, *extra_columns, :started_at],
11
+ name: AVAILABILITY_CLAIM_INDEX_NAME
12
+ else
13
+ predicate = ["completed_at IS NULL", where_extra].compact.join(" AND ")
14
+
15
+ add_index :ductwork_availabilities,
16
+ %i[pipeline_klass started_at],
17
+ name: AVAILABILITY_CLAIM_INDEX_NAME,
18
+ where: predicate
19
+ end
20
+ end
21
+
22
+ def remove_availability_claim_index
23
+ remove_index :ductwork_availabilities,
24
+ name: AVAILABILITY_CLAIM_INDEX_NAME,
25
+ if_exists: true
26
+ end
27
+
5
28
  def create_ductwork_table(table_name, &block)
6
29
  if postgresql?
7
30
  create_table table_name, id: :uuid, &block
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Ductwork
4
- VERSION = "1.1.2"
4
+ VERSION = "1.2.0"
5
5
  end
@@ -26,15 +26,6 @@ class CreateDuctworkAvailabilities < Ductwork::Migration
26
26
  add_index :ductwork_availabilities, :execution_id, unique: true
27
27
  add_index :ductwork_availabilities, %i[id process_id]
28
28
 
29
- if mysql?
30
- add_index :ductwork_availabilities,
31
- %i[pipeline_klass completed_at started_at],
32
- name: "index_ductwork_availabilities_on_claim_latest"
33
- else
34
- add_index :ductwork_availabilities,
35
- %i[pipeline_klass started_at],
36
- name: "index_ductwork_availabilities_on_claim_latest",
37
- where: "completed_at IS NULL"
38
- end
29
+ add_availability_claim_index
39
30
  end
40
31
  end
@@ -11,17 +11,7 @@ class DenormalizePipelineKlassOnAvailabilities < Ductwork::Migration
11
11
  .update_all(pipeline_klass: "Pipeline")
12
12
 
13
13
  change_column_null :ductwork_availabilities, :pipeline_klass, false
14
- remove_index :ductwork_availabilities, name: "index_ductwork_availabilities_on_claim_latest"
15
-
16
- if mysql?
17
- add_index :ductwork_availabilities,
18
- %i[pipeline_klass completed_at started_at],
19
- name: "index_ductwork_availabilities_on_claim_latest"
20
- else
21
- add_index :ductwork_availabilities,
22
- %i[pipeline_klass started_at],
23
- name: "index_ductwork_availabilities_on_claim_latest",
24
- where: "completed_at IS NULL"
25
- end
14
+ remove_availability_claim_index
15
+ add_availability_claim_index
26
16
  end
27
17
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ductwork
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tyler Ewing