boltops-tools / terraspace

Terraspace: The Terraform Framework
https://terraspace.cloud
Apache License 2.0
678 stars 46 forks source link

Terraspace stopped working after update to "tilt" Gem package #307

Closed alexpilon666 closed 1 year ago

alexpilon666 commented 1 year ago

Checklist

My Environment

Software Version
Operating System Ubuntu 22.04 LTS
Terraform 1.4.6
Terraspace 2.2.6
Ruby 3.0.3p157

Expected Behaviour

Terraspace commands should execute properly.

Current Behavior

When running any Terraspace command, we get a Ruby stacktrace that prevents execution of any command whatsoever.

Step-by-step reproduction instructions

  1. Run bundle update in the Terraspace projet folder
  2. Run any Terraspace command, like terraspace plan <stack_name>
  3. Get the below stack trace
Ruby stack trace 2023-06-05T18:21:29.3854999Z ##[section]Starting: Run 'terraspace all plan qa --out /tmp/554466/qa.plan -y ; terraspace logs plan -a' 2023-06-05T18:21:29.3860825Z ============================================================================== 2023-06-05T18:21:29.3860992Z Task : Bash 2023-06-05T18:21:29.3861080Z Description : Run a Bash script on macOS, Linux, or Windows 2023-06-05T18:21:29.3861188Z Version : 3.214.0 2023-06-05T18:21:29.3861258Z Author : Microsoft Corporation 2023-06-05T18:21:29.3861918Z Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/bash 2023-06-05T18:21:29.3862038Z ============================================================================== 2023-06-05T18:21:29.5510139Z Generating script. 2023-06-05T18:21:29.5549916Z ========================== Starting Command Output =========================== 2023-06-05T18:21:29.5551976Z [command]/usr/bin/bash /home/0svc_tfs/devops-linux/agent01/_work/_temp/59bb13fa-67ee-4604-9ce3-76a656bc85f3.sh 2023-06-05T18:21:32.1303001Z WARN: Unable to find line number. Fallback and print out full backtrace. 2023-06-05T18:21:32.1304130Z /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/tilt-2.2.0/lib/tilt/template.rb:104:in `render' 2023-06-05T18:21:32.1304668Z /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/render_me_pretty-0.8.4/lib/render_me_pretty/erb.rb:91:in `render' 2023-06-05T18:21:32.1305638Z /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/render_me_pretty-0.8.4/lib/render_me_pretty.rb:11:in `result' 2023-06-05T18:21:32.1306220Z /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/terraspace-2.2.6/lib/terraspace/compiler/erb/render.rb:14:in `build' 2023-06-05T18:21:32.1306808Z /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/terraspace-2.2.6/lib/terraspace/compiler/strategy/tfvar/tfvars.rb:4:in `run' 2023-06-05T18:21:32.1307377Z /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/terraspace-2.2.6/lib/terraspace/compiler/strategy/tfvar.rb:17:in `block in run' 2023-06-05T18:21:32.1307906Z /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/terraspace-2.2.6/lib/terraspace/compiler/strategy/tfvar.rb:11:in `each' 2023-06-05T18:21:32.1308460Z /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/terraspace-2.2.6/lib/terraspace/compiler/strategy/tfvar.rb:11:in `run' 2023-06-05T18:21:32.1308860Z /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/terraspace-2.2.6/lib/terraspace/compiler/perform.rb:35:in `compile_tfvars' 2023-06-05T18:21:32.1309358Z /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/terraspace-2.2.6/lib/terraspace/dependency/resolver.rb:12:in `block in resolve' 2023-06-05T18:21:32.1309852Z /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/terraspace-2.2.6/lib/terraspace/compiler/dirs_concern.rb:18:in `block in with_each_mod' 2023-06-05T18:21:32.1310296Z /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/terraspace-2.2.6/lib/terraspace/compiler/dirs_concern.rb:15:in `each' 2023-06-05T18:21:32.1310700Z /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/terraspace-2.2.6/lib/terraspace/compiler/dirs_concern.rb:15:in `with_each_mod' 2023-06-05T18:21:32.1311193Z /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/terraspace-2.2.6/lib/terraspace/dependency/resolver.rb:10:in `resolve' 2023-06-05T18:21:32.1311733Z /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/terraspace-2.2.6/lib/terraspace/all/runner.rb:25:in `build_batches' 2023-06-05T18:21:32.1312242Z /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/terraspace-2.2.6/lib/terraspace/all/runner.rb:13:in `block in run' 2023-06-05T18:21:32.1312713Z /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/terraspace-2.2.6/lib/terraspace/all/runner.rb:188:in `time_took' 2023-06-05T18:21:32.1313153Z /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/terraspace-2.2.6/lib/terraspace/all/runner.rb:12:in `run' 2023-06-05T18:21:32.1313633Z /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/terraspace-2.2.6/lib/terraspace/cli/all.rb:43:in `plan' 2023-06-05T18:21:32.1314020Z /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/thor-1.2.2/lib/thor/command.rb:27:in `run' 2023-06-05T18:21:32.1314391Z /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/thor-1.2.2/lib/thor/invocation.rb:127:in `invoke_command' 2023-06-05T18:21:32.1315230Z /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/thor-1.2.2/lib/thor.rb:392:in `dispatch' 2023-06-05T18:21:32.1315598Z /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/terraspace-2.2.6/lib/terraspace/command.rb:76:in `dispatch' 2023-06-05T18:21:32.1315957Z /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/thor-1.2.2/lib/thor/invocation.rb:116:in `invoke' 2023-06-05T18:21:32.1316488Z /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/thor-1.2.2/lib/thor.rb:243:in `block in subcommand' 2023-06-05T18:21:32.1316938Z /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/thor-1.2.2/lib/thor/command.rb:27:in `run' 2023-06-05T18:21:32.1317341Z /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/thor-1.2.2/lib/thor/invocation.rb:127:in `invoke_command' 2023-06-05T18:21:32.1317801Z /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/thor-1.2.2/lib/thor.rb:392:in `dispatch' 2023-06-05T18:21:32.1318390Z /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/terraspace-2.2.6/lib/terraspace/command.rb:76:in `dispatch' 2023-06-05T18:21:32.1318838Z /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/thor-1.2.2/lib/thor/base.rb:485:in `start' 2023-06-05T18:21:32.1319214Z /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/terraspace-2.2.6/lib/terraspace/cli/concern.rb:65:in `start' 2023-06-05T18:21:32.1319619Z /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/terraspace-2.2.6/exe/terraspace:7:in `' 2023-06-05T18:21:32.1319867Z /opt/terraspace/embedded/bin/terraspace:25:in `load' 2023-06-05T18:21:32.1320072Z /opt/terraspace/embedded/bin/terraspace:25:in `' 2023-06-05T18:21:32.1320444Z /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.12/lib/bundler/cli/exec.rb:58:in `load' 2023-06-05T18:21:32.1320839Z /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.12/lib/bundler/cli/exec.rb:58:in `kernel_load' 2023-06-05T18:21:32.1321223Z /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.12/lib/bundler/cli/exec.rb:23:in `run' 2023-06-05T18:21:32.1321589Z /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.12/lib/bundler/cli.rb:492:in `exec' 2023-06-05T18:21:32.1322008Z /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.12/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run' 2023-06-05T18:21:32.1322450Z /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.12/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command' 2023-06-05T18:21:32.1322894Z /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.12/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch' 2023-06-05T18:21:32.1323281Z /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.12/lib/bundler/cli.rb:34:in `dispatch' 2023-06-05T18:21:32.1323877Z /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.12/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start' 2023-06-05T18:21:32.1324263Z /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.12/lib/bundler/cli.rb:28:in `start' 2023-06-05T18:21:32.1324649Z /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.12/exe/bundle:45:in `block in ' 2023-06-05T18:21:32.1325023Z /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.12/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors' 2023-06-05T18:21:32.1325379Z /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.12/exe/bundle:33:in `' 2023-06-05T18:21:32.1325570Z /opt/terraspace/embedded/bin/bundle:23:in `load' 2023-06-05T18:21:32.1325734Z /opt/terraspace/embedded/bin/bundle:23:in `
' 2023-06-05T18:21:32.1325909Z bundler: failed to load command: terraspace (/opt/terraspace/embedded/bin/terraspace) 2023-06-05T18:21:32.1326405Z /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/render_me_pretty-0.8.4/lib/render_me_pretty/erb/base_handler.rb:24:in `pretty_trace': undefined method `-' for nil:NilClass (NoMethodError) 2023-06-05T18:21:32.1326844Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/render_me_pretty-0.8.4/lib/render_me_pretty/erb/base_handler.rb:11:in `handle' 2023-06-05T18:21:32.1327659Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/render_me_pretty-0.8.4/lib/render_me_pretty/erb.rb:119:in `handle_exception' 2023-06-05T18:21:32.1328092Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/render_me_pretty-0.8.4/lib/render_me_pretty/erb.rb:97:in `rescue in render' 2023-06-05T18:21:32.1328497Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/render_me_pretty-0.8.4/lib/render_me_pretty/erb.rb:85:in `render' 2023-06-05T18:21:32.1328950Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/render_me_pretty-0.8.4/lib/render_me_pretty.rb:11:in `result' 2023-06-05T18:21:32.1329335Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/terraspace-2.2.6/lib/terraspace/compiler/erb/render.rb:14:in `build' 2023-06-05T18:21:32.1329827Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/terraspace-2.2.6/lib/terraspace/compiler/strategy/tfvar/tfvars.rb:4:in `run' 2023-06-05T18:21:32.1330261Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/terraspace-2.2.6/lib/terraspace/compiler/strategy/tfvar.rb:17:in `block in run' 2023-06-05T18:21:32.1330701Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/terraspace-2.2.6/lib/terraspace/compiler/strategy/tfvar.rb:11:in `each' 2023-06-05T18:21:32.1331103Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/terraspace-2.2.6/lib/terraspace/compiler/strategy/tfvar.rb:11:in `run' 2023-06-05T18:21:32.1331532Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/terraspace-2.2.6/lib/terraspace/compiler/perform.rb:35:in `compile_tfvars' 2023-06-05T18:21:32.1331946Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/terraspace-2.2.6/lib/terraspace/dependency/resolver.rb:12:in `block in resolve' 2023-06-05T18:21:32.1332408Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/terraspace-2.2.6/lib/terraspace/compiler/dirs_concern.rb:18:in `block in with_each_mod' 2023-06-05T18:21:32.1332819Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/terraspace-2.2.6/lib/terraspace/compiler/dirs_concern.rb:15:in `each' 2023-06-05T18:21:32.1333259Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/terraspace-2.2.6/lib/terraspace/compiler/dirs_concern.rb:15:in `with_each_mod' 2023-06-05T18:21:32.1333678Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/terraspace-2.2.6/lib/terraspace/dependency/resolver.rb:10:in `resolve' 2023-06-05T18:21:32.1334112Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/terraspace-2.2.6/lib/terraspace/all/runner.rb:25:in `build_batches' 2023-06-05T18:21:32.1334516Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/terraspace-2.2.6/lib/terraspace/all/runner.rb:13:in `block in run' 2023-06-05T18:21:32.1334946Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/terraspace-2.2.6/lib/terraspace/all/runner.rb:188:in `time_took' 2023-06-05T18:21:32.1335335Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/terraspace-2.2.6/lib/terraspace/all/runner.rb:12:in `run' 2023-06-05T18:21:32.1335724Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/terraspace-2.2.6/lib/terraspace/cli/all.rb:43:in `plan' 2023-06-05T18:21:32.1336115Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/thor-1.2.2/lib/thor/command.rb:27:in `run' 2023-06-05T18:21:32.1336493Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/thor-1.2.2/lib/thor/invocation.rb:127:in `invoke_command' 2023-06-05T18:21:32.1336876Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/thor-1.2.2/lib/thor.rb:392:in `dispatch' 2023-06-05T18:21:32.1337263Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/terraspace-2.2.6/lib/terraspace/command.rb:76:in `dispatch' 2023-06-05T18:21:32.1337659Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/thor-1.2.2/lib/thor/invocation.rb:116:in `invoke' 2023-06-05T18:21:32.1338051Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/thor-1.2.2/lib/thor.rb:243:in `block in subcommand' 2023-06-05T18:21:32.1338451Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/thor-1.2.2/lib/thor/command.rb:27:in `run' 2023-06-05T18:21:32.1338942Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/thor-1.2.2/lib/thor/invocation.rb:127:in `invoke_command' 2023-06-05T18:21:32.1339329Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/thor-1.2.2/lib/thor.rb:392:in `dispatch' 2023-06-05T18:21:32.1339723Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/terraspace-2.2.6/lib/terraspace/command.rb:76:in `dispatch' 2023-06-05T18:21:32.1340158Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/thor-1.2.2/lib/thor/base.rb:485:in `start' 2023-06-05T18:21:32.1340571Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/terraspace-2.2.6/lib/terraspace/cli/concern.rb:65:in `start' 2023-06-05T18:21:32.1340966Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/terraspace-2.2.6/exe/terraspace:7:in `' 2023-06-05T18:21:32.1341210Z from /opt/terraspace/embedded/bin/terraspace:25:in `load' 2023-06-05T18:21:32.1341664Z from /opt/terraspace/embedded/bin/terraspace:25:in `' 2023-06-05T18:21:32.1342070Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.12/lib/bundler/cli/exec.rb:58:in `load' 2023-06-05T18:21:32.1342477Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.12/lib/bundler/cli/exec.rb:58:in `kernel_load' 2023-06-05T18:21:32.1342894Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.12/lib/bundler/cli/exec.rb:23:in `run' 2023-06-05T18:21:32.1343280Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.12/lib/bundler/cli.rb:492:in `exec' 2023-06-05T18:21:32.1343662Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.12/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run' 2023-06-05T18:21:32.1344129Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.12/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command' 2023-06-05T18:21:32.1344644Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.12/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch' 2023-06-05T18:21:32.1345099Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.12/lib/bundler/cli.rb:34:in `dispatch' 2023-06-05T18:21:32.1345507Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.12/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start' 2023-06-05T18:21:32.1345992Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.12/lib/bundler/cli.rb:28:in `start' 2023-06-05T18:21:32.1346397Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.12/exe/bundle:45:in `block in ' 2023-06-05T18:21:32.1346830Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.12/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors' 2023-06-05T18:21:32.1347290Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.12/exe/bundle:33:in `' 2023-06-05T18:21:32.1347523Z from /opt/terraspace/embedded/bin/bundle:23:in `load' 2023-06-05T18:21:32.1347675Z from /opt/terraspace/embedded/bin/bundle:23:in `
' 2023-06-05T18:21:32.1348198Z /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/tilt-2.2.0/lib/tilt/template.rb:104:in `render': uninitialized constant Tilt::Template::EMPTY_HASH (NameError) 2023-06-05T18:21:32.1348694Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/render_me_pretty-0.8.4/lib/render_me_pretty/erb.rb:91:in `render' 2023-06-05T18:21:32.1349055Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/render_me_pretty-0.8.4/lib/render_me_pretty.rb:11:in `result' 2023-06-05T18:21:32.1349451Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/terraspace-2.2.6/lib/terraspace/compiler/erb/render.rb:14:in `build' 2023-06-05T18:21:32.1349982Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/terraspace-2.2.6/lib/terraspace/compiler/strategy/tfvar/tfvars.rb:4:in `run' 2023-06-05T18:21:32.1350481Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/terraspace-2.2.6/lib/terraspace/compiler/strategy/tfvar.rb:17:in `block in run' 2023-06-05T18:21:32.1351007Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/terraspace-2.2.6/lib/terraspace/compiler/strategy/tfvar.rb:11:in `each' 2023-06-05T18:21:32.1351393Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/terraspace-2.2.6/lib/terraspace/compiler/strategy/tfvar.rb:11:in `run' 2023-06-05T18:21:32.1351797Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/terraspace-2.2.6/lib/terraspace/compiler/perform.rb:35:in `compile_tfvars' 2023-06-05T18:21:32.1352399Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/terraspace-2.2.6/lib/terraspace/dependency/resolver.rb:12:in `block in resolve' 2023-06-05T18:21:32.1352931Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/terraspace-2.2.6/lib/terraspace/compiler/dirs_concern.rb:18:in `block in with_each_mod' 2023-06-05T18:21:32.1353467Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/terraspace-2.2.6/lib/terraspace/compiler/dirs_concern.rb:15:in `each' 2023-06-05T18:21:32.1353963Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/terraspace-2.2.6/lib/terraspace/compiler/dirs_concern.rb:15:in `with_each_mod' 2023-06-05T18:21:32.1354388Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/terraspace-2.2.6/lib/terraspace/dependency/resolver.rb:10:in `resolve' 2023-06-05T18:21:32.1354810Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/terraspace-2.2.6/lib/terraspace/all/runner.rb:25:in `build_batches' 2023-06-05T18:21:32.1355328Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/terraspace-2.2.6/lib/terraspace/all/runner.rb:13:in `block in run' 2023-06-05T18:21:32.1355811Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/terraspace-2.2.6/lib/terraspace/all/runner.rb:188:in `time_took' 2023-06-05T18:21:32.1356306Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/terraspace-2.2.6/lib/terraspace/all/runner.rb:12:in `run' 2023-06-05T18:21:32.1356744Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/terraspace-2.2.6/lib/terraspace/cli/all.rb:43:in `plan' 2023-06-05T18:21:32.1357118Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/thor-1.2.2/lib/thor/command.rb:27:in `run' 2023-06-05T18:21:32.1357482Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/thor-1.2.2/lib/thor/invocation.rb:127:in `invoke_command' 2023-06-05T18:21:32.1357912Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/thor-1.2.2/lib/thor.rb:392:in `dispatch' 2023-06-05T18:21:32.1358311Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/terraspace-2.2.6/lib/terraspace/command.rb:76:in `dispatch' 2023-06-05T18:21:32.1358687Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/thor-1.2.2/lib/thor/invocation.rb:116:in `invoke' 2023-06-05T18:21:32.1359045Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/thor-1.2.2/lib/thor.rb:243:in `block in subcommand' 2023-06-05T18:21:32.1359378Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/thor-1.2.2/lib/thor/command.rb:27:in `run' 2023-06-05T18:21:32.1359767Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/thor-1.2.2/lib/thor/invocation.rb:127:in `invoke_command' 2023-06-05T18:21:32.1360011Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/thor-1.2.2/lib/thor.rb:392:in `dispatch' 2023-06-05T18:21:32.1360252Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/terraspace-2.2.6/lib/terraspace/command.rb:76:in `dispatch' 2023-06-05T18:21:32.1360476Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/thor-1.2.2/lib/thor/base.rb:485:in `start' 2023-06-05T18:21:32.1360716Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/terraspace-2.2.6/lib/terraspace/cli/concern.rb:65:in `start' 2023-06-05T18:21:32.1360956Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/terraspace-2.2.6/exe/terraspace:7:in `' 2023-06-05T18:21:32.1361095Z from /opt/terraspace/embedded/bin/terraspace:25:in `load' 2023-06-05T18:21:32.1361212Z from /opt/terraspace/embedded/bin/terraspace:25:in `' 2023-06-05T18:21:32.1361428Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.12/lib/bundler/cli/exec.rb:58:in `load' 2023-06-05T18:21:32.1361773Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.12/lib/bundler/cli/exec.rb:58:in `kernel_load' 2023-06-05T18:21:32.1361994Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.12/lib/bundler/cli/exec.rb:23:in `run' 2023-06-05T18:21:32.1362234Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.12/lib/bundler/cli.rb:492:in `exec' 2023-06-05T18:21:32.1362517Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.12/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run' 2023-06-05T18:21:32.1362909Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.12/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command' 2023-06-05T18:21:32.1363164Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.12/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch' 2023-06-05T18:21:32.1363414Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.12/lib/bundler/cli.rb:34:in `dispatch' 2023-06-05T18:21:32.1363659Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.12/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start' 2023-06-05T18:21:32.1363899Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.12/lib/bundler/cli.rb:28:in `start' 2023-06-05T18:21:32.1364128Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.12/exe/bundle:45:in `block in ' 2023-06-05T18:21:32.1364395Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.12/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors' 2023-06-05T18:21:32.1364635Z from /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.12/exe/bundle:33:in `' 2023-06-05T18:21:32.1364762Z from /opt/terraspace/embedded/bin/bundle:23:in `load' 2023-06-05T18:21:32.1364886Z from /opt/terraspace/embedded/bin/bundle:23:in `
' 2023-06-05T18:21:32.8423844Z WARN: No logs found 2023-06-05T18:21:34.4876356Z ##[section]Finishing: Run 'terraspace all plan qa --out /tmp/554466/qa.plan -y ; terraspace logs plan -a'

Code Sample

Solution Suggestion

After analysing our last successful run, and comparing it to our first failed run, we discovered that the only change in the Gem bundles came from an update to the tilt package from v2.1.0 to v2.2.0. After looking at the stack trace, this corresponds with the initial line: /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/tilt-2.2.0/lib/tilt/template.rb:104:inrender'`.

I have no idea which package uses tilt as a dependency, but if it's something Terraspace-related/controlled, it would be ideal to eithher have tilt fixed rapidly, or fix the version of the dependency to v2.1.0 until v2.2.x is fixed.

Our current workaround is to uninstall tilt v2.2.0 and manually reinstall v2.1.0 after running bundle install/update, which solves the problem, but is not ideal.

Thanks!

alexpilon666 commented 1 year ago

Quick update after some testing and more stacktrace analysis: According to the Gemfile.lock, the only Gem that depends on tilt is render_me_pretty....a Gem that hasn't been updated since December of 2021. render_me_pretty is a direct dependency of the terraspace Gem, and no other Gem has it listed as a dependency.

tongueroo commented 1 year ago

Looks like tilt 2.2.0 was release today. https://rubygems.org/gems/tilt It seems like it introduced issues. 🧐 Bummer.

render_me_pretty is a simple gem that uses tilt under the hood to render ERB, written by yours truly. It simply wraps tilt to provide a pretty error output with original source code line.

RE: Our current workaround is to uninstall tilt v2.2.0 and manually reinstall v2.1.0 after running bundle install/update, which solves the problem, but is not ideal.

Glad you were around to find a workaround. Note, you can also use the Gemfile and pin terraspace as well other gems with bundler. IE: You can pin tilt. Here's an example that you can modify for your needs.

Gemfile

source "https://rubygems.org"
gem "terraspace", "~> 2.2"
gem "terraspace_plugin_aws"
gem "rspec-terraspace"
gem "tilt", "~> 2.1.0"

That should pin tilt as well as other gem dependencies with a Gemfile.lock.

To check that the gem is pinned to the desired version

bundle info tilt

You should commit Gemifle.lock so others or the pipeline use the exact same dependencies.

Will have to dig into what's new with tilt that's causing issues. Also, will review and consider PRs. No sweat either way of course. 👍

Here are also some docs around this: https://terraspace.cloud/docs/install/gems-locking/ Will also consider PRs for docs improvements.

tongueroo commented 1 year ago

Fixed by https://github.com/tongueroo/render_me_pretty/pull/2 Released in render_me_pretty 0.9.0. You should be able to unpin tilt and run a bundle update which also updates render_me_pretty to 0.9.0 with the fix.

Remember to confirm that render_me_pretty is updated. Example commands:

bundle update
bundle info render_me_pretty
alexpilon666 commented 1 year ago

Just removed the pinned version for tilt and ran a bundle update: Can confirm, Terraspace commands work again!

Thhanks for the quick fix, greatly appreciated :)