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

As enterprise admin I want to use my own back-end services #2015

Open
2 tasks
brusherru opened this issue Aug 11, 2020 · 1 comment
Open
2 tasks

As enterprise admin I want to use my own back-end services #2015

brusherru opened this issue Aug 11, 2020 · 1 comment

Comments

@brusherru
Copy link
Contributor

brusherru commented Aug 11, 2020

Rationale

The enterprise admin wants to use their own auth, pm, compile, and other services. Also, it much desired to avoid rebuilding clients to update hostnames of such services. So admin should have a possibility to overwrite ENV variables like XOD_HOSTNAME via the config file.

Prerequisites

#2013 — introducing a new configuration file

User story

To overwrite a XOD_HOSTNAME variable the admin sets hostname property in the config:

{
  "hostname": "my.own.server"
}

Acceptance criteria

  • the env variables should have default as it works now, but it might be overwritten by values from the config
  • in the code getting some constant env variable values should be replaced with functions, which gets the value from the config file, if not specified, takes it from ENV variables set during the build process, or fallback to the default values

How to implement

  1. Introduce a new property in the config.json
  2. Create function getXodHostname :: void -> String with the behavior described above
  3. Replace process.env.XOD_HOSTNAME and in the code with the new function

How to test

Mock the config.json file (like in #2013) and make assertions for the new function.

@brusherru brusherru changed the title As Enterprise admin I want to use my own back-end services As enterprise admin I want to use my own back-end services Aug 11, 2020
@nkrkv
Copy link
Member

nkrkv commented Aug 12, 2020

The env section looks weird in a config made specifically for the IDE. The fact some env variables are taken into account while bundling is an internal detail which (arguably) should not be exposed to an admin, and at such an abstract level: “place env here whatever it means”. To make an analogy it would be equivalent to requiring:

./foo-cli --env FOO_CLI_PARAM=arg

instead of

./foo-cli --param=arg

Suggest removing the abstraction, focus on a thing, and leave just plain and simple hostname

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants