Bug #5068

[Docker] fix @_NOT_FOUND_@ hack in config.rb

Added by Tim Pierce over 4 years ago. Updated over 4 years ago.

Status:
New
Priority:
Normal
Assigned To:
-
Category:
Docker
Target version:
Start date:
01/23/2015
Due date:
% Done:

0%

Estimated time:
Story points:
0.5

Description

The docker/build_tools/config.rb script substitutes the string @_NOT_FOUND_@ for any configuration variable required that isn't found in config.yml.

It's an ugly hack that causes some confusing downstream problems: for example, if this string appears as the value of a field in application.yml, it produces this error when trying to build the API server image:

rake aborted!
Psych::SyntaxError: (<unknown>): found character that cannot start any token while scanning for the next token at line 53 column 22
/usr/src/arvados/services/api/config/initializers/zz_load_config.rb:7:in `block in <top (required)>'

A better solution would be to raise an exception, forcing the user to correct the problem immediately at config time. Alternatively, substitute a syntactically valid string like VARIABLE_NOT_FOUND which can be parsed, but is at least likely to appear in error messages in a way that will make it easier to trace to their source.

History

#1 Updated by Tom Clegg over 4 years ago

  • Story points set to 0.5

#2 Updated by Tom Clegg over 4 years ago

  • Target version changed from Bug Triage to Arvados Future Sprints

Also available in: Atom PDF