screwdriver
screwdriver copied to clipboard
Switching `Group events` does the reverse to `Show triggers`
When you go to the Options page and turn on Show Triggers (which by the way takes ~1 minute for the actual PUT to be done) and then reload the page, you will notice that Group Events is being turned off.
The same thing happens when switching Group Events, at which point Show Triggers is turned off.
@klu909 @adong
This issue is due to the pipeline preference parameter used in the data-schema being due to default (false).
Solution
This issue can be resolved by changing the default (false) in the pipeline preference data-schema to optional().
I checked to see if this fix would cause problems when creating the pipeline, but it wasn't a problem.
groupedEvents: Joi.boolean().default(false),
showEventTriggers: Joi.boolean().default(false)
↓
groupedEvents: Joi.boolean().optional(),
showEventTriggers: Joi.boolean().optional()
reference: https://github.com/screwdriver-cd/data-schema/blob/ab138fcb9c83eaee5e0be0b4218751ac57f2daa7/config/settings.js#L32
Cause
I investigated the cause of this.
When groupedEvents in pipeline preference is turned on.
DB settings before change:
groupedEvents: false
showEventTriggers: true
Request sent from UI:
settings: {
groupedEvents: true
}
Parameters received by API:
settings: {
groupedEvents: true,
showEventTriggers: false,
otherPropertyA: false,
otherPropertyB: false
...
}
In this way, on the API side, everything other than the parameters sent from the UI will be false depending on the data-schema settings.