Skip to content
This repository has been archived by the owner on Oct 29, 2024. It is now read-only.

No comments or links posted back, just Harbormaster marked as failed #252

Closed
altendky opened this issue Jun 3, 2018 · 6 comments
Closed

Comments

@altendky
Copy link

altendky commented Jun 3, 2018

I am trying to get a Phabricator/Jenkins docker-compose.yml going. It's a mess in various ways but 'close' to working finally. I am testing it only with commits at this point, no differentials.

I have installed the latest locally built phabricator-jenkins-plugin (0ba61e0). Phabricator is hooked to a private GitHub repo and using Herald to trigger Harbormaster to trigger Jenkins. I have a post {} for PhabricatorNotifier in my Jenkinsfile. It is setting the Harbormaster result to failed (the build is segfaulting in the image... :[) so that's proper. But, I don't see a comment or link to the Jenkins build anywhere despite having commentWithConsoleLinkOnFailure: true. I initially didn't have Arcanist installed but adding that didn't help.

Any pointers on what debugging steps I should take?

Cheers,
-kyle

Since it seems similar I'll go ahead and reference #224.

@altendky
Copy link
Author

altendky commented Jun 4, 2018

tcpdump -s 0 -vv -X 'tcp dst port 80'
root@8b4a8e6cfc38:/# tcpdump -s 0 -vv -X 'tcp dst port 80'
tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
02:25:05.367498 IP (tos 0x0, ttl 64, id 40463, offset 0, flags [DF], proto TCP (6), length 60)
    epc_jenkins_1.epc_default.57104 > 8b4a8e6cfc38.80: Flags [S], cksum 0x585f (incorrect -> 0x8349), seq 1981618847, win 29200, options [mss 1460,sackOK,TS val 97027216 ecr 0,nop,wscale 7], length 0
        0x0000:  4500 003c 9e0f 4000 4006 447c ac15 0002  E..<..@[email protected]|....
        0x0010:  ac15 0004 df10 0050 761d 1a9f 0000 0000  .......Pv.......
        0x0020:  a002 7210 585f 0000 0204 05b4 0402 080a  ..r.X_..........
        0x0030:  05c8 8490 0000 0000 0103 0307            ............
02:25:05.367610 IP (tos 0x0, ttl 64, id 40464, offset 0, flags [DF], proto TCP (6), length 52)
    epc_jenkins_1.epc_default.57104 > 8b4a8e6cfc38.80: Flags [.], cksum 0x5857 (incorrect -> 0xda47), seq 1981618848, ack 2762086894, win 229, options [nop,nop,TS val 97027216ecr 97027216], length 0
        0x0000:  4500 0034 9e10 4000 4006 4483 ac15 0002  E..4..@[email protected].....
        0x0010:  ac15 0004 df10 0050 761d 1aa0 a4a2 19ee  .......Pv.......
        0x0020:  8010 00e5 5857 0000 0101 080a 05c8 8490  ....XW..........
        0x0030:  05c8 8490                                ....
02:25:05.369394 IP (tos 0x0, ttl 64, id 40465, offset 0, flags [DF], proto TCP (6), length 716)
    epc_jenkins_1.epc_default.57104 > 8b4a8e6cfc38.80: Flags [P.], cksum 0x5aef (incorrect -> 0x2ff1), seq 0:664, ack 1, win 229, options [nop,nop,TS val 97027216 ecr 97027216], length 664: HTTP, length: 664
        POST /api/harbormaster.createartifact HTTP/1.1
        Content-Length: 395
        Content-Type: application/x-www-form-urlencoded; charset=UTF-8
        Host: phabricator.local
        Connection: Keep-Alive
        User-Agent: Apache-HttpClient/4.5.3 (Java/1.8.0_171)
        Accept-Encoding: gzip,deflate

        params=%7B%22buildTargetPHID%22%3A%22PHID-HMBT-m4sqcdiki45jecxcx2c4%22%2C%22artifactKey%22%3A%22jenkins.uri%22%2C%22artifactType%22%3A%22uri%22%2C%22artifactData%22%3A%7B%22uri%22%3A%22http%3A%2F%2F127.0.0.1%3A8080%2Fjenkins%2Fjob%2FGRIDTIED%2F68%2F%22%2C%22name%22%3A%22Jenkins%22%2C%22ui.external%22%3Atrue%7D%2C%22__conduit__%22%3A%7B%22token%22%3A%22api-fhrxkvvxso43ell77oke6julb6nt%22%7D%7D[!http]
        0x0000:  4500 02cc 9e11 4000 4006 41ea ac15 0002  E.....@[email protected].....
        0x0010:  ac15 0004 df10 0050 761d 1aa0 a4a2 19ee  .......Pv.......
        0x0020:  8018 00e5 5aef 0000 0101 080a 05c8 8490  ....Z...........
        0x0030:  05c8 8490 504f 5354 202f 6170 692f 6861  ....POST./api/ha
        0x0040:  7262 6f72 6d61 7374 6572 2e63 7265 6174  rbormaster.creat
        0x0050:  6561 7274 6966 6163 7420 4854 5450 2f31  eartifact.HTTP/1
        0x0060:  2e31 0d0a 436f 6e74 656e 742d 4c65 6e67  .1..Content-Leng
        0x0070:  7468 3a20 3339 350d 0a43 6f6e 7465 6e74  th:.395..Content
        0x0080:  2d54 7970 653a 2061 7070 6c69 6361 7469  -Type:.applicati
        0x0090:  6f6e 2f78 2d77 7777 2d66 6f72 6d2d 7572  on/x-www-form-ur
        0x00a0:  6c65 6e63 6f64 6564 3b20 6368 6172 7365  lencoded;.charse
        0x00b0:  743d 5554 462d 380d 0a48 6f73 743a 2070  t=UTF-8..Host:.p
        0x00c0:  6861 6272 6963 6174 6f72 2e6c 6f63 616c  habricator.local
        0x00d0:  0d0a 436f 6e6e 6563 7469 6f6e 3a20 4b65  ..Connection:.Ke
        0x00e0:  6570 2d41 6c69 7665 0d0a 5573 6572 2d41  ep-Alive..User-A
        0x00f0:  6765 6e74 3a20 4170 6163 6865 2d48 7474  gent:.Apache-Htt
        0x0100:  7043 6c69 656e 742f 342e 352e 3320 284a  pClient/4.5.3.(J
        0x0110:  6176 612f 312e 382e 305f 3137 3129 0d0a  ava/1.8.0_171)..
        0x0120:  4163 6365 7074 2d45 6e63 6f64 696e 673a  Accept-Encoding:
        0x0130:  2067 7a69 702c 6465 666c 6174 650d 0a0d  .gzip,deflate...
        0x0140:  0a70 6172 616d 733d 2537 4225 3232 6275  .params=%7B%22bu
        0x0150:  696c 6454 6172 6765 7450 4849 4425 3232  ildTargetPHID%22
        0x0160:  2533 4125 3232 5048 4944 2d48 4d42 542d  %3A%22PHID-HMBT-
        0x0170:  6d34 7371 6364 696b 6934 356a 6563 7863  m4sqcdiki45jecxc
        0x0180:  7832 6334 2532 3225 3243 2532 3261 7274  x2c4%22%2C%22art
        0x0190:  6966 6163 744b 6579 2532 3225 3341 2532  ifactKey%22%3A%2
        0x01a0:  326a 656e 6b69 6e73 2e75 7269 2532 3225  2jenkins.uri%22%
        0x01b0:  3243 2532 3261 7274 6966 6163 7454 7970  2C%22artifactTyp
        0x01c0:  6525 3232 2533 4125 3232 7572 6925 3232  e%22%3A%22uri%22
        0x01d0:  2532 4325 3232 6172 7469 6661 6374 4461  %2C%22artifactDa
        0x01e0:  7461 2532 3225 3341 2537 4225 3232 7572  ta%22%3A%7B%22ur
        0x01f0:  6925 3232 2533 4125 3232 6874 7470 2533  i%22%3A%22http%3
        0x0200:  4125 3246 2532 4631 3237 2e30 2e30 2e31  A%2F%2F127.0.0.1
        0x0210:  2533 4138 3038 3025 3246 6a65 6e6b 696e  %3A8080%2Fjenkin
        0x0220:  7325 3246 6a6f 6225 3246 4752 4944 5449  s%2Fjob%2FGRIDTI
        0x0230:  4544 2532 4636 3825 3246 2532 3225 3243  ED%2F68%2F%22%2C
        0x0240:  2532 326e 616d 6525 3232 2533 4125 3232  %22name%22%3A%22
        0x0250:  4a65 6e6b 696e 7325 3232 2532 4325 3232  Jenkins%22%2C%22
        0x0260:  7569 2e65 7874 6572 6e61 6c25 3232 2533  ui.external%22%3
        0x0270:  4174 7275 6525 3744 2532 4325 3232 5f5f  Atrue%7D%2C%22__
        0x0280:  636f 6e64 7569 745f 5f25 3232 2533 4125  conduit__%22%3A%
        0x0290:  3742 2532 3274 6f6b 656e 2532 3225 3341  7B%22token%22%3A
        0x02a0:  2532 3261 7069 2d66 6872 786b 7676 7873  %22api-fhrxkvvxs
        0x02b0:  6f34 3365 6c6c 3737 6f6b 6536 6a75 6c62  o43ell77oke6julb
        0x02c0:  366e 7425 3232 2537 4425 3744            6nt%22%7D%7D
02:25:05.687974 IP (tos 0x0, ttl 64, id 32429, offset 0, flags [DF], proto TCP (6), length 60)
    8b4a8e6cfc38.55534 > 169.254.169.254.80: Flags [S], cksum 0x0045 (incorrect -> 0xccae), seq 2868247117, win 29200, options [mss 1460,sackOK,TS val 97027296 ecr 0,nop,wscale 7], length 0
        0x0000:  4500 003c 7ead 4000 4006 bbf8 ac15 0004  E..<~.@.@.......
        0x0010:  a9fe a9fe d8ee 0050 aaf5 fa4d 0000 0000  .......P...M....
        0x0020:  a002 7210 0045 0000 0204 05b4 0402 080a  ..r..E..........
        0x0030:  05c8 84e0 0000 0000 0103 0307            ............
02:25:06.847478 IP (tos 0x0, ttl 64, id 40466, offset 0, flags [DF], proto TCP (6), length 52)
    epc_jenkins_1.epc_default.57104 > 8b4a8e6cfc38.80: Flags [.], cksum 0x5857 (incorrect -> 0xd09a), seq 664, ack 1058, win 245, options [nop,nop,TS val 97027586 ecr 97027586], length 0
        0x0000:  4500 0034 9e12 4000 4006 4481 ac15 0002  E..4..@[email protected].....
        0x0010:  ac15 0004 df10 0050 761d 1d38 a4a2 1e0f  .......Pv..8....
        0x0020:  8010 00f5 5857 0000 0101 080a 05c8 8602  ....XW..........
        0x0030:  05c8 8602                                ....
02:25:06.850989 IP (tos 0x0, ttl 64, id 21864, offset 0, flags [DF], proto TCP (6), length 60)
    epc_jenkins_1.epc_default.57150 > 8b4a8e6cfc38.80: Flags [S], cksum 0x585f (incorrect -> 0x54ba), seq 3929985899, win 29200, options [mss 1460,sackOK,TS val 97027587 ecr 0,nop,wscale 7], length 0
        0x0000:  4500 003c 5568 4000 4006 8d23 ac15 0002  E..<Uh@.@..#....
        0x0010:  ac15 0004 df3e 0050 ea3e d36b 0000 0000  .....>.P.>.k....
        0x0020:  a002 7210 585f 0000 0204 05b4 0402 080a  ..r.X_..........
        0x0030:  05c8 8603 0000 0000 0103 0307            ............
02:25:06.851062 IP (tos 0x0, ttl 64, id 21865, offset 0, flags [DF], proto TCP (6), length 52)
    epc_jenkins_1.epc_default.57150 > 8b4a8e6cfc38.80: Flags [.], cksum 0x5857 (incorrect -> 0x2d0c), seq 3929985900, ack 668079096, win 229, options [nop,nop,TS val 97027587 ecr 97027587], length 0
        0x0000:  4500 0034 5569 4000 4006 8d2a ac15 0002  E..4Ui@.@..*....
        0x0010:  ac15 0004 df3e 0050 ea3e d36c 27d2 13f8  .....>.P.>.l'...
        0x0020:  8010 00e5 5857 0000 0101 080a 05c8 8603  ....XW..........
        0x0030:  05c8 8603                                ....
02:25:06.853327 IP (tos 0x0, ttl 64, id 21866, offset 0, flags [DF], proto TCP (6), length 498)
    epc_jenkins_1.epc_default.57150 > 8b4a8e6cfc38.80: Flags [P.], cksum 0x5a15 (incorrect -> 0x2bbf), seq 0:446, ack 1, win 229, options [nop,nop,TS val 97027587 ecr 97027587], length 446: HTTP, length: 446
        POST /api/harbormaster.sendmessage HTTP/1.1
        Content-Length: 180
        Content-Type: application/x-www-form-urlencoded; charset=UTF-8
        Host: phabricator.local
        Connection: Keep-Alive
        User-Agent: Apache-HttpClient/4.5.3 (Java/1.8.0_171)
        Accept-Encoding: gzip,deflate

        params=%7B%22type%22%3A%22fail%22%2C%22buildTargetPHID%22%3A%22PHID-HMBT-m4sqcdiki45jecxcx2c4%22%2C%22__conduit__%22%3A%7B%22token%22%3A%22api-fhrxkvvxso43ell77oke6julb6nt%22%7D%7D[!http]
        0x0000:  4500 01f2 556a 4000 4006 8b6b ac15 0002  E...Uj@[email protected]....
        0x0010:  ac15 0004 df3e 0050 ea3e d36c 27d2 13f8  .....>.P.>.l'...
        0x0020:  8018 00e5 5a15 0000 0101 080a 05c8 8603  ....Z...........
        0x0030:  05c8 8603 504f 5354 202f 6170 692f 6861  ....POST./api/ha
        0x0040:  7262 6f72 6d61 7374 6572 2e73 656e 646d  rbormaster.sendm
        0x0050:  6573 7361 6765 2048 5454 502f 312e 310d  essage.HTTP/1.1.
        0x0060:  0a43 6f6e 7465 6e74 2d4c 656e 6774 683a  .Content-Length:
        0x0070:  2031 3830 0d0a 436f 6e74 656e 742d 5479  .180..Content-Ty
        0x0080:  7065 3a20 6170 706c 6963 6174 696f 6e2f  pe:.application/
        0x0090:  782d 7777 772d 666f 726d 2d75 726c 656e  x-www-form-urlen
        0x00a0:  636f 6465 643b 2063 6861 7273 6574 3d55  coded;.charset=U
        0x00b0:  5446 2d38 0d0a 486f 7374 3a20 7068 6162  TF-8..Host:.phab
        0x00c0:  7269 6361 746f 722e 6c6f 6361 6c0d 0a43  ricator.local..C
        0x00d0:  6f6e 6e65 6374 696f 6e3a 204b 6565 702d  onnection:.Keep-
        0x00e0:  416c 6976 650d 0a55 7365 722d 4167 656e  Alive..User-Agen
        0x00f0:  743a 2041 7061 6368 652d 4874 7470 436c  t:.Apache-HttpCl
        0x0100:  6965 6e74 2f34 2e35 2e33 2028 4a61 7661  ient/4.5.3.(Java
        0x0110:  2f31 2e38 2e30 5f31 3731 290d 0a41 6363  /1.8.0_171)..Acc
        0x0120:  6570 742d 456e 636f 6469 6e67 3a20 677a  ept-Encoding:.gz
        0x0130:  6970 2c64 6566 6c61 7465 0d0a 0d0a 7061  ip,deflate....pa
        0x0140:  7261 6d73 3d25 3742 2532 3274 7970 6525  rams=%7B%22type%
        0x0150:  3232 2533 4125 3232 6661 696c 2532 3225  22%3A%22fail%22%
        0x0160:  3243 2532 3262 7569 6c64 5461 7267 6574  2C%22buildTarget
        0x0170:  5048 4944 2532 3225 3341 2532 3250 4849  PHID%22%3A%22PHI
        0x0180:  442d 484d 4254 2d6d 3473 7163 6469 6b69  D-HMBT-m4sqcdiki
        0x0190:  3435 6a65 6378 6378 3263 3425 3232 2532  45jecxcx2c4%22%2
        0x01a0:  4325 3232 5f5f 636f 6e64 7569 745f 5f25  C%22__conduit__%
        0x01b0:  3232 2533 4125 3742 2532 3274 6f6b 656e  22%3A%7B%22token
        0x01c0:  2532 3225 3341 2532 3261 7069 2d66 6872  %22%3A%22api-fhr
        0x01d0:  786b 7676 7873 6f34 3365 6c6c 3737 6f6b  xkvvxso43ell77ok
        0x01e0:  6536 6a75 6c62 366e 7425 3232 2537 4425  e6julb6nt%22%7D%
        0x01f0:  3744                                     7D
02:25:06.982827 IP (tos 0x0, ttl 64, id 21867, offset 0, flags [DF], proto TCP (6), length 52)
    epc_jenkins_1.epc_default.57150 > 8b4a8e6cfc38.80: Flags [.], cksum 0x5857 (incorrect -> 0x2712), seq 446, ack 1004, win 244, options [nop,nop,TS val 97027620 ecr 97027620], length 0
        0x0000:  4500 0034 556b 4000 4006 8d28 ac15 0002  E..4Uk@.@..(....
        0x0010:  ac15 0004 df3e 0050 ea3e d52a 27d2 17e3  .....>.P.>.*'...
        0x0020:  8010 00f4 5857 0000 0101 080a 05c8 8624  ....XW.........$
        0x0030:  05c8 8624                                ...$
02:25:11.890736 IP (tos 0x0, ttl 64, id 40467, offset 0, flags [DF], proto TCP (6), length 52)
    epc_jenkins_1.epc_default.57104 > 8b4a8e6cfc38.80: Flags [.], cksum 0x5857 (incorrect -> 0xc6ca), seq 664, ack 1059, win 245, options [nop,nop,TS val 97028847 ecr 97028836], length 0
        0x0000:  4500 0034 9e13 4000 4006 4480 ac15 0002  E..4..@[email protected].....
        0x0010:  ac15 0004 df10 0050 761d 1d38 a4a2 1e10  .......Pv..8....
        0x0020:  8010 00f5 5857 0000 0101 080a 05c8 8aef  ....XW..........
        0x0030:  05c8 8ae4                                ....
02:25:12.030723 IP (tos 0x0, ttl 64, id 21868, offset 0, flags [DF], proto TCP (6), length 52)
    epc_jenkins_1.epc_default.57150 > 8b4a8e6cfc38.80: Flags [.], cksum 0x5857 (incorrect -> 0x1d40), seq 446, ack 1005, win 244, options [nop,nop,TS val 97028882 ecr 97028871], length 0
        0x0000:  4500 0034 556c 4000 4006 8d27 ac15 0002  E..4Ul@.@..'....
        0x0010:  ac15 0004 df3e 0050 ea3e d52a 27d2 17e4  .....>.P.>.*'...
        0x0020:  8010 00f4 5857 0000 0101 080a 05c8 8b12  ....XW..........
        0x0030:  05c8 8b07

Maybe I'll try to decode the data tomorrow.

@altendky
Copy link
Author

altendky commented Jun 4, 2018

Hmm, I found it. Or something at least. In the build HTTP request artifacts section there is a link to the Jenkins build page.

image
link: http://127.0.0.1:8080/jenkins/job/GRIDTIED/70/

So, something is making it back. Is this all that is expected from commentWithConsoleLinkOnFailure: true? The link isn't actually to the console.

@sascha-egerer
Copy link

@altendky You should have comment with the link in your differential revision.

@altendky
Copy link
Author

@sascha-egerer, thanks for the response. In this case I am working with regular commits, not differential revisions. Should this work differently between the two?

@altendky
Copy link
Author

altendky commented Jun 7, 2019

Well, I'm finally back on this task and still having the same issue. :] From the looks of it a non-differential request simply doesn't get to the commenting code.

Below is only if (!isDifferential):
https://github.com/uber/phabricator-jenkins-plugin/blob/f1111b8f551a2997bc2fcab33e74ca05155222e3/src/main/java/com/uber/jenkins/phabricator/PhabricatorNotifier.java#L221-L225

And only further down do we get to building the result and eventually calling .sendComment():
https://github.com/uber/phabricator-jenkins-plugin/blob/f1111b8f551a2997bc2fcab33e74ca05155222e3/src/main/java/com/uber/jenkins/phabricator/PhabricatorNotifier.java#L251-L292

Additionally, the defaults from config.jelly don't seem to be used in a pipeline.
https://github.com/uber/phabricator-jenkins-plugin/blob/f1111b8f551a2997bc2fcab33e74ca05155222e3/src/main/resources/com/uber/jenkins/phabricator/PhabricatorNotifier/config.jelly

I've got a start at some changes to enable comments for Diffusion in addition to Differential but it's not quite working for me yet. When I get there I'll share what I've got to see if it is all sensible.

Of course, if someone else thinks they know how to handle this... I would appreciate any help I can get. :]

Cheers,
-kyle

@altendky
Copy link
Author

altendky commented Jun 7, 2019

The easy explanation for Diffusion comment support not being implemented here is that you can't add comments to Diffusion via Conduit.

https://secure.phabricator.com/T6461
is closed as a duplicate of
https://secure.phabricator.com/T1394
which is closed as won't fix because Harbormaster obsoletes it.

I'm following up with the Phabricator team to discuss how to make the build links more readily accessible.

https://discourse.phabricator-community.org/t/make-build-links-more-accessible-from-diffusion-commits/2798

@artms artms closed this as completed Jan 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants