Skip to content
This repository has been archived by the owner on Jul 12, 2023. It is now read-only.

block verify and throw up a banner #1143

Merged
merged 2 commits into from
Nov 18, 2020
Merged

Conversation

whaught
Copy link
Contributor

@whaught whaught commented Nov 18, 2020

Fixes #1139

Proposed Changes

  • Blocks request to verify
  • Puts up a scary banner when in maintenance mode

scary

Release Note

Maintenance mode block issue and verify requests. Adds a banner to the header.

@googlebot googlebot added the cla: yes Auto: added by CLA bot when all committers have signed a CLA. label Nov 18, 2020
@@ -39,6 +39,12 @@ import (

func (c *Controller) HandleVerify() http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
if c.config.MaintenanceMode {
c.h.RenderJSON(w, http.StatusTooManyRequests,
api.Errorf("server is read-only for maintenance").WithCode(api.ErrMaintenanceMode))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this needs to be in the release notes - changes device API surface
needs to be added to docs as well

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#1142 added it to the response codes for both APIs in docs/api.md

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@google-oss-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mikehelmick, whaught

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [mikehelmick,whaught]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-robot google-oss-robot merged commit 06b5df5 into google:main Nov 18, 2020
@whaught whaught deleted the mmode-banner branch November 19, 2020 00:23
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes Auto: added by CLA bot when all committers have signed a CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add maintenance mode
4 participants