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

Read-Only Mode #1838

Closed
mbarnett opened this issue Aug 28, 2020 · 4 comments
Closed

Read-Only Mode #1838

mbarnett opened this issue Aug 28, 2020 · 4 comments
Assignees

Comments

@mbarnett
Copy link
Contributor

mbarnett commented Aug 28, 2020

We want a simple way to enable and disable a read-only mode for ERA, in response to events like emergencies or upgrades that require us to freeze the data in a certain state, but don't require us to take the site down altogether.

I'm thinking we:

@mbarnett mbarnett assigned mbarnett and ConnorSheremeta and unassigned mbarnett Aug 28, 2020
@lagoan
Copy link
Contributor

lagoan commented Aug 31, 2020

What if instead of having a single one value table we have a site wide configuration table (JupiterConfiguration or whatever) Where readOnlyMode is a value in that table.

This would allow to add more configuration values down the line and there is trivial extra work done to achieve this.

We could have a #readOnlyEnabled? method that can set the default value if it does not exist on the database.

@mbarnett
Copy link
Contributor Author

mbarnett commented Aug 31, 2020

In the spirit of YAGNI I really think that would be getting ahead of ourselves?

Right now we only have one use-case for this, and my philosophy is that you always want to have a minimum of two competing use-cases for something before you try to design a generic API around it.

I'd also be concerned about the lack of clarity between a "generic configuration" table and our general philosophy of config being something that is contributed by the environment (the 12 factor app approach, more or less). The need to make a read-only mode "dynamic configuration" is as much as anything a work-around for the extremely long deployment times imposed upon us any time we want to make a simple change to configuration; I don't think we should let this corner case inform our more general approach to configuration by building out a mechanism that in some sense encourages doing the wrong thing?

To pull directly from the Jupiter manifesto:

  1. More than anything else, we should prefer to err on the side of simplicity. It is always easier to make a simple thing a bit more complex, than it is to simplify a complicated solution.
    corollary: We should prefer to ship something that only does 80% of what we need, and is missing the other 20%, rather than build something that solves 120% of our current needs by trying to imagine things we might want in the future. Attempts to anticipate the future rarely succeed, and often paint us into a corner.

@ConnorSheremeta
Copy link
Contributor

What would be the best message for the banner on the top of the page for this? I have:

'Logins are currently disabled due to system maintenance, please try again later.'

The message should maybe have more or less information, it is dependant on the banner message that the admin will set before turning this mode on.

@mbarnett
Copy link
Contributor Author

mbarnett commented Sep 2, 2020

Lets run with that for now, and we can get final wording from Sean/Leah once they see it on Staging

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