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

Make example-gateway production.json the source of truth #222

Closed
ravirajj opened this issue Sep 28, 2017 · 3 comments
Closed

Make example-gateway production.json the source of truth #222

ravirajj opened this issue Sep 28, 2017 · 3 comments
Assignees

Comments

@ravirajj
Copy link
Contributor

Currently, running make test-update over-writes the examples/example-gateway/config/production.json config file with values from backend/repository/data/client/baz_client_update.json.

Please make examples/example-gateway/config/production.json the one source of truth for config settings.

@Raynos
Copy link
Contributor

Raynos commented Sep 28, 2017

is this actually true ?

@ChuntaoLu
Copy link
Contributor

I think this might be the intended behavior? To the gateway UI, config/production.json is the derived/aggregated data from the configs of each client. @zhenghuiwang Can you clarify?

The interesting thing here is zanzibar and the UI backend has different favors on some of the client configs, i.e., zanzibar thinks the ip/port info should be in config/production.json while UI backend gets it from client config.

@zhenghuiwang
Copy link
Contributor

To the gateway UI, config/production.json is the derived/aggregated data from the configs of each client. @zhenghuiwang Can you clarify?

Yes, that is correct.

The issue here is the conflict about how to use example-gateway for unit tests. On the one hand, it is used as test fixtures from the very beginning of the project. On the other hand, after introducing the UI backend, it is also the expected configuration after backend modification.

That's why Ravi is confused about why handwritten fields get override by make test-update. We can extract all UI backend request from production.json and write it back to make production.json the source of truth, but I think it's not worth the effort and may not result in good tests.

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