immutant

http://immutant.org Note: dev discussion happens in #immutant on FreeNode IRC.
2016-08-15T17:20:09.000197Z

@cap10morgan: do you have a link to docs for what you are trying to do?

cap10morgan 2016-08-15T17:20:23.000198Z

I wish

cap10morgan 2016-08-15T17:20:29.000199Z

WildFly docs are 😢

2016-08-15T17:20:40.000200Z

We use https://github.com/immutant/jboss-as-management for deploying to WildFly for our integ tests

2016-08-15T17:20:48.000202Z

that may be helpful

cap10morgan 2016-08-15T17:21:12.000203Z

At a higher level, I'm trying to tell when I already have a given version of a war file deployed to WildFly and skip re-deploying it if so (in a deploy script).

cap10morgan 2016-08-15T17:21:26.000204Z

cool, I'll check out that library

2016-08-15T17:21:50.000205Z

let us know if you haven any questions about it

2016-08-15T17:22:01.000206Z

@jcrossley3 is our WF API expert

2016-08-15T17:22:13.000208Z

or he has more expertise than I do, at least

cap10morgan 2016-08-15T17:26:12.000209Z

At this point I would love to just know how that hash is computed and encoded there so I could compute my own in my deploy script and compare the two hashes.

cap10morgan 2016-08-15T17:27:05.000210Z

But the level of detail in the WildFly docs isn't even in that zipcode. And I can't find the source code for the management API in the wildfly github repo's forests and forests of java boilerplate.

2016-08-15T17:28:10.000211Z

are you querying the api and getting back a hash value for the deployment, and want to compare against that?

2016-08-15T17:28:29.000212Z

my knowledge of the api is lacking

cap10morgan 2016-08-15T17:28:34.000213Z

yes

2016-08-15T17:28:41.000214Z

but I may be able to find it

2016-08-15T17:28:45.000215Z

or know who to ask

2016-08-15T17:29:10.000216Z

looking now

cap10morgan 2016-08-15T17:29:14.000217Z

cool, thanks!

2016-08-15T17:30:43.000218Z

tcrawley: expert? is he? really?

2016-08-15T17:31:04.000219Z

"expert". Compared to me, yes :)

2016-08-15T17:34:40.000220Z

cap10morgan: you may see it in the output from (api/request uri :operation "read-children-names" :child-type "deployment")

2016-08-15T17:35:11.000221Z

or maybe "read-children"

2016-08-15T17:35:31.000222Z

that api is so dreadfully awful

💯 1
2016-08-15T17:35:41.000223Z

I think the issue is knowing how the hash is calculated, not finding it

cap10morgan 2016-08-15T17:35:43.000224Z

@jcrossley3: Yeah, I can get it from the API. I need to know how to calculate & encode it from my own WAR to answer the question, "Is this WildFly deployment the same WAR as the one I'm about to deploy?"

2016-08-15T17:35:56.000225Z

ah

2016-08-15T17:36:09.000226Z

do you have a curl command to get that info?

cap10morgan 2016-08-15T17:36:51.000227Z

I've just been mucking around in the admin CLI so far. Was going to convert it to HTTP API call once I got something working.

2016-08-15T17:37:05.000228Z

gotcha

2016-08-15T17:39:39.000229Z

is this what you are trying to compare against? content=[{"hash" => bytes { 0x8b, 0x7a, 0x17, 0x7f, 0xb3, 0x41, 0x45, 0x35, 0x88, 0x39, 0x24, 0xb0, 0xf6, 0x38, 0xe1, 0x87, 0x9a, 0xf9, 0xde, 0xad }}]

cap10morgan 2016-08-15T17:40:26.000230Z

yep

2016-08-15T17:41:38.000231Z

asking the WF devs now

2016-08-15T17:43:02.000232Z

is it not just md5?

cap10morgan 2016-08-15T17:43:05.000233Z

awesome!

cap10morgan 2016-08-15T17:44:29.000234Z

@jcrossley3: might be; I need to spit out the bytes of the md5 and compare that

cap10morgan 2016-08-15T17:44:47.000235Z

md5sum is base64 encoding of those bytes by default, IIRC?

2016-08-15T17:45:03.000236Z

hey, good idea jcrossley3. It's actually sha1 though: 8b7a177fb3414535883924b0f638e1879af9dead target/demo.war

2016-08-15T17:45:16.000237Z

compare that to my hash above

cap10morgan 2016-08-15T17:45:18.000238Z

ohh... there you go

2016-08-15T17:45:37.000239Z

that was from gsha1sum on my mac

cap10morgan 2016-08-15T17:45:51.000240Z

I was trying to first match it to the other content address wildfly spits out on deployment, but maybe that was a red herring.

2016-08-15T17:46:17.000241Z

much of what wildfly gives you is a red herring :)

cap10morgan 2016-08-15T17:46:30.000242Z

so true

cap10morgan 2016-08-15T17:46:54.000243Z

OK, I have a local testing deploy about to happen here, I'll compare to the sha1 of the war

cap10morgan 2016-08-15T21:12:37.000245Z

yep, sha1 seems to match up perfectly. thanks guys!

2016-08-15T21:12:55.000246Z

yay!

2016-08-15T21:13:03.000247Z

our pleasure