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

Add command line switch to enable projections on startup #504

Closed
jen20 opened this issue Jun 6, 2015 · 5 comments
Closed

Add command line switch to enable projections on startup #504

jen20 opened this issue Jun 6, 2015 · 5 comments
Labels
kind/enhancement Issues which are a new feature

Comments

@jen20
Copy link
Contributor

jen20 commented Jun 6, 2015

As @sbellware points out it would be useful to be able to enable projections on startup for unit testing without the need to invoke a script etc. Consider adding a command line such as (--enable-system-projections) that starts them in the enabled state.

@jen20 jen20 added the kind/enhancement Issues which are a new feature label Jun 6, 2015
@jen20 jen20 added this to the Event Store 3.0.6 milestone Jun 6, 2015
@gregoryyoung
Copy link
Contributor

I am slightly against this. For me I only see it ever being used in the
case of unit tests (there is no use for a production system to have this).

If doing unit tests you can also pretty easily enable projections

On Sat, Jun 6, 2015 at 3:38 AM, James Nugent notifications@github.com
wrote:

As @sbellware https://github.com/sbellware points out it would be
useful to be able to enable projections on startup for unit testing without
the need to invoke a script etc. Consider adding a command line such as (
--enable-system-projections) that starts them in the enabled state.


Reply to this email directly or view it on GitHub
#504.

Studying for the Turing test

@sbellware
Copy link

Yes, it's specifically for a testing scenario where an ephemeral database is being used.

I didn't feel that it was easy, per se from the perspective of test automation, to enable projections on a newly started instance.

I wrote this script to do it: https://gist.github.com/sbellware/74a8090fc73c871c016b

So, now I have an automated way to do it, but the "easiness" really isn't something I see as akin to automation.

My startup script now does what I want it to do, and I suppose anyone else can copy that Gist code and use it if they want the same effect.

If that script proliferates, it might be an affirmation that it is a common way to start the server, and it would possibly be a voting in-favor of being able to do this without going to the HTTP control interface immediately after actuating the principle start-up control (the clusternode binary).

So, yes, it's for testing. And yes, it would be nice to not consider this mode a second class citizen of server startup because it's for testing. I would offer that what matters is what's common rather than what's production.

Anyway, in the mean time - and as long as the interface doesn't change - I've got what I think of as a workable workaround.

@gregoryyoung
Copy link
Contributor

I understand totally however I would push towards lets write a blog post and provide copy/paste code or bring better documentation as opposed to adding a feature.

@jen20 jen20 modified the milestones: Event Store 3.1.0, Event Store v3.2.0 Aug 13, 2015
@jen20 jen20 removed this from the Event Store v3.2.0 milestone Sep 7, 2015
@pgermishuys
Copy link
Contributor

Just putting this in here as a note.
There was a command line switch (--development-mode) added that would start the system projections here 918ca9f
The --development-mode has since also been split into 2 separate switches which are --start-standard-projections and --disable-http-caching

Also, +1 regarding the documentation around starting the projections.

@pgermishuys
Copy link
Contributor

Closing this issue as projection documentation will cover this as this issue is directed at the command line switch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Issues which are a new feature
Projects
None yet
Development

No branches or pull requests

4 participants