Local execution of Direction generator is broken
www-gitlab-com master % PRIVATE_TOKEN=`cat ~/.config/gitlab/rspeicher.production` be ruby generators/direction.rb
Generating product vision...
Generating wishlist...
Generating direction for manage, plan, create, verify, package, release, configure, monitor, secure ...
#<Thread:0x00007fb162924378@generators/direction.rb:462 run> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
7: from generators/direction.rb:462:in `block in <main>'
6: from generators/direction.rb:447:in `generate_product_vision'
5: from generators/direction.rb:447:in `each'
4: from generators/direction.rb:448:in `block in generate_product_vision'
3: from generators/direction.rb:344:in `product_vision_list'
2: from generators/direction.rb:167:in `product_vision_epics'
1: from generators/direction.rb:54:in `get'
/Users/rspeicher/Code/gitlab/www-gitlab-com/lib/gitlab/file_cache.rb:22:in `cached': uninitialized constant Middleman (NameError)
#<Thread:0x00007fb162924620@generators/direction.rb:461 run> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
9: from generators/direction.rb:461:in `block in <main>'
8: from generators/direction.rb:406:in `generate_wishlist'
7: from generators/direction.rb:406:in `each'
6: from generators/direction.rb:407:in `block in generate_wishlist'
5: from generators/direction.rb:309:in `label_list'
4: from generators/direction.rb:309:in `each'
3: from generators/direction.rb:310:in `block in label_list'
2: from generators/direction.rb:121:in `wishlist_issues'
1: from generators/direction.rb:54:in `get'
/Users/rspeicher/Code/gitlab/www-gitlab-com/lib/gitlab/file_cache.rb:22:in `cached': uninitialized constant Middleman (NameError)
#<Thread:0x00007fb1629247d8@generators/direction.rb:460 run> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
4: from generators/direction.rb:460:in `block in <main>'
3: from generators/direction.rb:223:in `generate_direction'
2: from generators/direction.rb:159:in `milestones'
1: from generators/direction.rb:54:in `get'
/Users/rspeicher/Code/gitlab/www-gitlab-com/lib/gitlab/file_cache.rb:22:in `cached': uninitialized constant Middleman (NameError)
#<Thread:0x00007fb162917e70@/Users/rspeicher/.asdf/installs/ruby/2.5.3/lib/ruby/2.5.0/thwait.rb:91 run> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
4: from generators/direction.rb:460:in `block in <main>'
3: from generators/direction.rb:223:in `generate_direction'
2: from generators/direction.rb:159:in `milestones'
1: from generators/direction.rb:54:in `get'
/Users/rspeicher/Code/gitlab/www-gitlab-com/lib/gitlab/file_cache.rb:22:in `cached': uninitialized constant Middleman (NameError)
#<Thread:0x00007fb160109a50@/Users/rspeicher/.asdf/installs/ruby/2.5.3/lib/ruby/2.5.0/thwait.rb:91 run> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
9: from generators/direction.rb:461:in `block in <main>'
8: from generators/direction.rb:406:in `generate_wishlist'
7: from generators/direction.rb:406:in `each'
6: from generators/direction.rb:407:in `block in generate_wishlist'
5: from generators/direction.rb:309:in `label_list'
4: from generators/direction.rb:309:in `each'
3: from generators/direction.rb:310:in `block in label_list'
2: from generators/direction.rb:121:in `wishlist_issues'
1: from generators/direction.rb:54:in `get'
/Users/rspeicher/Code/gitlab/www-gitlab-com/lib/gitlab/file_cache.rb:22:in `cached': uninitialized constant Middleman (NameError)
#<Thread:0x00007fb1601093e8@/Users/rspeicher/.asdf/installs/ruby/2.5.3/lib/ruby/2.5.0/thwait.rb:91 run> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
7: from generators/direction.rb:462:in `block in <main>'
6: from generators/direction.rb:447:in `generate_product_vision'
5: from generators/direction.rb:447:in `each'
4: from generators/direction.rb:448:in `block in generate_product_vision'
3: from generators/direction.rb:344:in `product_vision_list'
2: from generators/direction.rb:167:in `product_vision_epics'
1: from generators/direction.rb:54:in `get'
/Users/rspeicher/Code/gitlab/www-gitlab-com/lib/gitlab/file_cache.rb:22:in `cached': uninitialized constant Middleman (NameError)
www-gitlab-com master % PRIVATE_TOKEN=`cat ~/.config/gitlab/rspeicher.production` be ruby generators/direction.rb
Generating direction for manage, plan, create, verify, package, release, configure, monitor, secure ...
Generating product vision...
Generating wishlist...
#<Thread:0x00007fec61904660@generators/direction.rb:462 run> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
7: from generators/direction.rb:462:in `block in <main>'
6: from generators/direction.rb:447:in `generate_product_vision'
5: from generators/direction.rb:447:in `each'
4: from generators/direction.rb:448:in `block in generate_product_vision'
3: from generators/direction.rb:344:in `product_vision_list'
2: from generators/direction.rb:167:in `product_vision_epics'
1: from generators/direction.rb:54:in `get'
/Users/rspeicher/Code/gitlab/www-gitlab-com/lib/gitlab/file_cache.rb:22:in `cached': uninitialized constant Gitlab::FileCache::Logger (NameError)
#<Thread:0x00007fec660476d0@/Users/rspeicher/.asdf/installs/ruby/2.5.3/lib/ruby/2.5.0/thwait.rb:91 run> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
7: from generators/direction.rb:462:in `block in <main>'
6: from generators/direction.rb:447:in `generate_product_vision'
5: from generators/direction.rb:447:in `each'
4: from generators/direction.rb:448:in `block in generate_product_vision'
3: from generators/direction.rb:344:in `product_vision_list'
2: from generators/direction.rb:167:in `product_vision_epics'
1: from generators/direction.rb:54:in `get'
/Users/rspeicher/Code/gitlab/www-gitlab-com/lib/gitlab/file_cache.rb:22:in `cached': uninitialized constant Gitlab::FileCache::Logger (NameError)
#<Thread:0x00007fec61904c28@generators/direction.rb:460 run> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
4: from generators/direction.rb:460:in `block in <main>'
3: from generators/direction.rb:223:in `generate_direction'
2: from generators/direction.rb:159:in `milestones'
1: from generators/direction.rb:54:in `get'
/Users/rspeicher/Code/gitlab/www-gitlab-com/lib/gitlab/file_cache.rb:22:in `cached': uninitialized constant Gitlab::FileCache::Logger (NameError)
#<Thread:0x00007fec618ef710@/Users/rspeicher/.asdf/installs/ruby/2.5.3/lib/ruby/2.5.0/thwait.rb:91 run> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
4: from generators/direction.rb:460:in `block in <main>'
3: from generators/direction.rb:223:in `generate_direction'
2: from generators/direction.rb:159:in `milestones'
1: from generators/direction.rb:54:in `get'
/Users/rspeicher/Code/gitlab/www-gitlab-com/lib/gitlab/file_cache.rb:22:in `cached': uninitialized constant Gitlab::FileCache::Logger (NameError)
#<Thread:0x00007fec619049a8@generators/direction.rb:461 run> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
9: from generators/direction.rb:461:in `block in <main>'
8: from generators/direction.rb:406:in `generate_wishlist'
7: from generators/direction.rb:406:in `each'
6: from generators/direction.rb:407:in `block in generate_wishlist'
5: from generators/direction.rb:309:in `label_list'
4: from generators/direction.rb:309:in `each'
3: from generators/direction.rb:310:in `block in label_list'
2: from generators/direction.rb:121:in `wishlist_issues'
1: from generators/direction.rb:54:in `get'
/Users/rspeicher/Code/gitlab/www-gitlab-com/lib/gitlab/file_cache.rb:22:in `cached': uninitialized constant Gitlab::FileCache::Logger (NameError)
#<Thread:0x00007fec618ec4c0@/Users/rspeicher/.asdf/installs/ruby/2.5.3/lib/ruby/2.5.0/thwait.rb:91 run> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
9: from generators/direction.rb:461:in `block in <main>'
8: from generators/direction.rb:406:in `generate_wishlist'
7: from generators/direction.rb:406:in `each'
6: from generators/direction.rb:407:in `block in generate_wishlist'
5: from generators/direction.rb:309:in `label_list'
4: from generators/direction.rb:309:in `each'
3: from generators/direction.rb:310:in `block in label_list'
2: from generators/direction.rb:121:in `wishlist_issues'
1: from generators/direction.rb:54:in `get'
/Users/rspeicher/Code/gitlab/www-gitlab-com/lib/gitlab/file_cache.rb:22:in `cached': uninitialized constant Gitlab::FileCache::Logger (NameError)
diff --git a/generators/direction.rb b/generators/direction.rb
index d1dba54886..1e041d9016 100644
--- a/generators/direction.rb
+++ b/generators/direction.rb
@@ -1,4 +1,4 @@
-require 'lib/gitlab/file_cache'
+require_relative '../lib/gitlab/file_cache'
require 'active_support/core_ext/date/calculations'
require 'active_support/core_ext/numeric/time'
require 'active_support/notifications'
diff --git a/lib/gitlab/file_cache.rb b/lib/gitlab/file_cache.rb
index 960dbe5bb5..e403146ecc 100644
--- a/lib/gitlab/file_cache.rb
+++ b/lib/gitlab/file_cache.rb
@@ -1,4 +1,5 @@
require 'active_support/cache'
+require 'logger'
module Gitlab
module FileCache
@@ -19,7 +20,7 @@ module Gitlab
end
def cached(cache_key)
- logger = ::Middleman::Logger.singleton
+ logger = Logger.new($STDOUT)# ::Middleman::Logger.singleton
entry = cache_store.read(cache_key)
if entry
cc @m_clark
Edited by Robert Speicher