Skip to content

admin: Dry-run/preview mode #4717

@mholt

Description

@mholt

After troubleshooting on a call with a sponsor, I think it would be really helpful to have a "dry-run" or "preview" mode for the config API so that any request could be rehearsed before committing the change right away.

If there's any HTTP semantics for something like this, I'd be open to considering that.

Otherwise, maybe a custom HTTP header like Mode: Preview could be added:

$ curl -X POST \
	-H "Content-Type: application/json" \
	-H "Mode: preview" \
	-d '"DEBUG"' \
	"http://localhost:2019/config/logging/logs/default/level"

Whenever that header is present, the resulting config would be returned in the response body without applying it. It should come with an ETag (see #4579) to prevent race conditions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions