mux_tf 0.14.0 → 0.14.2

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: f9a03af7a131fd34e58d5fb27d3c578154f49246634a684980e6ebc16aa28d08
4
- data.tar.gz: d093d1604dabbeb1aed8ef5b1ebc3e33a0b5e3575602f7b3802796b2b51f7a7a
3
+ metadata.gz: 69ba3f3800b5025923625f5c71be014ea5f2689d7bef6a6c309453ba8c77d37e
4
+ data.tar.gz: 64b7341a04b36e4daed8f63a4fca12e9a966d73269831ebb82faebfee4f4ee55
5
5
  SHA512:
6
- metadata.gz: 7809b83e63a8aa17671ef6fbaac79a09cd7aa8216fdd1ccd390f2e32ee0b4ec0a85e4f6653d4c4bbbafcb99d47076413a9135f970f4d4c0f7f8608b2e8858f5f
7
- data.tar.gz: c9dd73ed72236b568c7bbdc34ede9701e1d1db94403ccd2e84ee611cd58500e73810f50c9c0bdd6817c2ef7f8bd5d504fd945d86d340db95d9246e797376efb4
6
+ metadata.gz: 8836967a52fb32c981eee5e84945e4ac3c20873f2a3e11af1137bd7442f7631464a37713cd1621571a6fbceba6e35efb9984ae9ec0e2257b91ee263044105a66
7
+ data.tar.gz: 5da9f6af5c83cc977c343650078cb27753ca6feeb82148d0662b3c9e7430a683547deda1a0c6411255c622664dbdb6d13a649d2fb91434eb3c2d3dd849fe69fe
@@ -87,7 +87,7 @@ module MuxTf
87
87
  return results if remedies.empty?
88
88
 
89
89
  remedy_status, _remedy_results = process_remedies(remedies, from: from, level: level)
90
- return unless remedy_status
90
+ return remedy_status if remedy_status
91
91
  end
92
92
  log "!! giving up because attempt: #{attempt}"
93
93
  end
@@ -162,6 +162,10 @@ module MuxTf
162
162
  log wrap_log["-" * 40, color: :red]
163
163
  return [false, results]
164
164
  end
165
+
166
+ # if there is warnings, but no other remedies .. then we assume all is ok
167
+ return [true, results] if remedies.delete?(:user_warning) && remedies.empty?
168
+
165
169
  unless remedies.empty?
166
170
  remedy = nil
167
171
  log wrap_log["Unprocessed remedies: #{remedies.to_a}", color: :red], depth: 1 if level == 1
@@ -470,8 +470,11 @@ module MuxTf
470
470
  remedies = Set.new
471
471
  if status != 0
472
472
  remedies << :reconfigure if meta[:need_reconfigure]
473
- meta[:errors].each do |error|
474
- remedies << :add_provider_constraint if error[:body].grep(/Could not retrieve the list of available versions for provider/)
473
+ log "!! expected meta[:errors] to be set, how did we get here?" unless meta[:errors]
474
+ if meta[:errors]
475
+ meta[:errors].each do |error|
476
+ remedies << :add_provider_constraint if error[:body].grep(/Could not retrieve the list of available versions for provider/)
477
+ end
475
478
  end
476
479
  if remedies.empty?
477
480
  log "!! don't know how to generate init remedies for this"
@@ -721,6 +724,11 @@ module MuxTf
721
724
  item_handled = true
722
725
  end
723
726
 
727
+ if dinfo["severity"] == "warning"
728
+ remedies << :user_warning
729
+ item_handled = true
730
+ end
731
+
724
732
  next if item_handled
725
733
 
726
734
  puts "!! don't know how to handle this validation error"
@@ -75,7 +75,7 @@ module MuxTf
75
75
  pastel.decorate(symbol, color)
76
76
  end
77
77
 
78
- def self.format_address(address)
78
+ def format_address(address)
79
79
  result = []
80
80
  parts = ResourceTokenizer.tokenize(address)
81
81
  parts.each_with_index do |(part_type, part_value), index|
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MuxTf
4
- VERSION = "0.14.0"
4
+ VERSION = "0.14.2"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mux_tf
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.0
4
+ version: 0.14.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Piotr Banasik
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-10-30 00:00:00.000000000 Z
11
+ date: 2023-12-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport