Event system alpha experiment (#18795)

This commit is contained in:
Tom Proctor 2023-01-23 19:26:49 +00:00 committed by GitHub
parent 15ae00d147
commit fc378c0908
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 6 additions and 6 deletions

View File

@ -1,4 +1,4 @@
```release-note:improvement
core: Add experiments system and `events.beta1` experiment.
core: Add experiments system and `events.alpha1` experiment.
```

View File

@ -1,9 +1,9 @@
package experiments
const VaultExperimentEventsBeta1 = "events.beta1"
const VaultExperimentEventsAlpha1 = "events.alpha1"
var validExperiments = []string{
VaultExperimentEventsBeta1,
VaultExperimentEventsAlpha1,
}
// ValidExperiments exposes the list without exposing a mutable global variable.

View File

@ -1269,7 +1269,7 @@ func NewCore(conf *CoreConfig) (*Core, error) {
return nil, err
}
c.events = events
if c.isExperimentEnabled(experiments.VaultExperimentEventsBeta1) {
if c.isExperimentEnabled(experiments.VaultExperimentEventsAlpha1) {
c.events.Start()
}

View File

@ -5466,7 +5466,7 @@ func TestSystemBackend_ReadExperiments(t *testing.T) {
for name, tc := range map[string][]string{
"no experiments enabled": {},
"one experiment enabled": {experiments.VaultExperimentEventsBeta1},
"one experiment enabled": {experiments.VaultExperimentEventsAlpha1},
} {
t.Run(name, func(t *testing.T) {
// Set the enabled experiments.

View File

@ -37,7 +37,7 @@ $ curl \
"renewable": false,
"data": {
"available": [
"events.beta1"
"events.alpha1"
],
"enabled": []
},