Bug #8195

[API] [Workbench] config:check catches and reports YAML parsing errors

Added by Joshua Randall over 3 years ago. Updated over 3 years ago.

Status:
New
Priority:
Normal
Assigned To:
-
Category:
-
Target version:
Start date:
01/12/2016
Due date:
% Done:

0%

Estimated time:
Story points:
-

Description

When running arvados-api-server-upgrade.sh I got the following error:
```
Precompiling assets
/usr/local/rvm/rubies/ruby-2.1.5/bin/ruby /var/www/arvados-api/shared/vendor_bundle/ruby/2.1.0/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets
rake aborted!
Psych::SyntaxError: (<unknown>): could not find expected ':' while scanning a simple key at line 14 column 1
/var/www/arvados-api/current/config/initializers/load_config.rb:31:in `block in <top (required)>'
/var/www/arvados-api/current/config/initializers/load_config.rb:27:in `each'
/var/www/arvados-api/current/config/initializers/load_config.rb:27:in `<top (required)>'
/var/www/arvados-api/shared/vendor_bundle/ruby/2.1.0/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:245:in `load'
/var/www/arvados-api/shared/vendor_bundle/ruby/2.1.0/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:245:in `block in load'
/var/www/arvados-api/shared/vendor_bundle/ruby/2.1.0/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:236:in `load_dependency'
/var/www/arvados-api/shared/vendor_bundle/ruby/2.1.0/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:245:in `load'
/var/www/arvados-api/shared/vendor_bundle/ruby/2.1.0/gems/railties-3.2.17/lib/rails/engine.rb:593:in `block (2 levels) in <class:Engine>'
/var/www/arvados-api/shared/vendor_bundle/ruby/2.1.0/gems/railties-3.2.17/lib/rails/engine.rb:592:in `each'
/var/www/arvados-api/shared/vendor_bundle/ruby/2.1.0/gems/railties-3.2.17/lib/rails/engine.rb:592:in `block in <class:Engine>'
/var/www/arvados-api/shared/vendor_bundle/ruby/2.1.0/gems/railties-3.2.17/lib/rails/initializable.rb:30:in `instance_exec'
/var/www/arvados-api/shared/vendor_bundle/ruby/2.1.0/gems/railties-3.2.17/lib/rails/initializable.rb:30:in `run'
/var/www/arvados-api/shared/vendor_bundle/ruby/2.1.0/gems/railties-3.2.17/lib/rails/initializable.rb:55:in `block in run_initializers'
/var/www/arvados-api/shared/vendor_bundle/ruby/2.1.0/gems/railties-3.2.17/lib/rails/initializable.rb:54:in `each'
/var/www/arvados-api/shared/vendor_bundle/ruby/2.1.0/gems/railties-3.2.17/lib/rails/initializable.rb:54:in `run_initializers'
/var/www/arvados-api/shared/vendor_bundle/ruby/2.1.0/gems/railties-3.2.17/lib/rails/application.rb:136:in `initialize!'
/var/www/arvados-api/shared/vendor_bundle/ruby/2.1.0/gems/railties-3.2.17/lib/rails/railtie/configurable.rb:30:in `method_missing'
/var/www/arvados-api/current/config/environment.rb:6:in `<top (required)>'
/var/www/arvados-api/shared/vendor_bundle/ruby/2.1.0/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:251:in `require'
/var/www/arvados-api/shared/vendor_bundle/ruby/2.1.0/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:251:in `block in require'
/var/www/arvados-api/shared/vendor_bundle/ruby/2.1.0/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:236:in `load_dependency'
/var/www/arvados-api/shared/vendor_bundle/ruby/2.1.0/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:251:in `require'
/var/www/arvados-api/shared/vendor_bundle/ruby/2.1.0/gems/railties-3.2.17/lib/rails/application.rb:103:in `require_environment!'
/var/www/arvados-api/shared/vendor_bundle/ruby/2.1.0/gems/railties-3.2.17/lib/rails/application.rb:305:in `block (2 levels) in initialize_tasks'
/var/www/arvados-api/shared/vendor_bundle/ruby/2.1.0/gems/actionpack-3.2.17/lib/sprockets/assets.rake:93:in `block (2 levels) in <top (required)>'
/var/www/arvados-api/shared/vendor_bundle/ruby/2.1.0/gems/actionpack-3.2.17/lib/sprockets/assets.rake:60:in `block (3 levels) in <top (required)>'
Tasks: TOP => environment
(See full trace by running task with --trace)
rake aborted!
Command failed with status (1): [/usr/local/rvm/rubies/ruby-2.1.5/bin/ruby ...]
/var/www/arvados-api/shared/vendor_bundle/ruby/2.1.0/gems/actionpack-3.2.17/lib/sprockets/assets.rake:12:in `ruby_rake_task'
/var/www/arvados-api/shared/vendor_bundle/ruby/2.1.0/gems/actionpack-3.2.17/lib/sprockets/assets.rake:21:in `invoke_or_reboot_rake_task'
/var/www/arvados-api/shared/vendor_bundle/ruby/2.1.0/gems/actionpack-3.2.17/lib/sprockets/assets.rake:29:in `block (2 levels) in <top (required)>'
Tasks: TOP => assets:precompile
(See full trace by running task with --trace)
```

After searching the issues I found https://dev.arvados.org/issues/5068 which led me to believe that this "Psych::SyntaxError" issue was actually an issue with the application.yml file (it never said anything about what file it had an issue with, just that the issue was on line 14). Indeed, I found a syntax error in application.yml.

The error reporting in this case could be vastly improved by simply mentioning the name of the file which is causing the error.

History

#1 Updated by Brett Smith over 3 years ago

  • Subject changed from Unparsable application.yml is not reported as such when running arvados-api-server-upgrade.sh to [API] [Workbench] config:check catches and reports YAML parsing errors

#2 Updated by Brett Smith over 3 years ago

  • Target version set to Arvados Future Sprints

Also available in: Atom PDF