immutant 2016-08-15

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

WildFly docs are 😢

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

that may be helpful

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).

cool, I'll check out that library

let us know if you haven any questions about it

or he has more expertise than I do, at least

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.

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.

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

my knowledge of the api is lacking

but I may be able to find it

cool, thanks!

tcrawley: expert? is he? really?

"expert". Compared to me, yes :)

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

or maybe "read-children"

that api is so dreadfully awful

💯 1

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

@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?"

do you have a curl command to get that info?

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.

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 }}]

asking the WF devs now

is it not just md5?

awesome!

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

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

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

compare that to my hash above

ohh... there you go

that was from gsha1sum on my mac

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

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

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

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