Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
ereteog committed Aug 30, 2024
1 parent 8dc758b commit 78a033e
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 307 deletions.
1 change: 1 addition & 0 deletions src/ctia/properties.clj
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
(str prefix store ".update-mappings") s/Bool
(str prefix store ".update-settings") s/Bool
(str prefix store ".refresh-mappings") s/Bool
(str prefix store ".migrate-to-ilm") s/Bool
(str prefix store ".default-sort") s/Str
(str prefix store ".auth.type") AuthParamsType
(str prefix store ".auth.params.id") s/Str
Expand Down
9 changes: 2 additions & 7 deletions src/ctia/stores/es/init.clj
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,6 @@
(index/create-index-template! conn index (:template config))
(log/infof "updated template: %s" index))

(s/defn upsert-template!
[{:keys [conn index config props]} :- ESConnState]
(index/create-template! conn index config)
(log/infof "updated template: %s" index))

(defn system-exit-error
[]
(log/error (str "CTIA tried to start with an invalid configuration: \n"
Expand Down Expand Up @@ -211,7 +206,7 @@
{:update-mappings! update-mappings!
:update-settings! update-settings!
:refresh-mappings! refresh-mappings!
:upsert-template! upsert-template!
:upsert-template! upsert-index-template!
:update-ilm-settings! update-ilm-settings!}))
([{{update-mappings? :update-mappings
update-settings? :update-settings
Expand All @@ -232,7 +227,7 @@
;; if it fails a System/exit is triggered because
;; this means that the mapping in invalid and thus
;; must not be propagated to the template that would accept it
(upsert-template! conn-state)
(upsert-index-template! conn-state)
(when refresh-mappings?
(refresh-mappings! conn-state)))
(when update-settings?
Expand Down
43 changes: 0 additions & 43 deletions src/ctia/task/settings.clj

This file was deleted.

58 changes: 0 additions & 58 deletions src/ctia/task/update_mapping.clj

This file was deleted.

3 changes: 2 additions & 1 deletion test/ctia/stores/es/init_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,8 @@
services)
existing-indices (sut/get-existing-indices conn index)]
(when-not (seq existing-indices)
(sut/upsert-template! conn-state))
(index/create-template! conn index config)
(log/infof "updated template: %s" index))
(when (empty? existing-indices)
;;https://github.com/elastic/elasticsearch/pull/34499
(index/create! conn
Expand Down
74 changes: 0 additions & 74 deletions test/ctia/task/settings_test.clj

This file was deleted.

124 changes: 0 additions & 124 deletions test/ctia/task/update_mapping_test.clj

This file was deleted.

0 comments on commit 78a033e

Please sign in to comment.