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

Clarify or remove use of fixture data in settings.json #245

Closed
aaronjudd opened this issue Jan 17, 2015 · 3 comments
Closed

Clarify or remove use of fixture data in settings.json #245

aaronjudd opened this issue Jan 17, 2015 · 3 comments
Assignees

Comments

@aaronjudd
Copy link
Contributor

The problem:

@prinzdezibel "Ouch! Wasting several hours to realize that some (not all?!) values in settings/*.json are used as fixture data to populate DB (PAYPAL-REST-Credentials). And I was thinking, these are values that are read every time I do a server restart.. This is not good IMHO.
I would expect runtime app configuration values there..
no fixture data.
I was changing values over and over with no effect.."

Possible solutions:

understand the confusion, it’s a practice many of the meteor packages use, but you are correct it’s probably either a) something we should remove entirely (and make it a best practice to not do this), or b) something we should document better. I would lean towards removing any kind of fixture data (but then you’d need your own fixture data when testing in private/data) or c) creating a fixtures.json that is specific for package fixture data (versus private/data which would not be modified for the average user) or d) add a fixture object to settings.json and move fixture related into object (plus docs). I’ll add an issue for discussion

@prinzdezibel
Copy link
Contributor

For the average shop admin/technician it is totally acceptable (and probably easier) to force him do initial database configurations through an Admin-UI and NOT confuse him with configuration file settings that are used only in certain cases (e.g. when running meteor reset, when database is empty, etc..)

The value of the existing mechanism lies in the ease of development for reaction commerce core developers. Because they can do meteor reset without loosing DB configuration. But because they are very savvy with the source I would absolutely not hesitate to force them to put their own private configuration to private/data like all the other (more universally used) fixture data.

My proposal: Drop data fixtures from settings completely and give developers a way for maintaining individual fixture data.

@aaronjudd
Copy link
Contributor Author

I think this goes hand in hand with intent in #239 and #238

I agree, with your assesment. I think we started using settings.json long before we had the fixtures data. It might be useful to add a fixtures method for the app level as well though, since not all developers are working in core, (such as, I'm just writing a payment package).

@aaronjudd aaronjudd added this to the v0.2.3 milestone Jan 17, 2015
@aaronjudd aaronjudd modified the milestones: Core Architecture, v0.2.3 Jan 19, 2015
@aaronjudd aaronjudd self-assigned this Feb 15, 2015
aaronjudd added a commit that referenced this issue Feb 16, 2015
Updated for issue #245
aaronjudd added a commit that referenced this issue Dec 3, 2015
Populates language selections from shops.languages rather than the
translation files.
Remove “entryText” from translation files.
No need to provide core.languages in translation, selections are in
native format for all languages by default
(you can still override in translations though)
Publication no longer returns all translations, just EN + chosen
language

Adds some checks for publications for Issue #14
Documentation updates for Issue #245
Resolves #251
aaronjudd added a commit that referenced this issue Dec 3, 2015
Populates language selections from shops.languages rather than the
translation files.
Remove “entryText” from translation files.
No need to provide core.languages in translation, selections are in
native format for all languages by default
(you can still override in translations though)
Publication no longer returns all translations, just EN + chosen
language

Adds some checks for publications for Issue #14
Documentation updates for Issue #245
Resolves #251
aaronjudd added a commit that referenced this issue Dec 3, 2015
Populates language selections from shops.languages rather than the
translation files.
Remove “entryText” from translation files.
No need to provide core.languages in translation, selections are in
native format for all languages by default
(you can still override in translations though)
Publication no longer returns all translations, just EN + chosen
language

Adds some checks for publications for Issue #14
Documentation updates for Issue #245
Resolves #251
aaronjudd added a commit that referenced this issue Dec 3, 2015
Additional example and updates for #245
@useralive003
Copy link

root@dev-app-server:~/reaction# ./reaction
Starting Reaction using '/root/reaction/settings/dev.settings.json'.
[[[[[ ~/reaction ]]]]]

=> Started proxy.
=> Started MongoDB.
Unexpected mongo exit code null. Restarting.
bin/run: line 30: 7730 Killed meteor $CMD --raw-logs --settings $DEVCONFIG $ARGS

cmbirk pushed a commit to cmbirk/reaction that referenced this issue Aug 18, 2019
…v-staging

fix: forgot an env for staging. Sync int and staging so all consumers…
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

3 participants