isomerpages / isomercms-backend

A static website builder and host for the Singapore Government
5 stars 1 forks source link

feat(repair): add locking functionailty #1327

Closed kishore03109 closed 5 months ago

kishore03109 commented 6 months ago

Problem

1313 introduces git force pushes. While this is ok from the user point of view, this impedes with operations since now ops will need to ask eng to lock the repo first, then edit it on github, then unlock the repo, then submit the repair form (since the repair form also attempts to acquire the lock)

Solution

There are 3 modes for the repair form now.

Repair with lock is what the repair form used to do. This is now not the recommended flow for editing sites. The recommended flow to edit the sites manually should be

  1. submit lock only repair form
  2. make edits
  3. submit form to repair without lock

Intentionally leaving the option to continue to repair without lock in case there is any lingering divergence bet staging and staging lite.

Breaking Changes

Before & After Screenshots

BEFORE:

AFTER:

Changes to form:

Screenshot 2024-04-22 at 11 13 02 AM

Tests

Deploy Notes

Modify the production form to be similar to the one in staging. Concretely, add a dropdown with the

title

Repair mode

description:

Select 'Only lock repo' if you want to do manual repairs directly on Github. Select 'Repair without acquiring lock' if you want to sync the changes from Github onto EFS and you have already submitted this form to lock the repo. Select 'Repair with acquiring lock' if you want to just want to repair the repo as is without any modification.

options:

Only lock repo Repair without acquiring lock Repair with acquiring lock

It should match what you see here:

Screenshot 2024-04-23 at 8 14 38 AM

This needs to be released prior/in the same release as #1313. Once this is live, inform the isomer channel about the newer flow.

kishore03109 commented 6 months ago

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @kishore03109 and the rest of your teammates on Graphite Graphite