BonnyCI / projman

A project management repository -- meta
0 stars 2 forks source link

the gate pipeline does not trigger as expected #229

Closed gandelman-a closed 7 years ago

gandelman-a commented 7 years ago

I hit this on the sandbox repo after automating the PR filing and approval process. the issue there was:

The gate never ended up triggering if the approval happened close to the check job finishing. Waiting some time (~60s) before adding the approval got it to trigger.

But we just noticed an issue in BonnyCI/hoist that feels similar and is reproducible on the sandbox:

In both cases, zuul thinks the PR does not match the pipeline requirements, with a log entry similar to:

2017-04-25 23:23:48,109 DEBUG zuul.DependentPipelineManager: Event <TriggerEvent status BonnyCI/hoist master 365,ab45908f6552377866daa0c02d2053d67348e43a> for change 365,ab45908f6552377866daa0c02d2053d67348e43a matched <EventFilter types: status ignore_deletes: True event_statuses: bonnyci[bot]:check_github:success> in pipeline <DependentPipelineManager gate_github>
2017-04-25 23:23:48,110 INFO zuul.Scheduler: Adding BonnyCI/hoist, 365,ab45908f6552377866daa0c02d2053d67348e43a to <Pipeline gate_github>
2017-04-25 23:23:48,110 DEBUG zuul.DependentPipelineManager: Considering adding change 365,ab45908f6552377866daa0c02d2053d67348e43a
2017-04-25 23:23:48,110 DEBUG zuul.DependentPipelineManager: Change 365,ab45908f6552377866daa0c02d2053d67348e43a does not match pipeline requirement <ChangeishFilter statuses: bonnyci[bot]:check_github:success required_approvals: [{'review': 2}] reject_approvals: [{'review': -2}]>
gandelman-a commented 7 years ago

This looks to be caused by the cachecontrol library we're using for caching our github API requests. AFAICS it always using the max-age headers to do time-based caching before it ever tries to send a conditional request with the cached etags: https://github.com/ionrock/cachecontrol/blob/master/cachecontrol/adapter.py#L39

SpamapS commented 7 years ago

Done!