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

Should test environment ignore .local files? #135

Closed
franzliedke opened this issue Mar 9, 2016 · 7 comments · Fixed by #233
Closed

Should test environment ignore .local files? #135

franzliedke opened this issue Mar 9, 2016 · 7 comments · Fixed by #233
Labels
Milestone

Comments

@franzliedke
Copy link
Contributor

I'd argue yes.

Since you cannot know what other developers have configured in their *.local.yml files, you don't know how those values will affect the tests.
But we want tests to be reproducible, so I'd argue that in the test environment, these files should not be loaded. (After all, the behaviour can be changed using reload_from_files in test setup.)

What do you think?

@pkuczynski
Copy link
Member

I think developers should only create *.local.yml files if they really need them to customise to their local env. You would never be able to stop people from making customisations which they do not push to the repo. That's why they should be caught by the CI environment which holds verifiable and correct configuration.

@pkuczynski pkuczynski added this to the 1.3 milestone May 12, 2016
@franzliedke
Copy link
Contributor Author

Hmm, I disagree. But that's probably because these settings can be used for so many different things.

Can we at least get some kind of option that allows us to turn this off in the test setup scripts?

@pkuczynski
Copy link
Member

I could add that option. If I understand correctly you want to protect yourself from situation where developers makes amendments in .local.yml files for test environments, which makes tests out of sync with your main CI environment, correct?

But then imagine a situation where developers would keep modifying .yml files directly, if you do not allow them to modify .local.yml. There must be a reason why they even need to create .local.yml files, which always felt like an edge case to me.

Do you know why do they need to create those files in a first place?

@franzliedke
Copy link
Contributor Author

We once had specs that tested the default values for certain config variables. Haha, maybe that's not the best example... ;)

More importantly, we do use config sometimes for data that doesn't need an admin interface (yet), so that's always specific per deployment / environment. Also, we sometimes test certain adapters locally, so that warrants having a non-default value in a .local.yml file.

I'd be very indebted if you could at least add an option. Please let me know if you decide to do so.

Thanks for the great library in any case!

@pkuczynski
Copy link
Member

Fair enough, I could put that on the roadmap, but can't promise how quickly I can work on that. If you need it quick, you are welcome to send PR or make some donation to sponsor this feature...

@pkuczynski
Copy link
Member

@franzliedke would you be keen to provide PR for this?

@franzliedke
Copy link
Contributor Author

Done in #233.

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

Successfully merging a pull request may close this issue.

2 participants