Skip to content

Commit 4254e45

Browse files
committed
TASK: switch config epoch default value to string with integer content
1 parent c57cc47 commit 4254e45

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

Configuration/Settings.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ Flowpack:
122122

123123
# can be used on the consuming site to ensure non-breaking deployments for changes in the config
124124
configEpoch:
125-
current: v1
125+
current: '1'
126126
previous: ~
127127

128128

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -388,15 +388,16 @@ Example:
388388
Flowpack:
389389
DecoupledContentStore:
390390
configEpoch:
391-
current: v2
392-
previous: v1
391+
current: '2'
392+
previous: '1'
393393
```
394394

395395
- Now on the consuming site we can take action to handle both the old and new config and decide based on the value in
396396
redis which case is executed.
397397

398398
```php
399-
'contentStoreUrl' => 'https://www.vendor.de/' . ($configEpoch === 'v2' ? 'de-de/' : '')
399+
$configEpoch = (int) $redisClient->get('contentStore:configEpoch');
400+
$contentStoreUrl = 'https://www.vendor.de/' . ($configEpoch > 1 ? 'de-de/' : '');
400401
```
401402

402403
## Development

Resources/Private/BackendFusion/Integration/Backend.Index.fusion

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ Flowpack.DecoupledContentStore.BackendController.index = Neos.Fusion:Component {
55
// - contentStore: contains string content store identifier
66
// - redisContentStores: array of all configured content store identifiers
77
// - storeSize: string of content store size
8-
// - toggleFromConfigEpoch: string, e.g. "v2"
9-
// - toggleToConfigEpoch: string, e.g. "v1"
8+
// - toggleFromConfigEpoch: string, e.g. "2"
9+
// - toggleToConfigEpoch: string, e.g. "1"
1010
// - showToggleConfigEpochButton: boolean
1111

1212
renderer = Neos.Fusion:Component {

0 commit comments

Comments
 (0)