Wednesday, 2018-08-08

mordredgundalow: zuul.branch is branch, zuul.project contains information about the project that triggered the job, but of course remember that a job can have multiple repos associated with it, so there's also zuul.projects which contains info about all projects involved in the job00:00
mordredgundalow: there can also be more than one commit involved in a collective git repo state, so you'll find that info in zuul.items00:01
gundalowmordred: Ace, thanks00:08
tristanCcorvus: aren't project-templates configuration already expanded in the project_configs pipeline list?00:20
*** eumel8 has quit IRC00:54
openstackgerritIan Wienand proposed openstack-infra/zuul-jobs master: [WIP] kerberos & afs client roles  https://review.openstack.org/58933403:10
openstackgerritIan Wienand proposed openstack-infra/zuul-jobs master: [WIP] kerberos & afs client roles  https://review.openstack.org/58933403:53
*** goern has joined #zuul04:21
openstackgerritIan Wienand proposed openstack-infra/zuul-jobs master: [WIP] kerberos & afs client roles  https://review.openstack.org/58933404:27
openstackgerritIan Wienand proposed openstack-infra/zuul-jobs master: [WIP] kerberos & afs client roles  https://review.openstack.org/58933404:39
openstackgerritIan Wienand proposed openstack-infra/zuul-jobs master: [WIP] kerberos & afs client roles  https://review.openstack.org/58933404:55
*** goern has quit IRC04:55
*** goern has joined #zuul04:56
*** eumel8 has joined #zuul05:59
openstackgerritIan Wienand proposed openstack-infra/zuul-jobs master: [WIP] kerberos & afs client roles  https://review.openstack.org/58933406:01
openstackgerritIan Wienand proposed openstack-infra/zuul-jobs master: [WIP] kerberos & afs client roles  https://review.openstack.org/58933406:20
*** pcaruana has joined #zuul06:27
*** jpena|off is now known as jpena07:46
*** AJaeger is now known as AJaeger_07:50
*** darkwisebear has joined #zuul08:23
*** electrofelix has joined #zuul08:38
*** darkwisebear has quit IRC08:58
*** ssbarnea has quit IRC08:59
openstackgerritMarkus Hosch proposed openstack-infra/zuul master: WIP: Unexpected behavior of a reject clause  https://review.openstack.org/58976208:59
*** darkwisebear has joined #zuul09:05
*** gtema has joined #zuul09:05
openstackgerritMarkus Hosch proposed openstack-infra/zuul master: WIP: Unexpected behavior of a reject clause  https://review.openstack.org/58976209:08
*** ssbarnea has joined #zuul09:13
openstackgerritTristan Cacqueray proposed openstack-infra/zuul master: Ensure build.start_time is defined  https://review.openstack.org/53554909:20
openstackgerritTristan Cacqueray proposed openstack-infra/zuul master: timer: do not skip projects using pipeline from template  https://review.openstack.org/58983610:50
tristanCcorvus: AJaeger_: 589836 seems to fix the issue, the new test fail without the timer fix10:50
AJaeger_tristanC: thanks!10:52
AJaeger_tristanC: small fix - and large test case ;) Good to have that!10:54
*** darkwisebear has quit IRC11:16
*** darkwisebear has joined #zuul11:23
*** jpena is now known as jpena|lunch11:35
openstackgerritMatthieu Huin proposed openstack-infra/nodepool master: Do not abort node launch if failed node cannot be deleted  https://review.openstack.org/58985411:43
*** gtema has quit IRC11:46
openstackgerritMatthieu Huin proposed openstack-infra/zuul master: Add request reference when hitting a node failure  https://review.openstack.org/58985611:59
*** panda|rover is now known as panda|ruck12:25
*** jpena|lunch is now known as jpena12:35
*** gtema has joined #zuul13:13
openstackgerritMatthieu Huin proposed openstack-infra/zuul master: web: add tenant-scoped, JWT-protected actions  https://review.openstack.org/57690713:36
*** gtema has quit IRC13:36
*** Shrews has quit IRC14:09
*** Shrews has joined #zuul14:10
*** nchakrab has joined #zuul14:18
*** AJaeger_ is now known as AJaeger14:20
corvustristanC: thanks!14:26
*** gtema has joined #zuul14:26
*** nchakrab has quit IRC14:28
AJaegerany other zuul cores to review tristanC's change  https://review.openstack.org/589836 , please? We need this for all periodic jobs, especially for translation import14:34
tobiashlgtm14:42
AJaegerthanks!14:43
corvusgundalow: mordred's irc documentation of the zuul vars was great, of course, but in case you're interested, we also have a version with more words: https://zuul-ci.org/docs/zuul/user/jobs.html#zuul-variables  :)14:48
gundalowcorvus: Ace, thanks14:49
darkwisebearcorvus: I've seen some surprising behavior if one uses reject clauses with Gerrit: If a reject clause is set, the change is ignored as long as no approval at all is there. If you then set some unrealted approval, the clause works as expected. Is there a reason for this behavior? See https://review.openstack.org/589762 for an example.14:50
corvusgundalow: since you asked about the commit -- you may also be interested in this bit: https://zuul-ci.org/docs/zuul/user/jobs.html#git-repositories14:54
corvusgundalow: aspecially the bit about the "origin" remote14:54
gundalowcorvus: Oh, yup, thanks :)14:57
corvusdarkwisebear: good question.  i don't think we currently have any reject clauses in openstack, so that may explain why i haven't noticed the edge case.  i'll think about that.14:58
corvusdarkwisebear: my first reaction is to agree with you that that is surprising and probably a bug.  but i'll think about it some more.  :)14:59
darkwisebearcorvus: Alright, just comment on the change if you're positive about changing the behavior to the suggested one and I'll add the impl change15:00
openstackgerritMerged openstack-infra/zuul master: timer: do not skip projects using pipeline from template  https://review.openstack.org/58983615:07
*** darkwisebear has quit IRC15:11
*** darkwisebear has joined #zuul15:15
*** pcaruana has quit IRC15:34
*** darkwisebear has quit IRC15:36
*** jlvillal is now known as jlv-sick15:40
openstackgerritJames E. Blair proposed openstack-infra/zuul master: WIP: cache branches in connections/sources  https://review.openstack.org/58997517:26
corvustobiash: can you take a look at that ^ and let me know if you see any problems with the approach?17:27
corvustobiash: in short, we shouldn't cache branches in the tenant, since branches are global (so a system with the same project in a lot of tenants shouldn't need to query the branch list for every tenant).  but we can't store the cache in the abide, because exclude_unprotected_branches is a tenant configuration, so the abide can't know what to do with that.  the only place i can find that has all the right17:30
corvusinformation is the source object (and its friend, the connection).  so that puts the cache at that level.17:30
corvusclarkb: ^ you may also be interested.  or you may be fishing.  i guess those aren't exclusive though.17:32
*** electrofelix has quit IRC17:44
tobiashcorvus: cool, just took a short look and the approach looks like the same approach I had in mind17:45
tobiashcorvus: just curious, why did you choose two caches over one cache with attached protection info?17:46
tobiashcorvus: as an improvement I think we should check and update the branch protection if we get a pull request event for a branch that is unprotected in the cache. That would work around the missing branch protection event from github.17:48
tobiashand if that changes the protection we would need to emit a branch created event to trigger a tenant reconfig17:48
tobiashbut this is something for a followup17:48
tobiashcorvus: I will be out of office for three weeks starting on monday17:49
corvustobiash: different tenants might have different values for exclude_unprotected.  if we have a single cache with protection info, and it contains a project which only has protected branches, and we get a request to *include* unprotected branches, how do we know if the cache has the values, or whether we only previously received requests for *exclude* unprotected?17:50
corvustobiash: if we always queries for all branches, then we would know we had all the data and it would be okay17:50
corvustobiash: but i was assuming that we also wanted to optimize for the case where all of the tenants with a project only have exclude_unprotected set (and therefore don't need to query, say, 4000 open pull request branches or something)17:51
tobiashcorvus: I meant the other option is to filter within getprojectbranches. I think both options are fine and the two caches method avoids some list copying in getprojectbranches17:52
corvustobiash: right, but filtering within getprojectbranches only works if the query to github is to include all branches17:53
corvustobiash: so if we want to keep the optimization that if we only ever ask github for protected branches if that's what we want, then i think we need something like this17:53
tobiashcorvus: ah right, I missed that17:53
corvustobiash: if that's not important, and it would be okay to ask github for all branches, i agree, that would be the better approach17:54
tobiashso with a single cache we would need to query all branches and then query the branch protection for each branch17:54
tobiashso indeed the two cache method has a huge advantage there17:55
tobiashcorvus: what do you think about the branch checking on pull request for unprotected branch?17:55
tobiashcorvus: that could give us the possibility to automatically pick up new protected branches in I think at least most relevant use cases17:56
corvustobiash: yeah, sounds promising17:56
tobiashright now we need to do a full reconfiguration to pick up new protected branches17:56
*** jpena is now known as jpena|off18:07
tobiashcorvus: I noticed that nodepool gets slower if there are many nodes and I think I found one use of zk.nodeIterator which is on the critical path for every node: http://git.zuul-ci.org/cgit/nodepool/tree/nodepool/driver/openstack/provider.py#n15018:19
tobiashthat iterates over all nodes and I think basically has a cost of one network rtt per registered node18:19
tobiashcorvus: I think with some care we could replace that with an atomic counter that gets increases/decreased on node creation deletion18:21
tobiashhttps://kazoo.readthedocs.io/en/latest/api/recipe/counter.html18:21
corvustobiash: or we could use zk callbacks to mirror znodes to in-memory objects18:21
tobiashor that18:22
corvustobiash: you're thinking a counter for each resource?18:22
tobiashfor each node type18:23
tobiashbut I think the callback method is better18:23
tobiashwith the callback method we could eliminate the second full iteration on the critical path too: http://git.zuul-ci.org/cgit/nodepool/tree/nodepool/driver/__init__.py#n41618:24
corvustobiash: yeah, the callback has other advantages (it makes improvements like this more generally available)18:24
tobiashcorvus: I think we need that as this limits scalability of nodepool. Maybe some topic for after my vacation.18:25
Shrewsbut makes handling session disconnects more complex, or more important rather18:25
tobiashShrews: yes so we would need to handle the session events and refresh everything on reconnect18:26
tobiashor maybe just invalidate the in memory cache18:27
tobiashon disconnects18:27
Shrewsyou'd also have to re-register the callbacks18:28
tobiashdo we also loose callbacks if reconnect was successful without loosing the session?18:28
Shrewsi don't think so18:28
Shrewsa lot like locks, iirc18:29
corvusyeah, it's definitely a different approach, but i think we grok zk enough to look into it now :)18:30
tobiashI think we need connection awareness anyway: https://kazoo.readthedocs.io/en/latest/basic_usage.html#understanding-kazoo-states18:30
tobiash> When a connection transitions to SUSPENDED, if the client is performing an action that requires agreement with other systems (using the Lock recipe for example), it should pause what it’s doing.18:30
Shrewstobiash: that's why i have all those "sleep-while-suspended" loops18:32
Shrewsother places, we just handle any resulting errors (like lost locks) as gracefully as possible18:32
tobiashah ok18:35
tobiashlooks like kazoo already has a ready recipe for caching a tree: https://kazoo.readthedocs.io/en/latest/api/recipe/cache.html18:41
tobiashso we probably should not re-implement that outselfs :)18:41
corvusi love the recipes :)18:45
openstackgerritJames E. Blair proposed openstack-infra/zuul master: WIP: cache branches in connections/sources  https://review.openstack.org/58997520:14
*** pcaruana has joined #zuul21:07
*** pcaruana has quit IRC22:02
*** adam_g has quit IRC23:02
*** mhu has quit IRC23:02
openstackgerritIan Wienand proposed openstack-infra/zuul-jobs master: [WIP] kerberos & afs client roles  https://review.openstack.org/58933423:31
openstackgerritIan Wienand proposed openstack-infra/zuul-jobs master: [WIP] kerberos & afs client roles  https://review.openstack.org/58933423:36
openstackgerritIan Wienand proposed openstack-infra/zuul-jobs master: [WIP] kerberos & afs client roles  https://review.openstack.org/58933423:42
openstackgerritIan Wienand proposed openstack-infra/zuul-jobs master: [WIP] kerberos & afs client roles  https://review.openstack.org/58933423:47

Generated by irclog2html.py 2.15.3 by Marius Gedminas - find it at mg.pov.lt!