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

FLOWDB_HOST not what I expected #827

Closed
josh-gree opened this issue May 21, 2019 · 6 comments · Fixed by #831
Closed

FLOWDB_HOST not what I expected #827

josh-gree opened this issue May 21, 2019 · 6 comments · Fixed by #831
Labels
development FlowDB Issues related to FlowDB

Comments

@josh-gree
Copy link
Contributor

Describe the bug

If I run the following command to spin up flowdb with other containers;

 DOCKER_SERVICES="flowdb flowetl flowetl_db" make up-no_build

Then the DOCKER_FLOWDB_HOST is not set to flowdb as I would expect but to flowdb_testdata as this is the default in the Makefile. In order to specify starting a subset of services with the correct DOCKER_FLOWDB_HOST I have to run;

FLOWDB_SERVICES=flowdb DOCKER_SERVICES="flowdb flowetl flowetl_db" make up-no_build

Specifying flowdb twice...And possibly allowing for somebody to do something like;

FLOWDB_SERVICES=flowdb DOCKER_SERVICES="flowdb_synthetic_data flowetl flowetl_db" make up-no_build

Which would again lead DOCKER_FLOWDB_HOST being incorrect.

Is there not a way of removing the FLOWDB_SERVICES env var completely and just finding the name of the flowdb service from DOCKER_SERVICES if it exists? Also not completely clear why you ever want to have multiple versions of flowdb at the same time!?

@greenape
Copy link
Member

greenape commented May 21, 2019

You should just be able to omit flowdb from DOCKER_SERVICES, so:

FLOWDB_SERVICES=flowdb DOCKER_SERVICES="flowetl flowetl_db" make up-no_build

@greenape greenape added FlowDB Issues related to FlowDB development labels May 21, 2019
@josh-gree
Copy link
Contributor Author

josh-gree commented May 21, 2019

Am I missing something! You can't though right? Cos FLOWDB_SERVICES only gets prefixed to the default DOCKER_SERVICES not any user specified DOCKER_SERVICES?

@greenape
Copy link
Member

Shoot, no, you're right.

@maxalbert
Copy link
Contributor

Agreed @josh-gree, this is an annoying usability issue. I think the existence of FLOWDB_SERVICES was meant to provide an easy way of just switching out the kind of flowdb you want to use (because all the other services used to be fixed and you didn't need to specify them all the time. But now that we have more of them in DOCKER_SERVICES that you potentially want to omit (like the worked examples or others, as in you example above) it seems better to just do away with FLOWDB_SERVICES and require the user to explicitly set DOCKER_SERVICES to the list of services they want to use. I'll change it in the Makefile.

@greenape
Copy link
Member

DOCKER_SERVICES ?= $(FLOWDB_SERVICES) flowapi flowmachine flowauth flowmachine_query_locker flowetl flowetl_db worked_examples

to

DOCKER_SERVICES ?= flowapi flowmachine flowauth flowmachine_query_locker flowetl flowetl_db worked_examples
DOCKER_SERVICES = $(FLOWDB_SERVICES) $(DOCKER_SERVICES)

Or something like that?

@maxalbert
Copy link
Contributor

I think given the typical use cases that arise in practie (which weren't quite clear when I wrote that Makefile) it's actually easier and cleaner to completely get rid of FLOWDB_SERVICES and only use DOCKER_SERVICES. I'll put a PR up and we can discuss there.

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

Successfully merging a pull request may close this issue.

3 participants