Add a route for PATCHing both a config entity and its auto-saved version together

Created on 17 April 2025, 5 days ago

Overview

When you send a PATCH request to the experience_builder.api.config.patch route, it deletes the version that's in auto-save storage, which is correct since that's now outdated. However, sometimes what we want instead is to apply the same set of changes to both the published entity and to the auto-saved one. For example, in πŸ› Adding component to component library results in component code and configuration being lost Active , we want to set status=1 to both the published js_component and the auto-saved one, with neither deleting the auto-saved one nor publishing the other changes that are in the auto-saved one. The reason we want that is setting status=1 needs to trigger the creation of the corresponding component entity, but it should only do that when the entity is saved for real.

A way to think of this is: we want to apply a "hot fix" to both the production branch (the published entity) and the development branch (the auto-saved draft).

Proposed resolution

We already have these two routes:

  • experience_builder.api.config.patch
  • experience_builder.api.config.auto-save.patch

Create a 3rd route, (what's a good name: experience_builder.api.config.published-and-auto-save.patch? experience_builder.api.config.hotfix.patch?), that applies the PATCH body to both.

User interface changes

πŸ“Œ Task
Status

Active

Version

0.0

Component

Auto-save

Created by

πŸ‡ΊπŸ‡ΈUnited States effulgentsia

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024