spirit icon indicating copy to clipboard operation
spirit copied to clipboard

bug: Environment variable parsing for Config doesn't work with `_` delimited fields.

Open lukewhrit opened this issue 3 years ago • 0 comments

Describe the bug

When providing an environment variable for a field with a name that contains underscore characters the environment variable parser incorrectly understands them as field hierarchy separators to be transformed, instead of characters used in the name of a field to be preserved.

To Reproduce

Steps to reproduce the behavior (What were you doing at the time?):

  1. Pass an environment variable such as SPACEBIN_DOCUMENTS_ID_LENGTH above or below the default of 12.
  2. Start the instance.
  3. Create a document of any value, shape, or size on the instance.
  4. Observe an ID length of 12 in the document URL.

Expected behavior

If the parser were designed correctly, it would realize that field name's that contain an underscore and parse them correctly.

By correctly, I mean that the name would be preserved but the hierarchy still be maintained.

Screenshots

N/A

Additional context

N/A

lukewhrit avatar May 06 '21 14:05 lukewhrit