sparkleformation / sfn

SparkleFormation CLI
http://www.sparkleformation.io
Apache License 2.0
63 stars 24 forks source link

Events error when a stack has lots of events #266

Closed luckymike closed 7 years ago

luckymike commented 7 years ago

Stacks with many events (seems like ~20-30+, but I'm not certain) error on any event retrieval with:

ERROR: NoMethodError: undefined method `map' for nil:NilClass             
Did you mean?  tap 

I've isolated this to miasma-aws versions 0.3.6+, specifically this line

stack.custom[:last_event_token] = event['NextToken'] if event['NextToken']

See related issue miasma-rb/miasma-aws#44

webframp commented 7 years ago

Also seeing this.

Here's a debug trace if it helps:

ERROR: NoMethodError: undefined method `map' for nil:NilClass
C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/sfn-3.0.26/lib/sfn/command/events.rb:80:in `block in get_events'
C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/sfn-3.0.26/lib/sfn/command/events.rb:65:in `map'
C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/sfn-3.0.26/lib/sfn/command/events.rb:65:in `get_events'
C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/bogo-ui-0.1.24/lib/bogo-ui/table.rb:35:in `method_missing'
C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/sfn-3.0.26/lib/sfn/command/events.rb:24:in `block (3 levels) in execute!'
C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/bogo-ui-0.1.24/lib/bogo-ui/table.rb:56:in `table'
C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/sfn-3.0.26/lib/sfn/command/events.rb:23:in `block (2 levels) in execute!'
C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/bogo-ui-0.1.24/lib/bogo-ui/table.rb:78:in `instance_exec'
C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/bogo-ui-0.1.24/lib/bogo-ui/table.rb:78:in `display' C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/sfn-3.0.26/lib/sfn/command/events.rb:40:in `block in execute!'
C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/sfn-3.0.26/lib/sfn/command_module/callbacks.rb:19:in `api_action!'
C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/sfn-3.0.26/lib/sfn/command/events.rb:21:in `execute!'
C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/sfn-3.0.26/bin/sfn:52:in `block (4 levels) in <top (required)>'
C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/bogo-cli-0.2.12/lib/bogo-cli/setup.rb:26:in `block in bogo_cli_run'
C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/slop-3.6.0/lib/slop.rb:260:in `parse!'
C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/slop-3.6.0/lib/slop.rb:235:in `parse!'
C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/slop-3.6.0/lib/slop.rb:65:in `parse!'
C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/slop-3.6.0/lib/slop.rb:54:in `parse'
C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/bogo-cli-0.2.12/lib/bogo-cli/setup.rb:48:in `define'C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/sfn-3.0.26/bin/sfn:14:in `<top (required)>'
C:/Users/sescriva/AppData/Local/chefdk/gem/ruby/2.3.0/bin/sfn:22:in `load'
C:/Users/sescriva/AppData/Local/chefdk/gem/ruby/2.3.0/bin/sfn:22:in `<main>'

ruby and sfn versions:

ruby 2.4.1p111 (2017-03-22 revision 58053) [i386-mingw32]
sfn - SparkleFormation CLI - [Version: 3.0.26]
kabakakao commented 7 years ago

We have the same error from time to time. Could this (https://github.com/sparkleformation/sfn/pull/265) pull-request maybe fix the problem?

gramosbr commented 7 years ago

Could be a solution https://github.com/miasma-rb/miasma-aws/pull/45/files

chrisroberts commented 7 years ago

Sorry for the delay. Releases have been made and this should be resolved by upgrading. Cheers!