Monday, 2018-12-03

openstackgerritTristan Cacqueray proposed openstack-infra/zuul-jobs master: Add install and deploy openshift roles.  https://review.openstack.org/60861000:40
openstackgerritTristan Cacqueray proposed openstack-infra/zuul-jobs master: Add install and deploy openshift roles.  https://review.openstack.org/60861001:16
openstackgerritTristan Cacqueray proposed openstack-infra/zuul-jobs master: Add install and deploy openshift roles.  https://review.openstack.org/60861001:50
*** bhavikdbavishi has joined #zuul03:14
*** threestrands has joined #zuul05:21
*** threestrands has quit IRC05:21
openstackgerritTobias Henkel proposed openstack-infra/zuul master: WIP: Add spec for scale out scheduler  https://review.openstack.org/62147906:23
openstackgerritTobias Henkel proposed openstack-infra/zuul master: WIP: Add spec for scale out scheduler  https://review.openstack.org/62147906:24
openstackgerritSurya Prakash (spsurya) proposed openstack-infra/zuul master: dict_object.keys() is not required for *in* operator  https://review.openstack.org/62148206:35
*** quiquell|off is now known as quiquell07:10
*** pcaruana has joined #zuul07:25
*** quiquell is now known as quiquell|brb07:40
*** bjackman has joined #zuul07:56
bjackmanJust realised I didn't get a reviewer auto-assigned to my Zuul change, should I request one?07:59
bjackmanI thought tristanC was auto-assigned to my last one but maybe I misunderstood07:59
tristanCbjackman: reviewer are not auto-assigned in review.openstack.org08:00
bjackmantristanC: OK thanks08:00
tristanCbjackman: feel free to assign me, or ask for review here using the change url08:01
tristanCask here*08:01
bjackmantristanC: Cheers, I have assigned you08:02
*** gtema has joined #zuul08:07
tristanCbjackman: thank you for fixing gerrit-2.16 support :)08:09
bjackmantristanC: No worries :)08:13
*** quiquell|brb is now known as quiquell08:18
*** jpena|off is now known as jpena08:28
*** themroc has joined #zuul08:50
*** dkehn has quit IRC09:29
*** sshnaidm|off is now known as sshnaidm09:43
bjackmanWhat does the promote operation do?10:13
*** electrofelix has joined #zuul10:18
*** electrofelix has quit IRC10:22
*** bhavikdbavishi has quit IRC10:23
*** electrofelix has joined #zuul10:31
*** bjackman has quit IRC10:35
*** bjackman_ has joined #zuul10:35
*** bjackman_ is now known as bjackman10:35
*** panda|pto is now known as panda10:47
*** gtema has quit IRC11:02
*** sshnaidm has quit IRC11:16
*** sshnaidm has joined #zuul11:16
*** sshnaidm has quit IRC11:18
*** rfolco has joined #zuul11:18
*** sshnaidm has joined #zuul11:19
*** quiquell is now known as quiquell|brb11:21
openstackgerritTristan Cacqueray proposed openstack-infra/zuul-jobs master: Add install and deploy openshift roles.  https://review.openstack.org/60861011:44
*** quiquell|brb is now known as quiquell11:45
*** electrofelix has quit IRC11:58
*** electrofelix has joined #zuul12:03
*** njohnston has joined #zuul12:06
*** njohnston has quit IRC12:10
*** njohnston has joined #zuul12:10
openstackgerritTristan Cacqueray proposed openstack-infra/nodepool master: Implement an OpenShift resource provider  https://review.openstack.org/57066712:13
*** jpena is now known as jpena|lunch12:34
*** rlandy has joined #zuul12:54
*** bjackman has quit IRC12:55
*** jpena|lunch is now known as jpena13:26
*** dkehn has joined #zuul13:44
*** quiquell is now known as quiquell|lunch14:01
*** smyers has quit IRC14:19
*** smyers has joined #zuul14:21
*** gtema has joined #zuul14:34
*** quiquell|lunch is now known as quiquell14:40
quiquellAJaeger_, pabelanger: I think openstack/pbrx is missing configparser as requirement.txt14:41
*** gtema has quit IRC14:45
mordredquiquell: yeah - I think you're right (at least for python2) - if you install it under python3 is should be fine ... but we should add that for sure14:51
mordredquiquell: you want to send a patch or want me to?14:51
quiquellmordred: do we have to support python2 '14:52
quiquellmordred: what version of configparser do we need to pin to ?14:52
mordredquiquell: I don't think we need to pin it - but we should mark it with ;python_version=='2.7' so it only installs for 2.714:53
mordredquiquell: and yes - for now - there is another utility in pbrx that wants to be used under 2.7 by some people - I think we should likely split that out and make pbrx into two separate tools14:54
mordredbecause I don't actually find python2 support for build-images to be useful :)14:54
pabelangeragree, was just going to ask why python2 for image builds at all. But, maybe because of centos-714:58
quiquellmordred: So maybe is better to split things, and not add configparser dep14:58
mordredquiquell: yeah. I'll work on that today ... I think the multiple command thing is less useful than it should be15:00
mordredpabelanger: indeed ... although I think maybe for now, since pbrx is pretty new and not used in many places, not supporting centos-7 is maybe not the worst thing?15:02
mordredespecially with 8 right around the corner15:02
pabelangerYup, I'd agree. Would love to only support python3 on rhel-8 / centos-815:03
*** themroc has quit IRC15:32
*** hughsaunders has joined #zuul15:34
corvushughsanders: you were asking about how nodepool requests are distributed in #openstack-infra...15:34
hughsaunderscorvus: hey15:34
hughsaundersyep15:34
corvushughsaunders: your summary is pretty accurate -- there's almost no communication between the nodepool launchers15:35
corvus(they know which other launchers are online, but otherwise, they know nothing about any of the others)15:35
corvuslemme dig up a link15:35
hughsaundersok thanks15:35
corvushughsaunders: the algorithm is still basically what's described here (from the original zuulv3 spec): http://specs.openstack.org/openstack-infra/infra-specs/specs/zuulv3.html15:36
corvushughsaunders: (search for "A simple algorithm")15:37
corvushughsaunders: the original design goals there were simplicity, reliability, and fault tolerance15:37
corvushughsaunders: i think we'd all love to improve the situation to make it smarter (so that quota and capacity across different providers is taken into account)15:38
corvushughsaunders: i think the trick is that any changes need to take into consideration the behavior of the existing algorithm and ensure that we don't create any new edge cases where something can get wedged, or lose fault tolerance.15:39
corvushughsaunders: or, we could create an entirely new algorithm15:39
corvushughsaunders: either will be acceptable -- the main thing is that the current algorithm doesn't really have a lot of facilities for changes like that, and any changes need to be made with great care15:40
hughsaunderscorvus: My initial thought was cause each provider to pause for a few seconds if they can't satisfy a request from ready nodes, or immediately lock it if they can. This gives other providers time to lock the request if they have ready capacity. After the timout, any waiting thread tries to lock the request.15:40
hughsaundersNot pretty, but it is simple :/15:41
hughsaundersOther thoughts included some kind of auction where providers bit for a request depending on the number of nodes from the request they can fulfil from ready capacity. That would be neat but makes the algorithm much more complex.15:41
hughsaunders*bid15:41
*** themroc has joined #zuul15:44
corvushughsaunders: i think the timeout approach would work, but may be somewhat fragile -- in other situations we're dealing with nodepool taking many minutes to process the full request list15:45
corvushughsaunders: so i think an approach where launchers can communicate more about themselves might be better... though also....15:45
corvushughsaunders: i think clarkb was suggesting (for other reasons) that we should have a two-phase system where node requests from zuul are processed in one phase and then any still-needed nodes are put onto a queue individually, so that node creation is less-directly tied to node requests.  we may be able to incorporate your case into that too, by making sure that the initial request processor can just return15:48
corvusready nodes regardless of the launcher which supplied them.15:48
tobiashcorvus: I hope it was ok that I fixed your fixes to zuul (I think they landed already)15:49
corvushughsaunders: the bid idea would also work -- it's actually not too dissimilar from the current algorithm; i think the downside there is that it would essentially run the algorithm twice for each request (every launcher reports on whether it can fulfill requests during the ready phase, and then again afterwords (assuming no ready nodes))15:50
corvustobiash: yes, thanks!  were there any significant errors i should look at, or pep8 stuff?15:51
tobiashcorvus: just minor logic thing15:52
hughsaunderscorvus: It could slow things down for the min-ready:0 case, but I would have thought most users of nodepool are interested in min-ready>0.15:52
tobiashcorvus: https://review.openstack.org/#/c/621319/3/zuul/manager/__init__.py that's what I fixed15:52
pabelangerhughsaunders: for ansible-network nodepool, we've stopped using min-ready nodes, mostly for the behavior you are talking about. We default to min-ready:0 and which ends up tacking a few more seconds on job run. This is also becase we pay $$$ for each node online also.15:53
tobiashthe filtered list didn't necessarily contain the item15:53
corvushughsaunders: yes, though for example, openstack almost never benefits from min-ready, because we are almost never idle enough to be able to build min-ready nodes.  so taking that as an example, a busy system would spend longer running the algorithm twice, so it's sort of opposite-scaling.15:53
tobiashcorvus: so it needed a search for it and return the index or the list length as a fallback15:53
hughsaunderscorvus: I also thought about removing this check to see what happens, but I guess it would screw up accounting.. https://github.com/openstack-infra/nodepool/blob/master/nodepool/driver/__init__.py#L42715:54
*** lennyb_ has quit IRC15:55
*** jhesketh has quit IRC15:55
corvustobiash: in what case?15:55
tobiashin case the item is not yet enqueued15:55
corvustobiash: ah, we do call that before enqueing don't we.  what about dependent.py?15:56
*** jhesketh has joined #zuul15:57
tobiashthe dependent seemed to work15:57
corvustobiash: shouldn't it have the same problem?15:57
corvustobiash: (getNodePriority is overidden in dependent.py15:57
*** lennyb has joined #zuul15:57
tobiashit has its own implementation of getNodePriority does it?15:57
*** quiquell is now known as quiquell|off15:58
tobiashcorvus: hrm the dependent implementation should throw an error in this case too, so either I lied or that is not happening in gate or is not tested in gate16:00
corvustobiash: maybe the case was when the item wasn't live?16:01
corvus(which never happens in dependent)16:02
tobiashthat could be16:02
corvustobiash: yeah, i don't think getNodePriority is called before enqueing16:02
corvustobiash: and the tests only failed after the change to filter out non-live items16:03
tobiashcorvus: makes sense16:04
corvusof course -- why is this being called at all for non-live items?16:04
tobiashcorvus: I think I'll re-analyze this later16:04
tobiashthat's an interesting question16:04
corvusah, i think it's called unecessarily inside of processOneItem, but it won't be used16:05
tobiashah yes, it's called before we know that there is no node request16:06
corvusi'm going to double check that was the error reported, and if so, i think i might adjust the fix a bit16:07
tobiashgreat16:12
*** themroc has quit IRC16:21
openstackgerritJames E. Blair proposed openstack-infra/zuul master: Don't calculate priority of non-live items  https://review.openstack.org/62162616:35
corvustobiash: how about that? ^16:35
tobiashcorvus: I had exactly the same in mind16:39
mordredtobiash, corvus: I just added the second +2 to that - any reason I should not go ahead and +A?16:40
corvusmordred: nope, if it passes gate it's good :)16:40
tobiash++16:41
clarkbcorvus: are there other bug fixes on relative priority that need review? or are we good to make another go at it once 621626 is in?16:54
corvusclarkb: afaik gtg, and we could do it before 626, it's just a slight inefficiency16:54
*** gtema has joined #zuul16:58
openstackgerritDavid Shrewsbury proposed openstack-infra/nodepool master: Extract out common config parsing for ConfigPool  https://review.openstack.org/62164217:18
*** manjeets has joined #zuul17:19
Shrewscorvus: tobiash: tristanC: proposed change to how we deal with driver configs ^^^17:20
*** gtema has quit IRC17:31
SpamapShit a weird problem today with our Zuul17:36
SpamapSA developer proposed a PR from origin/foo -> origin/master, and then realized they shouldn't do PR's from origin, deleted origin/foo, re-proposed as them/foo -> origin/master, but the sha's were the same, and zuul seemed to get confused and marked the post job as RETRY_LIMIT because of a crash17:38
SpamapShttp://paste.openstack.org/show/736584/ <-- the crash17:38
tobiashSpamapS: you mean a *branch* named 'origin/foo'?17:40
tobiashSpamapS: we had something similar: https://review.openstack.org/#/c/61924517:42
SpamapSno, the branch was named 'foo'17:43
SpamapSI'm just giving remote names as symbolic "the main repo"17:43
SpamapSAlso I think we need better docs (or I need to be shown them) on how to use zuul-enqueue-ref because it never does *anything* for me.17:44
mordredSpamapS: was the branch actually named "feat/charity" ?17:45
mordredSpamapS: also - nice edge case your developer found :)17:46
clarkbzuul would've treated origin/foo PR source as merged and load config from that directly? then the new branch on then/foo would be unmerged17:47
clarkbI'm guessing its that behavior in particular that has confused zuul?17:47
mordredclarkb: the traceback looks more like zuul merger got confused by the branch going away17:47
clarkbmordred: ya but only because it treats those branches as special I think?17:48
pabelangerYah, we had issue in ansible-network when we deleted an origin branch, zuul didn't respond well and we had to purge the mergers17:48
SpamapSmordred: yes, it was named feat/charity17:48
SpamapSI also am now working to turn on the "only look at protected branches" flag17:49
SpamapSwhich I should have turned on long ago17:49
mordredSpamapS: cool. just making sure I was grokking the traceback properly mapping it to your thing17:49
clarkbon the gerrit side we handle this by taking action on the ref updated new sha1 0*40 event17:49
clarkbiirc17:49
pabelangerSpamapS: +117:49
clarkbdoes github send a similar event we can take action on when branches are deleted?17:49
pabelangerclarkb: yah, I believe so17:50
pabelangerhttps://developer.github.com/v3/activity/events/types/#deleteevent17:50
clarkbya reading the merger code is specifically keys off of '0'*40 to know when to delete the upstream branch locally in _alterRepoState17:52
clarkbso we either need to have github driver set newrev to '0'*40 on those events, or pass that event through more directly and take the same action17:52
clarkbSpamapS: do you have access to the webhook event that fired for that delete? reading pabelanger's doc link it seems that 'ref' is set to the ref name not the sha1. So I wonder if the assumptions in the github driver around EMPTY_GIT_REF are never hit17:55
clarkbyup, github connection sets event.newrev to body.get('after'). Reading the docs pabelanger linked there is no 'after' key in the body for the delete event. The rest of the code does seem to do the right thing if newrev is set to '0'*40 though17:58
openstackgerritDavid Shrewsbury proposed openstack-infra/nodepool master: Extract out common config parsing for ConfigPool  https://review.openstack.org/62164217:59
clarkboh and we only handle that in the push event which is weird. I don't know enough about the api to know if that will fire on deletes. Maybe if you delete via the empty push mechanism?18:00
SpamapSclarkb: yeah I'll peek18:00
clarkbtobiash: jlk ^18:00
clarkbI think the fix here is to add a handler for the delete event push. Then create a translated internal zuul event that sets newrev to '0'*40. Zuul should handle that in the merger properly18:02
tobiashI thought we have that already18:03
clarkbtobiash: _event_push handles it if it shows up as a push18:04
clarkbbut I don't see an _event_delete18:04
SpamapSHrm, I don't see any hooks for the branch delete18:04
SpamapSclarkb: apparently the default app setup doesn't have us subscribed to branch/tag delete, only create18:06
SpamapSso that's one thing to consider changing18:06
openstackgerritMerged openstack-infra/zuul master: Don't calculate priority of non-live items  https://review.openstack.org/62162618:07
tobiashSpamapS: I think you ran into a race18:10
tobiashNeed to switch to laptop to better explain18:10
openstackgerritClark Boylan proposed openstack-infra/zuul master: Handle github delete events  https://review.openstack.org/62166518:10
clarkbtobiash: do we not need something like ^?18:11
SpamapStobiash: agreed18:11
clarkbI guess if deletevent and pushevent always happen together then pushevent is sufficient18:11
SpamapSI think there's another race that tobiash may be getting at18:13
SpamapSthe merge probably shouldn't checkout branch names18:13
SpamapSit should probably checkout with a ref18:14
tobiashclarkb: it's not about delete events, they don't have anything to do with mergers18:14
clarkbtobiash: they do. _alterRepoState() in the merger uses those events to claen up branches that were deleted upstream of the merger18:15
clarkbwhat should happen is that github sends the delete event when the branch is deleted. This causes _alterRepoState to remove that branch from the local repo18:16
clarkbthen later when the new branch with same sha1 is pushed the merger should fetch it and be happy because of the earlier reconciliation18:16
tobiashlet me check18:16
*** jpena is now known as jpena|off18:17
tobiashclarkb: I don't see a connection of _alterRepoState to any event18:19
clarkbtobiash: it is called by getRepoState18:19
tobiashclarkb: I still don't get the relation to an event18:20
clarkbhrm ya its called on the tail end of merging things18:21
clarkbwhich actualyl seems right18:21
clarkbseems like what happens is if we have a chagne to merge we merge the change. If its a repo update type event then we run getRepoState18:21
clarkbthis is in scheduleMerge in the pipeline manager18:21
tobiashSpamapS, clarkb: so the race I have in mind works like this: have branch x, push branch y, merger merges and adds x and y into repostate, delete branch x, job now starts, takes repo state tries to restore x and y and fails during restoring x18:22
tobiashSpamapS, clarkb: we had these things with tags and I have a hacky patch in our zuul since august to mitigate that but hadn't time to push up a real fix for this18:23
openstackgerritTobias Henkel proposed openstack-infra/zuul master: WIP: Fix broken setRefs whith missing objects  https://review.openstack.org/62166718:24
tobiashclarkb, SpamapS: this is my hacky fox for this we have in our zuul ^18:25
tobiashthis is actually my only hacky fix that is not upstream yet ;)18:25
*** electrofelix has quit IRC18:31
SpamapStobiash: yeah that seems like what happened18:37
tobiashSpamapS: we had the same but with tags (someone deleted a tag) and from this point some mergers had that tag and some executors didn't and everything was broken because tags are always in the repo state18:39
SpamapSTags are just refs of a different type so it makes sense.18:39
clarkbtobiash: reading through the scheduler and pipeline manager I think my idea is mostly correct. githubconnection.getChange should create a Ref() change object for that event. That will then get processed by the queue processing done on the pipelines. This will then trigger the mergers to clean up the deleted branch via alterRepoState18:40
clarkbsome of the details may need fixing to get stuff mapped properly, but that seems to be how the gerrit side handles this18:41
tobiashclarkb: the repostate is metadata that is attached to a queue item, which is carried through to the executor which will reproduce the same thing as the first merger18:43
clarkboh I see repo_state there isn't mapped onto disk18:44
clarkbso we probably need to concile in multiple places18:44
tobiashclarkb: when getting a merge command a merger updates its remote refs, performs the merge and creates a clean repostate data structure from that. That is carried through to all jobs of that change so the mergers that create the workspaces can reproduce the merges deterministically18:44
tobiashthis repostate contains all branches of the repo, in github you often have branches that get created and deleted often18:46
tobiashthat's the reason you don't typically see this in gerrit but in github as it's common to work on short lived feature branches and delete them after the pr merges18:46
clarkbright, is that repostate valid after a branch delete?18:46
clarkbI don't see where we would currently clean it up beacuse it relies on a push of sha1 0*40 to do so18:46
tobiashwe don't need to clean it up18:47
tobiashthe first merge comes without a repo state and takes the current remote refs at that time18:47
tobiashthat is perfectly fine18:47
clarkbI see so it will start fresh and see the current valid list18:47
tobiashthe only problem is the race between creating that repo state and using it when in the middle there were upstream deletions18:48
tobiashmy hacky fix was to just ignore the now non-existing stuff18:48
clarkbwould my fix, which will update repo_state after such a deletion also fix it?18:49
clarkbor is there still a race between that reconciliation and using it later18:49
tobiashthat wouldn't change anything18:49
clarkblooking at _mergeItem we reset the repo (whcih clean up stale refs on disk) then we restoreRepoState in that case wouldn't we either remove the stale ref and be fine or the stale ref would still be on disk and things would work until the next reset?18:52
tobiashthe only thing I can think of is really to ignore non-existing stuff from the repostate. In almost all cases this will be something unused and if not, a job trying to use a non-existing ref would fail anyway18:52
clarkbif the order was reversed I would understand the race you describe. But we set an on disk state then introspect that so it should be consistent?18:52
openstackgerritJames E. Blair proposed openstack-infra/nodepool master: Make launcher debug slightly less chatty  https://review.openstack.org/62167518:53
clarkbeven save repo state ignores the remote state and uses the on disk state18:53
tobiashclarkb: but the merger directly before did an update18:54
clarkbtobiash: shouldn't that be ok? the mergers are prcessing repos serially. We reset the repo as the first step which will either say the ref is still valid or clean it up. After that is when we set repostate and it should be consistent with that reset? Is the problem we reset on subsequent merger actions but don't update the repostate?18:55
clarkbreset (no delete). save repo state (no delete). then later reset again (delete). Don't resave repostate use preexisting?18:56
tobiashclarkb: yes, thats correct, but later we use the repo state on a different merger/executor potentially hours later in order to re-do the exactly same merge18:56
clarkbgot it18:57
tobiashthat hour is the time you're usually waiting for a node ;)18:57
tobiashand during that anything can happen to remote branches (which is common in the github workflow)18:57
clarkbcan we reprune the repo state after subsequent resets?18:58
tobiashso when re-doing the merge, it also performs a repo reset, restores the repo state, merges the change18:58
clarkbI guess those subsequent resets happen external to that event so lining things up may be painful18:58
tobiashyes, I think the only efficient way is to just ignore things that are missing. If the ref that we are trying to merge is missing during repo state restore the merge will fail anyway19:00
tobiashthat process is completely disconnected to any event from the driver, these are just used to modify the job configs, not to modify inflight changes19:01
openstackgerritDavid Shrewsbury proposed openstack-infra/nodepool master: Set pool for error'ed instances  https://review.openstack.org/62168119:32
*** AJaeger_ is now known as AJaeger19:43
*** manjeets_ has joined #zuul20:17
*** manjeets has quit IRC20:18
SpamapSI'm building a slack notifier role. Does anyone know if there is a standard way, in a job, to get the URL to the Zuul status/builds/etc. API?20:19
clarkbSpamapS: infra's zuul jobs set it in a zuul_return iirc20:20
clarkbthen that is used across the builds20:20
clarkbhttps://git.openstack.org/cgit/openstack-infra/zuul-jobs/tree/roles/set-zuul-log-path-fact/tasks/main.yaml consumed by https://git.openstack.org/cgit/openstack-infra/zuul-jobs/tree/roles/emit-job-header/tasks/main.yaml#n20 then set as a return later iirc20:21
clarkband I think zuul_log_url is a site var?20:22
SpamapSThat's for logs20:23
SpamapSI want the API20:23
SpamapSI think a site var is fine20:23
SpamapSI'll just document that in the role.20:23
SpamapS"Set this site var"20:23
SpamapSmaybe we can make a convention for it20:23
clarkbya its for logs, but its a similar idea "here is where the other part of the sytem you care about is located"20:24
*** manjeets_ is now known as manjeets21:20
corvusSpamapS: status_url is set in the web configuration: https://zuul-ci.org/docs/zuul/admin/components.html#attr-web.status_url21:29
*** techraving has joined #zuul21:40
SpamapScorvus: is there any way to get at that in a post job?21:49
corvusSpamapS: oh, you said role.  i thought you were writing a driver.21:52
corvusSpamapS: i don't think so.  but i think we should expose it.  i think we should expose both the change-specific status page and the buildset page in zuul vars.21:54
corvusi'm not sure how close to completion those are.21:55
SpamapSmmmm yes that would be amazing. :)22:13
SpamapSWell in this case, I want to build the various URLs for a slack message.22:13
SpamapSAnd actually, I think I may want to chase that "cleanup job" idea soon.22:13
SpamapSSo the slack message can be for the buildset and not all the jobs.22:13
SpamapS(I guess I can make one job that depends on all the others.. but feels like we can just model that in python a lot easier than yaml. :)22:14
SpamapSI also just found a race in the EC2 driver that has been leaking nodes and fixed it so yay for that.22:15
* SpamapS still can't quite get the unit tests to pass reliably22:15
*** pcaruana has quit IRC22:18
SpamapSSo... FYI, for anyone doing monorepos (maybe I should email list this) ... zuul with monorepo works fine. However, you will want to be pretty aggressive about using files matchers. So.. many... jobs..22:37
corvusSpamapS: speaking of file matchers: i've been thinking that it would be useful for zuul to detect when a change modifies a given job and automatically have that job "match"22:44
SpamapScorvus: ++22:45
SpamapSI have been splitting jobs in to groups in .zuul.d for that exact purpose.22:45
corvusSpamapS: this came from openstack-infra where we are starting to use file matchers aggressively for changes to our ansible.  occasionally we make changes to those jobs, and right now, if you touch .zuul.yaml, *all the jobs run*.  this would let us omit .zuul.yaml from files matchers, and still have the (relevant) jobs run22:45
corvusSpamapS: oh yeah, that's smart, why didn't i think of that.  :)22:45
SpamapSand then adding files: '^.zuul.d/group-jobs.yaml$'22:46
corvusSpamapS: so yeah, sounds like we've both seen the same problem and that would help22:46
SpamapSDefinitely22:46
SpamapSAnd it shouldn't be hard to do I think.22:46
corvusnope, i'm pretty sure all the info is in memory22:46
corvusjust need to connect some dots22:47
*** irclogbot_3 has quit IRC22:47
SpamapSYeah, I was thinking about something similar when writing a sandbox usage of a zuul-roles job too.22:48
SpamapS(more for the case of testing jobs in real repos automatically, but similarly I was diving around the model seeing that most of the info is already there in the config and triggers)22:49
SpamapSwhile we're spraying ideas around.. I think I want to write a role that lets me find common sha's with another branch and, consequently, dig out the log url for jobs that ran against the sha, so I can grab docker containers from that sha and not rebuild them (so I can have a promotion workflow). I feel like there was some other stuff going on with artifacts though.22:51
clarkbSpamapS: I think people are using zuul_return to pass that info along? Though I guess that is within the context of a single pipeline22:52
clarkbnot between pipelines22:52
corvusSpamapS: yeah, the artifact url storage work i'm doing stores artifact urls along with a build record.  so my idea is to then, in a later pipeline, query the api to find the build and artifact urls, and use them.22:53
corvusSpamapS: you should be able to query by "patchset" (in the github case) and get a build22:54
corvusSpamapS: so once the new stuff lands, you may have what you need22:54
SpamapScorvus: yeah that's perfect.22:55
corvusSpamapS: (in the gerrit case, i'm imagining a "promote" pipeline which runs on change-merged events, and uses the change-merged event info to query the api to find the builds+artifacts)22:55
corvusthe same should work for github too (in the pr-closed case)22:55
corvusSpamapS: looks like it's ready to merge: https://review.openstack.org/62042722:56
corvusi mean, ready for review.  don't mean to be presumptuous.  :)22:56
SpamapSYeah what I have is merge commits in my promotion branch (called 'prod') that refer to commits that were already built and tested in master. In those cases the containers are already pushed and tested, I just have to change a single field in a k8s object to make them "live". So I want the post job in the 'prod' branch to just find the exact image URL from that previous run and make it so.22:57
SpamapSWe do the --no-ff so we have metadata about when things were merged to 'prod'22:57
SpamapSoh sweet I'll review post haste22:57
SpamapSRight now, btw, I can totally fake this. I tag the containers with the newrev in post, so I can just look at the merge commit's children, and regenerate the tag. But I am not sure that will work for everything.22:59
corvusSpamapS: you should be able to test out the query part of this now -- though http://zuul.openstack.org/api/builds?change=620427&patchset=1 isn't working for me and i'm not sure why (http://zuul.openstack.org/api/builds?change=620427 does work)23:01
corvushaha23:01
corvusbecause jobs never reported on ps123:01
corvushttp://zuul.openstack.org/api/builds?change=620427&patchset=2  works fine23:01
corvusand so does http://zuul.openstack.org/api/builds?patchset=2  (though, obviously it's not useful in our case)23:02
* SpamapS peeks23:05
corvuspatchset doesn't show up as an option in the web ui, but it is supported in the api23:06
SpamapShttps://zuul.gdmny.co/builds?change=11,patchset=cd60082ebb6b84a723a9a2fb2ea951b195c6add823:06
SpamapSyeah that works23:06
SpamapSCan I query a commit sha tho?23:08
*** irclogbot_3 has joined #zuul23:10
SpamapSSeems like nodepool+ec2 is ignoring my max-servers23:11
SpamapSI think GitHub suffers from a deficiency here becuase there's no "pull request merge" event, there's a push, and you have to go dig out the PR backwards from the commit. :-P23:14
corvusSpamapS: there's a closed event23:28
corvusi suspect that happens on merge but am not positive, or what the additional info to distinguish that from hitting the close button is, but i think it's worth looking into23:29
*** dkehn has quit IRC23:53
*** dkehn has joined #zuul23:58

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