Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Environmental Variables of type Boolean are represented as a String by the Config object #934

Closed
6 tasks done
mdebarros opened this issue Aug 16, 2019 · 1 comment
Closed
6 tasks done
Assignees
Milestone

Comments

@mdebarros
Copy link
Member

mdebarros commented Aug 16, 2019

Summary:
Environmental Variables are not being set by the Config object as a Boolean type, and instead, are set a string value.

Severity:
Low

Priority:
Low

Expected Behavior
Declare an Environmental Variable for any Boolean Configuration (e.g. export CLEDG_SIDECAR_DISABLED=true) should be represented as a Boolean type.

Fix:

  1. Include the following import on the config.js:
    require('parse-strings-in-object') <-- ref: https://www.npmjs.com/package/parse-strings-in-object#example-in-rc-config

Example implemented in the Event SDK:
const RC = require('parse-strings-in-object')(require('rc')('EVENT_SDK', require('../../config/default.json')))

Steps to Reproduce

  1. Declare an Environmental Variable for any Boolean Configuration (e.g. export CLEDG_SIDECAR_DISABLED=true)
  2. This will be correctly assigned to the Config object, but it will be a string instead of a Boolean

Specifications

  • Component (if known): Central-Ledger, ML-API-Adapter, Batch-API-Adapter, Central-Settlements, Account-lookup-service, etc
  • Version: all
  • Platform: n/a
  • Subsystem: n/a
  • Type of testing: manual
  • Bug found/raised by: @mdebarros

Pull Requests:

Notes:

  • Severity when opened:
  • Priority when opened:
@mdebarros mdebarros added the bug label Aug 16, 2019
@gibaros gibaros self-assigned this Nov 1, 2019
@elnyry-sam-k elnyry-sam-k added this to the Sprint 8.4 milestone Nov 4, 2019
@ggrg ggrg self-assigned this Nov 5, 2019
@gibaros
Copy link

gibaros commented Nov 8, 2019

Fixes have been applied and merged to account-lookup-service, ml-api-adapter, bulk-api-adapter, central-settlement, transaction-requests-service and quoting-service.

@gibaros gibaros closed this as completed Nov 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants