Repository navigation
Add support for breakglass for immutable folders - #6774
andrewnester wants to merge 17 commits into
Conversation
Approval status: pending
|
Integration test reportCommit: 779156f
20 interesting tests: 20 FAIL
|
| return 0, nil | ||
| } | ||
|
|
||
| entry, ok := b.DeploymentBundle.StateDB.GetResourceEntry(resources.SnapshotKey) |
There was a problem hiding this comment.
This reads state and makes a determination. Shouldn't that live in a DoRead of the snapshot?
I.e. seeing a different generation, or a "broken_glass: true" on DoRead can trigger recreation.
There was a problem hiding this comment.
There are a couple of blockers why it is not in DoRead, mainly the --force flag, which is not available at the resource level
It's also conceptually similar to existing CheckDashboardsModifiedRemotely check we have
| // ContentSubdir is the fixed subfolder the snapshot API appends to a caller-supplied | ||
| // relative_path to form the immutable content path (e.g. "<root>/<relative_path>/snapshot"). | ||
| // The content path is what the create API echoes back and what InspectSnapshot inspects. | ||
| const ContentSubdir = "snapshot" |
There was a problem hiding this comment.
I think it's related to the fact that when we upload zip, we create 2 folders: one snapshot which can be broken glass and one is .internal which is not and contains a break glass marker and some other metadata
Changes
Add support for breakglass for immutable folders
Why
Immutable folders can be "break-glassed" in an emergency. In this case, CLI should prevent a normal deploy if the previously used snapshot was broken. With --force, it should allow to deploy to a new suffixed path and the deployments after should continue as normal
Note: there is no REST API endpoint to check the status of folder yet so we use GraphQL one for now
Tests
Added an acceptance test