question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Implement read-only mode

See original GitHub issue

As part of https://github.com/mozilla/addons-server/issues/1050 we implemented a read-only notification for the API as well.

The behavior is as follows:

In case of a maintainance / read-only mode get’s turned on…

  • GET requests behave normal
  • POST, PUT and DELETE requests return 503 with a json response that contains a localized error message
  • A custom X-AMO-Read-Only header is set to true
  • a Retry-After header may be set, it’s not a requirement though

In case that maintainance / read-only mode get’s turned off…

  • GET, POST, PUT, DELETE requests behave normal again
  • X-AMO-Read-Only header is set to false

Since we’re expecting a maintainance relatively soon it’d be really nice to give this a higher priority, hoping it’s not too much work. But let me know in case it’s more work and needs more time.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:25 (20 by maintainers)

github_iconTop GitHub Comments

1reaction
willdurandcommented, Oct 11, 2018

I 2nd the @bobsilverberg’s idea of starting with the simplest solution - making sure inline error messages look ok for read-only mode is preferable doing something very specific and involved for such an infrequent use-case.

Given that error messages is updated for 503 responses in case of read-only mode, everything just works already:

2018-10-11 12 06 58

There is no need to change anything.

1reaction
bobsilverbergcommented, Oct 10, 2018

@muffinresearch It looks like @willdurand has answered your question. Doesn’t seem like a huge task.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Read-Only Mode For Better Rails Downtime
Read-Only Mode For Better Rails Downtime. Recently I was looking to upgrade the Postgres version on an application I've been working on.
Read more >
How to make your app compatible with read-only mode
When a site is placed in read-only mode, users will be able to view pages and their history, but not create, edit, comment, ......
Read more >
Read only mode for Ruby on Rails application
If a model is set to readonly (normally done by calling #readonly! on it), any try to save the record will raise an...
Read more >
HTML attribute: readonly - HTML: HyperText Markup Language
The Boolean readonly attribute, when present, makes the element not mutable, meaning the user can not edit the control.
Read more >
Read-Only Mode
Access to your data at a moment's notice—even during our planned maintenance windows. To minimize interruption to your business, Salesforce gives users re....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found