1970-01-01 00:25
A file, which can't be shown because your team is past the free storage limit, was commented on.

1970-01-01 00:25
A file, which can't be shown because your team is past the free storage limit, was commented on.

rholshausen
2017-02-17 00:03
has joined #general2

trenthornibrook
2017-02-17 00:14
has joined #general2

matt
2017-02-17 02:29
has joined #general2

matt
2017-02-17 02:31
Hello! :slightly_smiling_face:

rholshausen
2017-02-17 03:02
Welcome!

trenthornibrook
2017-02-17 03:42
:wave:

lardcanoe
2017-02-17 23:41
has joined #general2

fitzoh
2017-02-17 23:45
has joined #general2

fitzoh
2017-02-17 23:46
hey there

sudhapatil3
2017-02-18 00:28
has joined #general2

abubics
2017-02-18 05:22
has joined #general2

abubics
2017-02-18 05:24
sup, y'all?

vijaynag
2017-02-18 22:22
has joined #general2

theresa
2017-02-18 22:58
has joined #general2

travi
2017-02-18 23:35
has joined #general2

andycampbell92
2017-02-19 00:32
has joined #general2

joel_a
2017-02-19 00:48
has joined #general2

sai.dileepjana
2017-02-19 21:06
has joined #general2

tmok01
2017-02-19 21:57
has joined #general2

mngau
2017-02-19 23:05
has joined #general2

kanchana
2017-02-19 23:44
has joined #general2

cass
2017-02-19 23:56
has joined #general2

stuparty
2017-02-19 23:58
has joined #general2

matt
2017-02-19 23:59
For those wanting to invite colleagues etc., you can refer them to http://pact-broker-slack-invite.herokuapp.com/ so they can signup instantly

matt
2017-02-19 23:59
@matt pinned a message to this channel.

trenthornibrook
2017-02-19 23:59
:thumbsup:

tigris
2017-02-20 00:00
has joined #general2

rob-manger
2017-02-20 02:07
has joined #general2

rob-manger
2017-02-20 02:09
greetings.

shahzadahmad
2017-02-20 12:22
has joined #general2

timothy.clifford
2017-02-20 22:40
has joined #general2

shahzadahmad
2017-02-21 10:01
Hello everyone!

shahzadahmad
2017-02-21 10:01
is anyone using pact in a microsoft service fabric world?

matt
2017-02-21 10:43
Not that I?m aware of, but i?d love to hear!

kevinkraus
2017-02-23 03:24
has joined #general2

jeanmarclai
2017-02-23 16:31
has joined #general2

timbailey
2017-02-28 22:03
has joined #general2

timbailey
2017-02-28 22:06
Hi


timbailey
2017-02-28 22:07
I assume that its a manual process to publish pacts to the broker (i'm in Pact-JS land)....

timbailey
2017-02-28 22:07
So when should I publish....in the consumer or provider "tests"

timbailey
2017-02-28 22:08
I think I've answered my own question....in the consumer as that is where the pacts are generated.....

matt
2017-02-28 22:09
:slightly_smiling_face:


timbailey
2017-02-28 22:14
Right, so does it make sense to publish on the finalize promise? ``` apiProvider.finalize() .then(() => { console.log('Writing PACT files') <-------Publish code goes here? done() }) .catch(err => { console.error('Error writing PACT files') done.fail(err) })```

matt
2017-02-28 22:14
potentially

matt
2017-02-28 22:14
Typically, it?s better to separate this out from the testing code itself.

matt
2017-02-28 22:14
This way, you can have your CI process determine whether to publish or not

timbailey
2017-02-28 22:14
Publish on CI build?


timbailey
2017-02-28 22:14
Snap

matt
2017-02-28 22:15
you probably don?t want your devs pushing changes on each unit test run, as this then provides an obligation to the Provider service (might be the same person/team) to meet that contract. Better to control that more carefully

matt
2017-02-28 22:16
also, you might want to tag the pacts (e.g. ?dev? or ?prod?) so that you can differentiate testing activities on the provider side

matt
2017-02-28 22:16
it might be OK for the provider to break a ?dev? tagged pact, but definitely not a ?prod? one

timbailey
2017-02-28 22:18
Right, thanks

matt
2017-02-28 22:18
:thumbsup:

timbailey
2017-02-28 22:19
Maybe offtopic, any plans for GRPC support?

matt
2017-02-28 22:19
not at this stage

matt
2017-02-28 22:19
from JS or Golang?

timbailey
2017-02-28 22:20
JS

matt
2017-02-28 22:20
or at least, not directly. We are looking at creating pluggable protocol engines. But this is probably a while away. We?d need to look at compatibility with other Pact language implementations etc.

matt
2017-02-28 22:20
but in theory it could be done

matt
2017-02-28 22:20
and fits the Pact model nicely

timbailey
2017-02-28 22:21
ok, so once your had the HTTP plugin....should be straigntforward to create GRPC imp also

matt
2017-02-28 22:22
what do you mean http plugin, sorry?

timbailey
2017-02-28 22:22
http protocol engine

timbailey
2017-02-28 22:25
ok, cool, thanks.

timbailey
2017-02-28 23:24
Soooo, me again, we love the HTTP Consumer Driven Contracts stuff that exists now.... we would like to use it with that and GRPC and RabbitMQ (as these are the transports we'll be using)

timbailey
2017-02-28 23:24
We could work on these and contribute back as PR's

matt
2017-02-28 23:25
Where are you based @timbailey? Perhaps we could organise a face to face / hangouts or something to work through it? Comminuty contributors would be great

timbailey
2017-02-28 23:25
Sydney

matt
2017-02-28 23:26
ah great

timbailey
2017-02-28 23:26
So we'd be interested in the JS interface to all this....

timbailey
2017-02-28 23:27
but i'd probably need to ready through the code to see where the plugins might interact. Perhaps start with some pointers for me to read? Then we could hangout?

matt
2017-02-28 23:27
both consumer and provider side?

timbailey
2017-02-28 23:27
Yep

matt
2017-02-28 23:27
Of course


timbailey
2017-02-28 23:28
Gut feel, how much work are we talking? Weeks/Months?

matt
2017-02-28 23:28
full or part-time?

matt
2017-02-28 23:28
:slightly_smiling_face:

timbailey
2017-02-28 23:29
For me, could be full time.....but boss might fall over if I say "6 months"!!

matt
2017-02-28 23:29
There are a number of different approaches, ranging from ?t& actical band-aids" to ?the one true solution"

matt
2017-02-28 23:29
ok definitely less than 6 months :smile:

matt
2017-02-28 23:29
Let me dig up some material and share with you

matt
2017-02-28 23:29
are you handy with Ruby or Rust perchance?

timbailey
2017-02-28 23:29
I'd say 1 month full time would be easy to arrange

timbailey
2017-02-28 23:30
ah nope, never touched

timbailey
2017-02-28 23:30
Cant be that hard??!!!!

matt
2017-02-28 23:33
(sorry man gotta run - work meeting)

matt
2017-02-28 23:33
but in short, it can?t be that hard :slightly_smiling_face:

timbailey
2017-02-28 23:35
k, chat later

timbailey
2017-03-01 04:02
Hey, sorry to keep going off topic....

timbailey
2017-03-01 04:03
I'm using Pact for verifying WebClient->Service contracts.....

timbailey
2017-03-01 04:03
So i'm using /node-modules/pact/dist/pact.web.js

timbailey
2017-03-01 04:03
But this is outof date in 2.2.2

timbailey
2017-03-01 04:04
ie doesnt have the .setup() method

timbailey
2017-03-01 04:21
hmm, forked and `npm dist` creates the same pact.web.js without the .setup() method....must eb missing somthing else

timbailey
2017-03-01 04:30
Yep, my fault. I'm using the Karma-Pact plugin, which does not have a .setup() method

abubics
2017-03-01 04:36
self-solving problems ;D

matt
2017-03-01 05:23
@timbailey yep, as Karma runs in the browser it can?t spawn open the mock service. I?m going to be looking at that in the next week or two, and probably rename it to `pact-web` or something for other web-browser-based testing frameworks

timbailey
2017-03-01 05:24
Cool, i'm having other wierd issues....tests all pass but I see incomplete calls to the http://127.0.0.1:8989/interactions/verification endpoint

matt
2017-03-01 05:25
If you have new interactions registered per test, you might need to clear out expectations between them with `removeInteractions ()`. Otherwise, each `verify()` is expecting all previous expectations to be met. The log file is your friend here.

timbailey
2017-03-01 05:26
I was tring to register them all on startup as per your e2e example....

matt
2017-03-01 05:26
ah ok, that?s fine. Each time you call `verify()` though you must have hit all of the endpoints you registered up until that point.

matt
2017-03-01 05:27
Either that, or move `verify()` into an `after()` type block that just runs once after all of the `it()` blocks pass

timbailey
2017-03-01 05:28
this is what i see....


matt
2017-03-01 05:29
cors maybe?

timbailey
2017-03-01 05:30
Maybe but then all the requests would fail?

matt
2017-03-01 05:31
yeah. Looks like it?s not going out at all based on that screenshot

matt
2017-03-01 05:32
3ms is very fast in comparison

timbailey
2017-03-01 05:32
(Is this the right place to be talking about this?)

matt
2017-03-01 05:33
it?s fine

matt
2017-03-01 05:34
ideally it?s public so we can share it

timbailey
2017-03-01 05:36
So i'm following the structure of the example here...


timbailey
2017-03-01 05:36
I have 2 test blocks, eachs adds interaction, does the test and then verifies

timbailey
2017-03-01 05:37
And I see 4 tests pass (2 tests + 2 "it verifies")

matt
2017-03-01 05:37
Worth asking, does the example in the pact-js repo work for you?

timbailey
2017-03-01 05:38
Yep `npm run test:karma:jasmine` == 8 passed. In PhantomJS....

timbailey
2017-03-01 05:39
Will try in Chrome now

timbailey
2017-03-01 05:43
3 failed....hmm...checking

timbailey
2017-03-01 05:45
I see the same "cancelled" status for the verification calls

timbailey
2017-03-01 05:45
and have some 500 errors on the unfriendme calls

timbailey
2017-03-01 05:45
Checking to see what is causing those

timbailey
2017-03-01 05:49
ok CORs issues...forgot to run without security

timbailey
2017-03-01 05:58
So i guess I dont get it!!

timbailey
2017-03-01 05:58
In your karma:jasmine tests

timbailey
2017-03-01 05:58
In order to see the netwrok requests....

timbailey
2017-03-01 06:00
I have to disable singleRun, run it in Chrome, then enable the devTools, then on the network tab click F5

timbailey
2017-03-01 06:01
But becuase I'm doing that the interactions are "accumulating" on the server, and the call to `http://localhost:1234/unfriendMe` then 500's with a "Multiple interactions found" error

timbailey
2017-03-01 06:01
But the tests still pass?

timbailey
2017-03-01 06:06
Right, so I think I see whats going on....

timbailey
2017-03-01 06:06
``` it("returns an error message", function (done) { //Run the tests client.unfriendMe().then(function() { done(new Error('expected request to /unfriend me to fail')) }, function(e) { done() }) })```

timbailey
2017-03-01 06:06
Here the test wants an error, which does happen, but not the error that the service should raise. Its a PACT mock error

timbailey
2017-03-01 06:07
`message: "Multiple interaction found for PUT /unfriendMe"`

timbailey
2017-03-01 06:08
I'd imagine that it should be poosible to have the same url registered for different states?

abubics
2017-03-01 06:10
for each interaction/scenario, you would define your expected state and response, so for one test you'd expect only one interaction

abubics
2017-03-01 06:11
can you not have your dev console open in Chrome before you start running your test?

timbailey
2017-03-01 06:12
This fixes the passing tests.... ``` it("returns an error message", function (done) { //Run the tests client.unfriendMe() .then(() => { done(new Error('expected request to /unfriend me to fail')) }) .catch(e => { expect(e.status).toEqual(404) done() }) })```

timbailey
2017-03-01 06:12
ie the error status should be 404

timbailey
2017-03-01 06:14
The refresh issue was a red herring. So now even if I refresh I see the correct results from the test

timbailey
2017-03-01 06:14
So the remaining question is why do the "verification" calls get cancelled

matt
2017-03-01 07:15
Will look at this tonight @timbailey

matt
2017-03-01 07:15
Looks like a logic problem

matt
2017-03-01 10:19
Updated that test and pushed to repo

matt
2017-03-01 10:19
not sure what?s going on with the ?cancelled? though!

timbailey
2017-03-01 21:18
Morning, so pulled your latest changes, 8 passes, great!!

timbailey
2017-03-01 21:18
Now looking at the 'cancelled' issue....

timbailey
2017-03-01 21:19
I *think* its something to do with overlapping requests....

timbailey
2017-03-01 21:19
as if, in `pact-js/src/common/request.js`, i change line 58 from

timbailey
2017-03-01 21:20
`const req = this._request` to `const req = new window.XMLHttpRequest()` then the calls dont get cancelled....but they instead 500 error

timbailey
2017-03-01 21:20
So not sure if thats progress!

timbailey
2017-03-01 21:21
The first verification call error is ...

timbailey
2017-03-01 21:21
```Actual interactions do not match expected interactions for mock MockService. Missing requests: GET /friends?age=30&children=Mary+Jane&children=James See /home/tim/Projects/timbailey-pnk/pact-js/logs/mockserver-integration.log for details.```

timbailey
2017-03-01 21:21
So now looking at that

timbailey
2017-03-01 21:25
Fixed it...if I move the provider.verify() to the `afterAll` ``` afterAll(function (done) { provider.verify() provider.finalize() .then(function () { done() }, function (err) { done.fail(err) }) })```

timbailey
2017-03-01 21:26
Does that make sense? Seems to me like the tests are being run non-sequentially so that the verifies are failing as the interactions are being added "out of order"?

matt
2017-03-01 21:27
Great news (i think?). Are you able to past the structure of your tests with any important / sensitive stuff removed?

timbailey
2017-03-01 21:28
its your test!


matt
2017-03-01 21:29
oh. that?s weird. Sorry I thought you said the tests are passing before?

timbailey
2017-03-01 21:29
They were, but with the "cancelled" reaquests

timbailey
2017-03-01 21:29
So my changes, now stop that and still have 8 passing tests

matt
2017-03-01 21:31
do you mind sharing the karma config so that I can compare notes? (assuming you?ve changed it for it to run in chrome, yeah?)

timbailey
2017-03-01 21:33
I have



timbailey
2017-03-01 21:34
`npm install karma-chrome-launcher`

matt
2017-03-01 21:46
So i?m no Karma expert, but it seems the tests all pass when you don?t run in debug. I?m probably fully catching up on your challenges, is this the case?

timbailey
2017-03-01 21:47
debug?

timbailey
2017-03-01 21:48
You mean pressing the debug button on the Karma UI?

matt
2017-03-01 21:51
yeah, but that?s a furphy never mind

matt
2017-03-01 21:52
sorry I?m still confused though. The tests all pass for me (i.e. if I enable `singleRun` it all runs and I get an exit code of 0)

matt
2017-03-01 21:52
``` Chrome 56.0.2924 (Mac OS X 10.11.6): Executed 8 of 8 SUCCESS (2.079 secs / 0.025 secs) 02 03 2017 08:51:24.803:DEBUG [karma]: Run complete, exiting. 02 03 2017 08:51:24.805:DEBUG [launcher]: Disconnecting all browsers 02 03 2017 08:51:25.004:DEBUG [launcher]: Process Chrome exited with code 0 02 03 2017 08:51:25.004:DEBUG [temp-dir]: Cleaning temp dir /var/folders/2p/c2fzdtmx6837gcbf314_x5rm0000gn/T/karma-87724249 02 03 2017 08:51:25.029:DEBUG [launcher]: Finished all browsers matt ~/development/public/pact-js ? echo $? 0 ```

matt
2017-03-01 21:52
It?s only with the browser console open (devtools) that I get those cancelled requests

matt
2017-03-01 21:53
but they definitely are being called when I look at the mock server logs

timbailey
2017-03-01 21:53
Yep, the tests succeed, the change I made was to resolve the cancelled requests

matt
2017-03-01 21:53
I haven?t pulled that in though

timbailey
2017-03-01 21:54
Yeah, so even with cancelled requests it passes, just feels ugly, so I was on a mission to track it down!

matt
2017-03-01 21:54
ahh, right

timbailey
2017-03-01 21:54
So I can fix the cancelled requests, but that means that I have to move the verification stuff to afterAll

matt
2017-03-01 21:55
it?s weird seeing that, I agree, but the calls are definitely coming in to the Ruby process to verify: ``` matt ~/development/public/pact-js ? tail -f logs/mockserver-integration.log | grep -i verif I, [2017-03-02T08:53:58.789041 #37484] INFO -- : Verifying - interactions matched for example "" I, [2017-03-02T08:54:09.463187 #37526] INFO -- : Verifying - interactions matched for example "" I, [2017-03-02T08:54:09.486408 #37526] INFO -- : Verifying - interactions matched for example "" I, [2017-03-02T08:54:09.507567 #37526] INFO -- : Verifying - interactions matched for example ??```

timbailey
2017-03-01 21:56
My guess is that the response is being sent and being read by chrome, but causes the "cancelled" to show as it reuses the XMLRequest object to start another request

timbailey
2017-03-01 21:56
So might be just a devtools issue?

matt
2017-03-01 21:57
could be

matt
2017-03-01 21:58
we should try for a failure to ensure the request/response is indeed working

matt
2017-03-01 21:59
hmm so maybe there _is_ a problem.

timbailey
2017-03-01 22:00
What are you seeing

matt
2017-03-01 22:02
I commented out the test body in the `should say hello` test so that it wouldn?t call the expected endpoint. The tests all still pass

matt
2017-03-01 22:03
Just toying with it now

matt
2017-03-01 22:35
ok getting it to fail was easy, looks like I?m assuming promises work the same here - clearly not

matt
2017-03-01 22:35
``` it("should say hello", function(done) { //Run the tests done() // client.sayHello() // .then(function (data) { // expect(JSON.parse(data.responseText)).toEqual({ reply: "Hello" }) // done() // }) // .catch(function (err) { // done.fail(err) // }) }) // verify with Pact, and reset expectations it('successfully verifies', function(done) { provider.verify() .then(function(a) { done() }, function(e) { throw e }) }) }) ```

matt
2017-03-01 22:36
_(that was from 30mins ago before I hopped off the train)_

timbailey
2017-03-02 00:20
Still having issues, not sure whats causing them

timbailey
2017-03-02 00:21
Some kind of timing issues, rerunning the tests sometimes succeeds, sometimes fails 1 test

timbailey
2017-03-02 00:21
When it fails I see this in the verification call... ```Actual interactions do not match expected interactions for mock MockService. Missing requests: PUT /unfriendMe See /home/tim/Projects/timbailey-pnk/pact-js/logs/mockserver-integration.log for details.```

timbailey
2017-03-02 00:22
I've tried various ways of trying to ensure the interactions are set, then the test is run, then the interactions are verified

timbailey
2017-03-02 01:08
Ok, can you have a look at this....

timbailey
2017-03-02 01:09
Reorganised the test to make sure the requests to the mockServer are happening in the correct order. This for me is 4/4 passed

abubics
2017-03-02 01:09
sounds like a job for screenhero, when someone's free :wink:


matt
2017-03-02 01:26
thanks @timbailey i?ll take a look tonight (sorry can?t do much whilst at work)

matt
2017-03-02 01:26
One thing I just thought of - does this work if you enable `singleRun`?

timbailey
2017-03-02 01:27
Yep

matt
2017-03-02 01:27
That would explain the need for: ``` beforeAll(function (done) { ... provider.removeInteractions() ```

matt
2017-03-02 01:28
because interactions from the last test (aka the `PUT /unfriendMe`) are still hanging around for the start of the next run

timbailey
2017-03-02 01:28
Yeah


timbailey
2017-03-02 01:28
Singlerun works.... PhantomJS complains of JS syntax error checking.

timbailey
2017-03-02 01:29
Perhaps you can send me the docs you were talkin gbaout yesterday regarding the "Plugable Protocol Engine", so I we can see whats going to be involved


matt
2017-03-02 01:30
ok there?s nothing yet on "Plugable Protocol Engine? but in terms of supporting other features in Pact i?d start at https://github.com/pact-foundation/pact-specification/tree/version-3



timbailey
2017-03-02 01:33
(PhantomJS issue seems to be because I used arrow functions....)


matt
2017-03-02 01:33
good to hear :slightly_smiling_face:


matt
2017-03-02 01:35
gotta run man. Should we organise a call \ hangouts or something? Keen to hear more about what you?re doing and see what we can do?

timbailey
2017-03-02 01:37
Groovy, will read the docs and we can chat about what we trying to do and what we need

timbailey
2017-03-02 01:37
Thanks

timbailey
2017-03-02 03:26
I made a PR for you to review....


timbailey
2017-03-02 03:27
But it breaks the unit tests for the "Request" object. So will need to figure out how to test that

matt
2017-03-02 08:16
Thanks @timbailey, I?ve taken a look at the tests. I?m not sure it?s all necessary but I?ll look in more detail. I can see why we might want to create a new request each time

matt
2017-03-02 08:17
in the meanwhile, I?ve pushed up a small change to allow the `singleRun: false` scenario

timbailey
2017-03-02 20:57
Hi, The only way I could get the tests to be reliable was to closely control the requests going to the mockservice, seems like in Karma/Jasmine occasionally the tests would be run overlapped and this would cause the verify/removeinteractions to happen in the middle of the next test causing "missing interaction" errors

timbailey
2017-03-02 20:59
It is possible that by "fixing" the cancelled requests in Chrome I've then allowed the requests to overlap? ie The old way of reusing the same XMLHttpRequest actually enforces some kind of serialization of requests.....

thadir
2017-03-24 14:05
has joined #general2

thadir
2017-03-24 14:20
Goodday, thanks for letting us be part of the PACT Hosted Beta. Next week ill start implementing some of our pact test to go to the broker. I did have one question, at the moment we got err a realy technical user and password system from you will there be a more user friendly system. (I know now for the beta its fine and my team are for now the only ones that use it) but if were going to let the whole orgonisation and in the future also our clients use Pact it would be a nice to have to have a form of account magement in the pact broker website.

matt
2017-03-25 09:44
Hi @thadir, you?re most welcome! The short answer is yes, we are looking into other forms of authentication and access controls. But for now, and at least the few months, the system user is all we have.

willmadison
2017-03-28 12:56
has joined #general2

thadir
2017-04-05 13:42
we have been playing around with the pact and were running in some issus about how the broker things versioning should be done. It seems it wants semantic version numbers. However we dont use that we use the date + hash of commit (for maser builds) and for pull request its <pull-request name> - build number-SNAPSHOT. Now it seems there is a mismatch. Any ideas I really don't want to introduce semantic versioning in our pipeline, because its weird for automated systems (only shared libraries get a semantic versioning in our system).

rholshausen
2017-04-06 05:18
@thadir I'm going to bounce this question to the Pact Broker main contributor, but my guess is that won't work at the moment.

vinny
2017-04-06 05:31
has joined #general2

abe
2017-04-06 11:47
has joined #general2

harryw
2017-04-06 13:15
has joined #general2

beth
2017-04-06 23:23
has joined #general2

beth
2017-04-06 23:26
@thadir You can write your own version parser - I made this configurable because I knew at some stage, people would want to use something other than semantic versioning. Let me throw together a page on the wiki, and I'll post the link.


matt
2017-04-06 23:41
Only problem is, you can?t customise the version parser on our hosted broker

matt
2017-04-06 23:41
?at least not yet

thadir
2017-04-07 07:43
@matt then we have a chalange there :wink:. For now we found a workaround. Becouse we realy want to use PACT but for its all good.


abe
2017-04-07 08:15
thx for granting access to the beta i look forward to getting my tests up and shared with the team :slightly_smiling_face:

abe
2017-04-07 12:37
I have gotten a moc and test working and made a pact file

abe
2017-04-07 12:38
but i now need to upload to pact broker

abe
2017-04-07 12:38
how ever the curl i constructed give me a 405

abe
2017-04-07 12:39
here is the formula i used

abe
2017-04-07 12:39
curl -v -u 'user:pass' -XPUT \-H "Content-Type: application/json" -d@pact.json brokerURL

abe
2017-04-07 12:40
based on the example from the http://pact.io documentation

abe
2017-04-07 12:41
i am very new to pact so i apologies if this is common knowledge

matt
2017-04-08 00:09
: Hi all, the OSS Pact Foundation team are conducting a short survey on Pact usage in order to improve the product and drive the roadmap. So far the feedback has been great and we have identified lots of pain points to addres. Please if you could spare 5 minutes, head over to https://goo.gl/JD5tuk - we?d _really_ appreciate it!

matt
2017-04-08 00:09
@matt pinned a message to this channel.


matt
2017-04-08 00:13
Might be a formatting issue on that page the slash in `\-H` is not necessary

fitzoh
2017-04-08 02:41
@thadir this was my stab at writing a custom versionomy parser (disclaimer: I don't know ruby at all) ``` def test_parsing_custom_snapshot_format format_ = ::Versionomy.default_format.modified_copy do field(:release_type, :default_value => :final, :requires_previous_field => false, :delimiter_regexp => '-') do recognize_regexp(:development, 'SNAPSHOT', :development) end end value1_ = ::Versionomy.parse('3.0.1-SNAPSHOT', format_) assert_equal(3, value1_.major) assert_equal(0, value1_.minor) assert_equal(1, value1_.tiny) assert_equal(:development, value1_.release_type) value2_ = value1_.format.parse('3.0.1') assert_equal(3, value2_.major) assert_equal(0, value2_.minor) assert_equal(1, value2_.tiny) assert_equal(:final, value2_.release_type) end end ```

fitzoh
2017-04-08 02:56
@abe do you have a path after your `brokerURL`?


fitzoh
2017-04-08 02:57
If you look at the example from there ^, you'll see it has a url path with the provider, consumer, and version ```curl -v -XPUT \-H "Content-Type: application/json" \ -d@spec/pacts/a_consumer-a_provider.json \ http://your-pact-broker/pacts/provider/A%20Provider/consumer/A%20Consumer/version/1.0.0```

thadir
2017-04-10 08:37
@fitzoh I had dabled in it a bit. But seeing its hosted, I think we need to make it dynamic and configurable. I know Ruby allouws for regex etc. Im more Java and Angular2 my self. But I think we can figure this out to make this configurable :slightly_smiling_face:

abe
2017-04-10 09:51
@fitzoh it was the path that i got wrong

abe
2017-04-10 09:51
i had not realised the url dictated so much

abe
2017-04-10 09:52
I take it there is no way to create users for the broker so each team can only edit there own pacts

abe
2017-04-10 09:54
@matt i was using the git hub read me but it was not very clear as to its requirements what solved it for me in the end was random blog post

matt
2017-04-10 09:54
Looks like we need to make things a bit clearer!

matt
2017-04-10 09:55
Thanks for letting us know. Which blog post btw?

matt
2017-04-10 09:56
If you think about it, your creating a resource so the path is important (there are other API end points also). We should publish an API doc I think

abe
2017-04-10 12:56
now that i know its really obvious

abe
2017-04-10 12:56
and when i go back to he documentation i see it now

abe
2017-04-10 13:01
is there a way to create users per consumer so each consumer can only upload there own pacts?

abe
2017-04-10 14:36
one other question out to the community but has any one got the provider test validation working with the:


abe
2017-04-10 14:37
we have tried stable and pre release

abe
2017-04-10 14:37
hacking it for certain URLs

abe
2017-04-10 14:37
by hard coding the /latest



matt
2017-04-11 09:05
@abe I?ll look into this, can you please raise a bug with logs/output etc.?

matt
2017-04-12 08:38
@abe did you raise that issue? I just pulled the latest binary and ran an integration test and that published just fine

matt
2017-04-12 08:40
If you check out the integration test in examples that might help


matt
2017-04-12 08:40
That contains a broker publish before verification

matt
2017-04-12 08:41
if you want to prove that publishing worked, run a delete on that consumer + provider: ``` curl -v -XDELETE -u 'dXfltyFMgNOFZAxr8io9wJ37iUpY42M:O5AIZWxelWbLvqMd8PkAVycBJh2Psyg1' https://test.pact.dius.com.au/pacticipants/bobby curl -v -XDELETE -u 'dXfltyFMgNOFZAxr8io9wJ37iUpY42M:O5AIZWxelWbLvqMd8PkAVycBJh2Psyg1' https://test.pact.dius.com.au/pacticipants/billy` ``` Then head over to https://test.pact.dius.com.au/ui/relationships to see that they?re gone before running the tests

patrick
2017-04-12 10:46
has joined #general2

marcevers
2017-04-12 12:51
has joined #general2

m.pleijte
2017-04-13 11:08
has joined #general2

gtondi
2017-04-14 10:13
has joined #general2

abe
2017-04-19 13:27
@matt we found the problem is slightly lacking in the documentation department

abe
2017-04-19 13:27
in the end we got it all working but there was a lot of trial and error

abe
2017-04-19 13:33
out of curiosity is there a way to access the pacts as consumable services

abe
2017-04-19 13:34
so we have a /login_customer end point

abe
2017-04-19 13:34
is there a way to access the endpoint mock via the broker?

matt
2017-04-19 22:31
No - but that is on the roadmap! I?m so glad you asked :slightly_smiling_face:

abe
2017-04-20 07:37
sweet sweet

abe
2017-04-20 07:37
that is going to probably be one of the most useful features

matt
2017-04-20 07:38
I reckon!

abe
2017-04-20 07:38
we hopeing to fully pact all endpoints in the next couple of weeks

matt
2017-04-20 07:38
oh wow, that?s amazing!


abe
2017-04-20 07:38
could be wishful thinking

abe
2017-04-20 07:39
fingers crossed :slightly_smiling_face:

matt
2017-04-20 07:39
:smile:

thadir
2017-04-25 09:57
I have been wondering is there a reason there is a version number in the pact-jvm-provider artifactID for maven?

matt
2017-04-25 09:59
Hmm not sure. Compatibility with other jobs I'm guessing. This question might be best asked on the gutter channel for that project tho

matt
2017-04-25 09:59
Jobs = Jars

matt
2017-04-25 09:59
Or libs (take your pick)

thadir
2017-04-25 10:00
:slightly_smiling_face:, eather is good, but for that I would expect difrent methods. Ill poke them about it. were slowly getting pact forged in our processes. How is the status on the custom versioning numbers for hosting? I know the pact-broker supports it but for the hosting its still a challange.

matt
2017-04-25 12:01
Ah sorry, I was on the go. From memory the versioning in the artifact ids relate to Scala stuff like 2_10/2_11 or something like that?

matt
2017-04-25 12:02
yup it?s to do with Scala runtime compatibility

matt
2017-04-25 12:03
As for the versioning, I?ve no update other than to say we?ve captured that request. Have you any suggestions as to how we might implement it to meet your needs?

matt
2017-04-25 12:04
I?m thinking it could be a toggle set via the UI from a set of pre-defined versioning schemes. Or potentially even better, the ability to specify a scheme via regex

lukvermeulen
2017-04-25 12:48
has joined #general2

beth
2017-04-26 01:15
Hi , I am looking for some broker users to try out a beta version of the pact broker that will include the ability to record and visualise provider verification results. Please join me in the #verifications channel if you are interested.

beth
2017-04-26 01:16
@thadir what sort of versioning scheme are you using?

thadir
2017-05-01 13:43
@beth ya dont wanna know :sweat_smile: bit messy how we do it. For master builds we use a part of the build of the Git HASH, for release builds we use symantic builds. So we need both options to work for us (sorry for the late response, it was a national holiday here in the netherlands)

mouser
2017-05-02 01:30
has joined #general2

trenthornibrook
2017-05-02 01:33
@mouser is the TL at Irexchange

mouser
2017-05-02 01:50
hey guys!

matt
2017-05-02 01:51
hey @mouser!

beth
2017-05-02 05:42
thadir: oh mah lord! Um. I can't think of a way to order git shas.

beth
2017-05-02 05:43
the only way to sort would be by date.

beth
2017-05-02 05:44
The version object needs to respond to sort, not just be parseable.

thadir
2017-05-02 09:04
I Warned you its not pritty :sweat_smile:, So master builds have the folowing: 2017-05-01_16-33-40dad2e 2017-05-01_16-25-40dad2e They have the time stamp in there, but it would be more convient that we could sort on the date setted in the system. Symantic versions for releases are like 1.0.1. Then snapshots are err even worse in our case: security-api-PR-17-20170502.080752-1

thadir
2017-05-02 09:04
security-api-PR-17-20170502.080752-2


thadir
2017-05-02 09:04
So yeah, its messy I have no controll on this. To big a thing to not have symantic versions in there.

mouser
2017-05-02 23:46
hey guys, we?ve noticed that the icon for accessing a PACT on the broker homepage seems to have gone walkabout after the upgrade? could someone take a look for us?

abubics
2017-05-02 23:53
mmm same here

abubics
2017-05-02 23:54
you can still get to it by drilling through a consumer/provider, then the arrow between the pair you want

matt
2017-05-03 00:04
Thanks guys

matt
2017-05-03 00:05
I?ll raise an issue on the pact_broker repo, I?ve noticed the same

matt
2017-05-03 01:24
I?ve submitted a patch for that display issue, I?m not _quite_ sure what is going on there, but it seems jq is not firing the right event to attach the icon


mouser
2017-05-03 08:26
Thanks!

matt
2017-05-03 08:45
No worries, we should be able to update the hosted version in the next day or two

thadir
2017-05-03 09:44
@matt about the hosted version, how far along are you guys with the user management at the moment we only have this basic http autentication protecting it all. And for now its good (Its still a pilot at all) but I sort of want the publisher to have the richts of publising and viewer to only see stuff etc.

matt
2017-05-04 00:27
mouser: I?ve just upgraded your instance, your links should have returned!

mouser
2017-05-04 03:44
It certainly has @matt - thanks again!

matt
2017-05-04 03:44
No worries!

beth
2017-05-05 00:52
@thadir I'm just working on creating separate read/write basic auth accounts, but they won't be resource specific.

beth
2017-05-05 00:53
both consumer and provider accounts will be publishing _something_ when we release the verifications stuff.

beth
2017-05-05 01:34
I've just released version 1.18.0.beta.1 of the broker gem with basic auth built in. The documentation is available here: https://github.com/bethesque/pact_broker/wiki/Configuration#using-basic-auth

matt
2017-05-05 01:34
nice one!

beth
2017-05-05 01:35
You can configure multiple users against multiple scopes (ie. read, write, diagnostics, all app)

beth
2017-05-05 01:35
We'll add it to the docker config as soon as we've given it a road test.

abubics
2017-05-05 01:36
sounds kinda like some people want read/write accounts (for provider/consumer publishers) and read-only accounts to just view everything on the broker . . . that sounds efforty

abubics
2017-05-05 01:39
but I guess full granular auth would be cool, too :stuck_out_tongue:

beth
2017-05-05 01:40
Yes, some people only want to protect the write requests. Some people want to allow devs to read/write and other users to just read. This will support all of those options.

beth
2017-05-05 01:41
One day we might add consumer/provider specific based auth.

beth
2017-05-05 01:41
but that day is not today!

beth
2017-05-05 03:50
Hm... I'll have a think. The sorting algorithm would need to have different arguments in your case - that's the complicating factor. At the moment, the version parsing code only needs the version itself. Then, we sort on the outcome of that parsing.

beth
2017-05-05 03:51
You need to sort on an entirely different column.

marcevers
2017-05-05 06:45
hi, yesterday we tried publishing a pact with an invalid version to the hoster broker and we noticed that error responses from the broker are not processed correctly any more by the pact-jvm-provider maven plugin (we're using version 3.3.8). It fails with "Execution default-cli of goal au.com.dius:pact-jvm-provider-maven_2.11:3.3.8:publish failed: No signature of method: groovy.json.internal.LazyMap.join() is applicable for argument types: (java.lang.String) values: [, ]"

rholshausen
2017-05-05 06:50
@marcevers Can you raise that as an issue at https://github.com/DiUS/pact-jvm

beth
2017-05-05 11:41
I've had a think about this, and you have two options. One is you can do a little code hack as per this example here: https://gist.github.com/bethesque/31c2d00f93bb6168cbbc645bcbc08688

beth
2017-05-05 11:43
The second is that you can append/prepend a consistent timestamp to every one of your version formats when you publish to the broker. Then you can configure the version parser to extract the consistent date part, and the rest of the code will use that to sort on.

thadir
2017-05-08 17:03
beth: Hmm the documatation link is a tad broken becouse its not on you repo or on the pact-foundation wiki it self

thadir
2017-05-08 17:04
@rholshausen We have issu can be found @https://github.com/DiUS/pact-jvm/issues/421

beth
2017-05-12 05:45
@thadir I've added in code to allow sorting by creation date of the application version.

beth
2017-05-12 05:45
I've made it configurable - we just have to decide how we're going to manage configuration for the saas brokers.

beth
2017-05-12 06:15
Sorry @thadir, after discussing with @matt and @rholshausen I decided to back the changes out and wait until we did proper user authentication. I meant to revoke my announcement on Monday, but I got sidetracked.

thadir
2017-05-12 08:31
Thats ok, no rusing, :slightly_smiling_face: just a feature I realy want :slightly_smiling_face: hence me asking.

thadir
2017-05-12 08:34
Ok, yeah I figured you sort of needed a new colmn. I think we sort of need a extra UI for configuring the broker in saas or somting (thats what we do with our hosted dockers as well btw).

matt
2017-05-12 12:51
Rest assure this is high on our roadmap @thadir. Verifications was something we needed to bring to the entire community first, but user management is in progress as it is a common feature request.

thadir
2017-05-12 12:52
I know, just telling it as it is. Were slowly ramping up the usage. So version if for us a bigger then then autentication. But thats becouse the nature for us how we do versions.

matt
2017-05-13 03:07
Please keep the feedback coming! This request came through in a couple of comments recently in our public survey. We are looking at strategies to enable multiple types of versioning and managing configuration via APIs or user interfaces. Keep your ears peeled, we will likely get in touch with you to discuss this further

beth
2017-05-16 05:01
Hi all. We're looking at adding "proper" auth to the pact broker. Please join me in the #auth channel and let me know what providers you'd like the broker to integrate with.

fitzoh
2017-05-17 05:14
I just saw this pr: https://github.com/pact-foundation/pact_broker/pull/88... Does that mean that custom version parsing is going away?

matt
2017-05-17 05:41
Beth assures me that custom version parsing is still there, as per before

beth
2017-05-17 05:44
Oh, right, now I get what you were saying @matt.

beth
2017-05-17 05:44
@fitzoh the default parser has been upgraded to work with semver2, but custom parsing still works as before.

matt
2017-05-17 05:45
I realised the way I sent it was probably a little bit misleading, but it all worked out :slightly_smiling_face:

beth
2017-05-17 05:45
You may not need custom parsing any more with the upgraded parser @fitzoh

fitzoh
2017-05-17 05:46
cool cool

beth
2017-05-17 05:46
Out of interest, what versioning scheme to you use?

fitzoh
2017-05-17 05:46
java: `-SNAPSHOT`

fitzoh
2017-05-17 05:46
but I just put in a PR that will make that a non-issue for me: https://github.com/DiUS/pact-jvm/pull/431 cc @rholshausen

beth
2017-05-17 05:46
Yeah, ok, you'll still need the custom one.

fitzoh
2017-05-17 05:48
I'd have to imagine that's a pretty common issue if any other java people are using the pact broker (unless they're just not publishing non-release pacts)

fitzoh
2017-05-17 05:48
or using gradle, which makes stripping the SNAPSHOT off a lot easier

beth
2017-05-17 08:33
Pretty close to getting your versions sorting by date @thadir

beth
2017-05-17 08:34
Hopefully deploy it on Friday

thadir
2017-05-17 08:35
Great to hear, looking forward to it :slightly_smiling_face:, I must say were quite happy how things are working out with Pact and the broker so keep up the good work.

beth
2017-05-17 09:13
The new version parser allows you to configure multiple patterns for it to look for. We could potentially get it to work around the SNAPSHOT. I'll have a look at it.

beth
2017-05-17 09:14
I'm not a java person, can you send me a couple of examples of the full string?

matt
2017-05-17 09:31
It?s a fully semver compatible string

matt
2017-05-17 09:31
usually like `1.0.0-SNAPSHOT`, but can have other metadata

matt
2017-05-17 09:32
e.g. `1.0.0-SNAPSHOT+127` for something like build 127



matt
2017-05-17 11:07
Thanks @thadir!

thadir
2017-05-17 11:08
@matt I think we should tahnk you origonaly the plan was to manage a docker in our own envyroment, and I think ousourcing it is a lot better helps the comunity and development of Pact and helps us help and you helping us. Its a nice 2 way street :wink:.

matt
2017-05-17 11:09
that?s the idea!

matt
2017-05-17 11:11
FWIW we want to be as transparent as we can. At some point, there will be a paid offering with some of these ?Enterprise? features, if you will. There will be a free tier, but in terms of pricing our aim is to make it cost neutral in order to support development efforts and cover hosting etc.

thadir
2017-05-17 11:12
@matt We filled in the form, and I am willing to pay for it (e.g. the comapny witch hired me as well) so no biggy :wink:. Beta is a nice play ground, but when its stable we want you to take the money to keep the service going.

matt
2017-05-17 11:13
That?s really great to hear, and thanks for being such a great promoter!

thadir
2017-05-17 11:14
I fixed it to do it totaly difrent @matt and @beth my snapshots are named like this: PR-20-20170516.134509-7 (where PR is the pull request number of the given articadt0 the date is the build date and the 7 is the amount of build attempt it is. Versioning in Maven is quite free flow tbh. So if you need input we got a java engineer here to spare to help out with questions.

matt
2017-05-17 11:15
oh deary me, looks like my advice was _way_ off!

thadir
2017-05-17 11:25
@matt its so flexible you can do it in many ways, in our company we dont think in snapshots for our test builds, but in pull request seeing a snapshot is local and pull request is part of our flow to bring it to master (and thus production)

matt
2017-05-17 11:25
yeah makes sense - i didn?t realise the scheme was that flexible!

thadir
2017-05-17 11:33
It is, its less flexable then Ant and Gradle but if you want you can go far -_-

eskimoquinn
2017-05-19 16:08
has joined #general2

eskimoquinn
2017-05-19 16:15
Hopefully this is the correct place for this. I am trying to download pact files from my hosted pack broker using pactbroker-maven-plugin. I am able to upload with this plugin, but cannot download. I receive an HTTP response of 406 NOT ACCEPTABLE. Any help? Known issue?

thadir
2017-05-19 16:44
@ you need to add the folowing to your maven config:

thadir
2017-05-19 16:48
In this case you should add the folwogin maven command to your commandline build: -Dpact.broker.username=<username> -Dpact.broker.password=<password>

eskimoquinn
2017-05-19 18:29
:+1: we are trying that now

matt
2017-05-20 01:42
How did you go @eskimoquinn?

beth
2017-05-21 05:50
@eskimoquinn @matt @rholshausen That might be to do with that content type issue issue that Ron discovered where it was returning a 406 when application/hal+json was being requested (and only "application/json" was provided). Let's upgrade the broker.

rob.lugton
2017-05-22 07:02
has joined #general2

rob.lugton
2017-05-22 07:09
Hi all, has anyone ever used pact with graphql (http://www.graphql.org) before?

trenthornibrook
2017-05-22 07:09
or pacts between some browser js like React and APIs?

rholshausen
2017-05-22 07:10
No, but we have discussed that graphql is maybe not a good candidate for contract tests

trenthornibrook
2017-05-22 07:11
why not a good candidate? Because theres some validation built in? like https://github.com/graphql/graphql-js/tree/master/src/validation

thadir
2017-05-22 07:24
@eskimoquinn I wonder did it work out?

rholshausen
2017-05-22 22:45
Yes, you define the schema so it validates it for you. Some for Google protocol buffers.

beth
2017-05-24 03:41
@trenthornibrook yes, I've used pact between a react UI and an api. The react is kind of irrelevant really.

beth
2017-05-24 03:41
Hi @rob.lugton! Welcome.

beth
2017-05-24 03:43
@thadir all going smoothly with the latest version?

abubics
2017-05-24 04:23
@beth @trenthornibrook: totally agree, React should be irrelevant for Pact. If your app is architected nicely, the services that talk to APIs shouldn?t be touching UI.

thadir
2017-05-24 08:20
@beth we didnt have a chance yet, but it will happen soon. No complains up to now but we didnt add new tests to the suite or masterbuilds.

jfeng
2017-05-25 06:31
has joined #general2

lardcanoe
2017-05-25 11:37
our services communicate using graphql and we are using pact just fine.

eskimoquinn
2017-05-31 19:07
Anybody know when the "last verified" time is updated for a pact in the broker UI? We are verifying the pacts on the provider side, but that time does not seem to be updated in the broker UI. We are using the pact-jvm-provider-maven plugin.

shashidesai
2017-05-31 20:42
has joined #general2

rholshausen
2017-06-01 00:05
@eskimoquinn pact-jvm doesn't support publishing verification info yet

eskimoquinn
2017-06-01 00:20
thadir: Yes we were able to get it working. Thanks!

eskimoquinn
2017-06-01 00:20
ok thanks!

eskimoquinn
2017-06-01 00:25
I raised an issue in github, but I am wondering if perhaps someone here would be able to help also. This link (https://github.com/pact-foundation/pact-provider-proxy/issues/7) has my code snippets, but basically I want to verify a pact against a remote service (from our CI test suite). The pact has provider states and I want to call the remote service to verify the pact. The pacts that do not have provider states work as I would expect, however, the pact with the provider state does not.

matt
2017-06-01 00:46
Looks like Ron has responded. Hopefully we?ll have the JVM verifications out soon - lot?s happening at the moment!

eskimoquinn
2017-06-01 20:22
In reply to the pact-provider-proxy, I was able to get things working by explicitly declaring the pact_states file in the rake task. So probably not a bug per se, but not quite how the documentation described it.

beth
2017-06-03 01:05
@eskimoquinn the documentation actually does describe it in the README. Is there somewhere else that contradicts this that I've missed?

eskimoquinn
2017-06-03 01:39
@beth I did see the original note but I think we were having two simultaneous problems which were obscuring that we mis-configured the helper. The README is clear. Thanks for the help!

eskimoquinn
2017-06-03 01:41
And for everyone here, we are going to be adopting pact on our team and trying to spread it to the other devs in our org. Excited to use pact.

matt
2017-06-03 01:42
That?s great to hear @eskimoquinn - feel free to reach out if you need any help with that!

coco
2017-06-05 05:42
has joined #general2

stein
2017-06-05 22:26
has joined #general2

stein
2017-06-05 22:33
Hi guys, what?s the correct way to delete a webhook? I am using the hosted broker and calling `DELETE https://<subdomain>.http://pact.dius.com.au/webhooks/DDrB0LyxhMmEDKeQos3U8Q` gives me ``` { "message": "undefined method `delete_executions_by_webhook_uuid' for #<PactBroker::Webhooks::Repository:0x000000040925c8>", "backtrace": [ "/home/app/pact_broker/vendor/bundle/ruby/2.2.0/bundler/gems/pact_broker-0d2479decb12/lib/pact_broker/webhooks/service.rb:34:in `delete_by_uuid'", "/home/app/pact_broker/vendor/bundle/ruby/2.2.0/bundler/gems/pact_broker-0d2479decb12/lib/pact_broker/api/resources/webhook.rb:27:in `delete_resource'", "/home/app/pact_broker/vendor/bundle/ruby/2.2.0/gems/webmachine-1.4.0/lib/webmachine/decision/flow.rb:399:in `m20'", ... } ```


matt
2017-06-05 22:38
Could be a bug in the broker, if you DM me I can look into it for you and we can look to create a patch.

mouser
2017-06-09 10:33
Love the new feature in the broker to create/edit webhooks. Thanks!

eskimoquinn
2017-06-09 20:06
Hey PACT folks, we would love to be able to add specific notes about using the service to our autogenerated pact documentation in the broker. We currently add usage notes which provide additional explanatory text about the service. Is there anyway to do this currently?

matt
2017-06-10 04:25
This has come up a few times, actually were you asking this on Gitter by any chance? At the moment, this feature doesn?t exist but we?ll pop it into a backlog and see where we might be able to fit it in. Which language do you use?

eskimoquinn
2017-06-12 20:11
@matt we are using java on the consumer side and ruby on the provider side. So of immediate use for use would be the jvm-consumer

matt
2017-06-12 23:18
Thanks @eskimoquinn

beth
2017-06-12 23:53
@eskimoquinn Great idea.

beth
2017-06-13 00:08
eskimoquinn: At one stage I was planning to add a consumer/provider documentation URL to the configuration. Given that the text could be quite long, would a URL meet your needs?

eskimoquinn
2017-06-16 17:02
I ran into what I think is a bug with the JVM consumer. When I supply an example value in the matchHeader method of the fragment, the reponse body is escaped in the pact JSON: ``` .willRespondWith() .status(200) .matchHeader("Content-Type", "application/json", "example")``` produces: ```"body": "{\"jobId\":\"345\"}",```. Without the example, the JSON looks like ``` "body": "{"jobId":"345"}",```


matt
2017-06-18 07:09
That?s a bit weird, although this _seems_ familiar. Thanks for raising

beth
2017-06-18 22:09
eskimoquinn: I'm guessing it's because it uses the example header to determine the content type of the body, and your example suggests it's not json, so it's being encoded as a string.

eskimoquinn
2017-06-19 14:45
Yes confirm that to be true. I assumed that example would not actually control anything other than a display. Thanks!

jdbann
2017-06-22 13:48
has joined #general2

jdbann
2017-06-22 13:50
hi! just been sent over from the pact gitter

jdbann
2017-06-22 13:51
has anyone used pact with graphql? looking at setting my teams up but we?re migrating the api to graphql later in the year and don?t want to create a headache at a later date

rholshausen
2017-06-22 22:27
@jdbann as far as I understand, GraphQL uses HTTP so you could in theory use Pact. But my thoughts are that, as the schema is defined as part of the protocol, you don't need a contract test.

phil
2017-06-23 10:30
has joined #general2

phil
2017-06-23 10:32
Hi People. I've used the Pact Broker a few times in the past but never set one up. I've just asked for (and got) your free hosted pact server. I want to publish to it using 'scala pact'. Do you know if that is possible (I'm having problems setting up the credientials)

beth
2017-06-23 10:42
@rholshausen should be able to help you.

beth
2017-06-23 10:43
What is the issue?

phil
2017-06-23 10:55
Thanks for responding! It's a pretty simple issue: there doesn't appear to be a way using scala pact to specify credentials. I've looked at the manuals and quickly looked at the code. I wondered if anyone had any experience with this? At the moment I've just dropped back to using curl to push the files which works well enough

beth
2017-06-23 11:04
Ah, that is quite possible. The Scala pact stuff was written a while ago, and hasn't been updated as often or as recently as the other jvm code. It shouldn't be too hard to add though. Can you raise an issue in the repo?

phil
2017-06-23 11:06
I'll make a pull request first and then raise it


beth
2017-06-23 11:06
Thanks Phil! Even better.

phil
2017-06-23 11:06
What auth do you take?Basic Auth sucks but it is really simple.

beth
2017-06-23 11:08
Basic for now. We're just doing a JWT spike for an authentication service we're evaluating for use with the hosted broker.

beth
2017-06-23 11:08
Proper authentication is the first priority on our feature list.

phil
2017-06-23 11:09
Probably a good idea. Well thank you. Good luck with your JWT

beth
2017-06-23 11:10
Cheers.

fitzoh
2017-06-25 15:05
Is there an easy way to make a "read-only" view of a pact broker?

fitzoh
2017-06-25 15:06
I was thinking it'd be kind of a cool showcase if there was a publicly viewable pact broker which managed pacts for the pact ecosystem

fitzoh
2017-06-25 15:07
I should be able to go there to see the interactions between a `pact-broker` provider and a `pact-jvm` consumer

j03w
2017-06-26 01:32
has joined #general2

j03w
2017-06-26 01:34
hi folks, our broker has been returning 500 since this morning any ideas how we can debug this?

beth
2017-06-26 01:37
I'll have a look at it now.

beth
2017-06-26 01:38
Can you pm me your subdomain please?

beth
2017-06-26 01:51
Ok, should be fixed now.

beth
2017-06-26 01:58
Apologies, I got a bit overexcited deploying an authentication spike image.

fpelletier
2017-06-28 22:20
has joined #general2

fpelletier
2017-06-29 18:38
is it possible to modify the initial credentials?

rholshausen
2017-06-29 22:26
@fpelletier there is no self-service for credentials yet (we're working on it), but I'm sure @matt could help you out there

matt
2017-06-29 23:45
@fpelletier dm me privately and we'll sort you out


beth
2017-06-30 08:26
He's a looker, our Ron.

timothy.clifford
2017-07-02 23:26
_Lead QA_ :joy:

acooper106
2017-07-03 12:04
has joined #general2

mlk
2017-07-03 12:06
has joined #general2

beth
2017-07-04 03:46
Hey broker users, I'm looking at adding verification badges like this to the broker. Given that the badge would be accessed over the public internet, and you can't use basic auth in README markdown, would you consider it a privacy leak to access a badge without authentication?

abubics
2017-07-04 04:15
If all you?re leaking is a guid (or similar), I think it?s fine. (same leak as buildkite, which doesn?t mean it?s ok, but I also haven?t heard of any exploits)

fpelletier
2017-07-04 15:04
the documentation links for `pb:latest-provider-pacts` and `pb:latest-provider-pacts-with-tag` are broken :four: :zero: :four:

beth
2017-07-05 04:51
I probably haven't made them. Thanks for the reminder.

beth
2017-07-05 04:52
The documentation link shows whether or not a document actually exists at the given URL.


finkingma
2017-07-05 07:24
has joined #general2

mattcoder
2017-07-05 10:29
has joined #general2

mattcoder
2017-07-05 10:55
hey guys, great to join this group, i am stuggling with connecting dots with pactnet and pact broker, this is a cool place we can chat and meet with community poking this technology.

mattcoder
2017-07-05 10:56
:wink:

beth
2017-07-05 11:02
Hey Matt, happy to help out. Where are you getting stuck?

beth
2017-07-05 11:04
FYI, most of the core pact team lives in Australia, so if we are slow to respond, it's because we're asleep! But there should be some other people around who are awake if we aren't.

mattcoder
2017-07-05 11:15
Great to meet you Beth, i have an issue with connecting and post pact file to the pact broker

mattcoder
2017-07-05 11:17
the email i got from suggesting that using the curl command to post

mattcoder
2017-07-05 11:17
that is for linux but what about for microsoft platform

matt
2017-07-05 11:18
Hi Matt!

matt
2017-07-05 11:18
For reference, the APIs are documented here in case you haven?t seen https://github.com/pact-foundation/pact_broker/wiki/Publishing-and-retrieving-pacts

mattcoder
2017-07-05 11:18
hey matt, how are you doing

matt
2017-07-05 11:19
You?ll obviously need to transpose curl into `Invoke-WebRequest` or `Invoke-RestMethod` or similar

matt
2017-07-05 11:19
very well thanks - and you?

mattcoder
2017-07-05 11:19
oops, little strange with 2 matt greeting each other:-)

matt
2017-07-05 11:19
:slightly_smiling_face:

beth
2017-07-05 11:24
I believe there is a publish task in the pact net library.

mattcoder
2017-07-05 11:24
understood, using powershell script

beth
2017-07-05 11:24
Or you could have a play with the built in HAL browser.

matt
2017-07-05 11:26
I think something like this is what you want: ``` $JSON = Get-Content "path\to\pact.json" $response = Invoke-RestMethod -Uri "http://your-pact-broker/pacts/provider/A%20Provider/consumer/A%20Consumer/version/1.0.0" -Method Put -Body $JSON -ContentType "application/json" ```

beth
2017-07-05 11:27
I should add that to the docs somewhere.

matt
2017-07-05 11:28
I?ll see if I can get a working example here on a VM

beth
2017-07-05 11:35
Just pinged Neil to ask if there is a pact net task for publishing.

beth
2017-07-05 11:37
The publishing link for dot net here seems broken https://docs.pact.io/documentation/sharings_pacts.html

mattcoder
2017-07-05 11:37
@beth, yes, it is broken

beth
2017-07-05 11:37
It doesn't work on my phone anyway.

beth
2017-07-05 11:39
Will have a look at it tomorrow. Heading off now.

mattcoder
2017-07-05 11:40
thank you guy!!, truly appreciate your great response here

beth
2017-07-05 11:41
No problems.

matt
2017-07-05 11:56
@mattcoder here?s a working PoSH example:

matt
2017-07-05 11:56
``` $Headers = @{ Authorization = "Basic $([System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes("dXfltyFMgNOFZAxr8io9wJ37iUpY42M:O5AIZWxelWbLvqMd8PkAVycBJh2Psyg1")))" } $res = Invoke-WebRequest -Uri "https://test.pact.dius.com.au/pacts/provider/Animal%20Profile%20Service/consumer/Matching%20Service/version/1.0.0" -Headers $Headers -Method Put -InFile .\matching_service-animal_profile_service.json -ContentType "application/json" ```

matt
2017-07-05 11:57
Pact file to go with it

matt
2017-07-05 12:00
you can then assess the result object e.g. ` $res.StatusCode`

finkingma
2017-07-05 12:13
hey guys, I started playing around with the new pact broker. However I am having trouble getting the 'last verified' option confirmed. 1) I started with an empty broker. 2) published a new pact. 3) had it validated with my provider. Everything went great so far (shown that it was verified). 4) published a new version of the pact.

finkingma
2017-07-05 12:14
However, once I tried confirming the changed version. The warning symbol kept showing up

matt
2017-07-05 12:15
I actually had this issue the other day myself, hoping Beth can clarify what?s happening here!

matt
2017-07-05 12:16
You might be able to use the HAL browser to navigate to the verifications API and see what it has to say

finkingma
2017-07-05 12:20
when posting a verification result using postman, I get a normal 201 status code with a nice json response, but my pactbroker still shows the warning sign

matt
2017-07-05 12:21
I?m suspecting maybe it?s something to do with versions, perhaps we?ve verified _a_ version but not the latest or something?

finkingma
2017-07-05 12:23
ow you're right. I've got two versions now. But the response I get when publishing shows the old version

finkingma
2017-07-05 12:29
same for the pact versions btw. I publish verification results for generated pact version '2b6a47a161a4141e76940912794301f9272a4070' (which is my latest pact). However, in my response I get a different pact version '2ba1d0b6642f276aec8ed56230a8bc48cf54efed' (which is my initial pact).

matt
2017-07-05 12:30
hmmm intriguing

matt
2017-07-05 12:30
I don?t know the underlying model well enough to understand, we?ll have to wait for @beth

matt
2017-07-05 12:30
I also need to run I?m afraid, I need to get this fixed also so will report back any findings!

matt
2017-07-05 12:30
all the best :slightly_smiling_face:

finkingma
2017-07-05 12:30
sure np, thx for help so far

abubics
2017-07-05 12:31
I?ve had a similar problem with version numbers

abubics
2017-07-05 12:31
when someone posted a high semver version, then posting 1.0.0 again seemed like nothing was wrong, but never updated in any of the UI

abubics
2017-07-05 12:32
but that was for a pact latest version, not verification

beth
2017-07-05 20:09
Yup, it's designed that way. The "latest" version is calculated by the semver, not the time stamp, unless you configure it to use the time stamp.

beth
2017-07-05 20:11
That sounds like a bug. I'll have a look at it as soon as I can.

beth
2017-07-05 20:12
I have been considering changing the default however.

matt
2017-07-05 22:13
If you want a test case, the `test` broker has the same problem for the `billy->bobby` relationship :slightly_smiling_face:

beth
2017-07-05 22:13
i fixed it already. just deploying.

matt
2017-07-05 22:14
you?re a freak

beth
2017-07-05 22:15
i hate outstanding bugs in my code! fixed it in my pjs :stuck_out_tongue:

fpelletier
2017-07-05 22:15
@beth good thing, thank you!

matt
2017-07-05 22:15
The best way!

beth
2017-07-05 22:24
as a sweetener folks, you can beta test the new verification badges I've just added. Here's one from the http://test.pact.dius.com.au server: https://test.pact.dius.com.au/pacts/provider/Activity%20Service/consumer/Foo%20Web%20Client/latest/badge.svg




beth
2017-07-05 22:27
And if you only want to see the consumer or provider name because you already know who *you* are, you can add `label=consumer` or `label=provider`: https://test.pact.dius.com.au/pacts/provider/Activity%20Service/consumer/Foo%20Web%20Client/latest/badge.svg?label=consumer


beth
2017-07-05 22:27
Or you can use both params to only have the consumer or provider initials.

beth
2017-07-05 22:28
Try it out and let me know what you think.

matt
2017-07-05 22:28
Is there a way to just check the status of all verifications for a single consumer i.e. ?pact|verified? implying all providers for the current consumer have been verified?

beth
2017-07-05 22:29
I was trying to work out the logic for that, and it became so complicated, I started with the simple pact status first.

beth
2017-07-05 22:30
If we can work out the logic, then I can easily add them. The problem is, there's no way of knowing which "latest" pact is the one that is the important one. Latest untagged? Latest master?

fpelletier
2017-07-05 22:30
simple question, does PactNet have the capability to publish a pact to a given pact broker?

beth
2017-07-05 22:30
I suspect not. I couldn't find it.

beth
2017-07-05 22:31
I only had a quick look last night on my phone though. Let me check if Neil has gotten back to me (he's one of the pact net authors)

matt
2017-07-05 22:31
@fpelletier see https://pactbroker.slack.com/archives/C47D4FGPR/p1499255790852938 for an example publishing via PoSH

matt
2017-07-05 22:31
I tested last night on the test broker account and it worked

matt
2017-07-05 22:31
@matt pinned a message to this channel.

fpelletier
2017-07-05 22:31
that would be a neat feature :slightly_smiling_face:

matt
2017-07-05 22:32
@matt pinned a message to this channel.

beth
2017-07-05 22:32
No reply from Neil yet, I'll let you know when he does. If there isn't one, we'll raise an issue and get it done.

matt
2017-07-05 22:32
It?s a pretty simple API, for a .NET superstar it shouldn?t take too long - PR?s are welcome :slightly_smiling_face:

matt
2017-07-05 22:33
With a cursory look at the code base, I don?t think publishing is supported

fpelletier
2017-07-05 22:33
we're currently exploring our testing strategies for our SaaS project

fpelletier
2017-07-05 22:33
Pact seems neat for our current needs

fpelletier
2017-07-05 22:34
thanks for the quick feedback :slightly_smiling_face:

matt
2017-07-05 22:34
You?re most welcome. Is it just a .NET project or do you have other languages also?


fpelletier
2017-07-05 22:37
@matt we're trying to restrain ourselves to supported M$ techs, but it doesn't mean that we will not go with other options if the .NET library is not good enough

matt
2017-07-05 22:38
OK. So all of the services you?ll be testing are in a single language, that will be helpful to know.

matt
2017-07-05 22:39
Woah - when did Pact NET become 2.0 compliant @beth ?? That?s awesome

beth
2017-07-05 22:39
Just the other day.

matt
2017-07-05 22:39
That?s amazing!

matt
2017-07-05 22:39
We should update the docs at http://docs.pact.io

fpelletier
2017-07-05 22:39
we don't have any implemented microservices yet, but sooner or later yeah

fpelletier
2017-07-05 22:40
I'm doing a proof of concept that will be reviewed by my colleagues

fpelletier
2017-07-05 22:41
probably driven by a .NET core stack

matt
2017-07-05 22:41
gotcha. Any JS/other front-ends that might consumer those services?

abubics
2017-07-05 23:38
it?s not a behaviour problem, it was just confusing . . . a warning that I?m doing something dumb might be all that?s needed :stuck_out_tongue:

beth
2017-07-05 23:47
Hm. I'll have a think about it.

abubics
2017-07-05 23:48
no rush, I think . . . although I don?t know how often it bites people

beth
2017-07-05 23:49
Someone else has mentioned it before. I think it mostly bites people when they're testing it, not irl.

beth
2017-07-05 23:51
I've been considering removing all restrictions on the version format, and just sorting by date.

beth
2017-07-05 23:51
Which is currently available, it's just not the default.

abubics
2017-07-05 23:56
that might be a better default for iteration-0 work, but maybe less good the rest of the time . . .

abubics
2017-07-05 23:57
or maybe working on backwards compat isn?t the normal use case for anyone :stuck_out_tongue:

abubics
2017-07-05 23:57
even though it was a significant design decision

beth
2017-07-06 00:02
99% of the time, I imagine the latest sem version will be the most recently published

beth
2017-07-06 00:03
And would be less confusing.

beth
2017-07-06 00:04
If you go backwards with your sem ver, you've probably made a mistake, and you want the most recent one anyway.

abubics
2017-07-06 00:11
totes

thadir
2017-07-06 07:43
wow, that looks great

thadir
2017-07-06 07:46
beth: This could also be a way to make the build cycle for java apps to go round. And also make sure a consumer validates the Provider (in a build agent or somting like that).

mattcoder
2017-07-06 08:02
@matt, i run the ps

mattcoder
2017-07-06 08:02
$Headers = @{ Authorization = "Basic $([System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes('gzLoGGOFaNQrLtkXRMyfGKCrdJVzNH:SS7iSXHmV7iQYjFvtX6linbFFtf9Iwzh')))" } $response = Invoke-WebRequest -Uri 'https://arris.pact.dius.com.au/pacts/provider/api/consumer/consumer%20event/version/1.0.0' -Headers $Headers -Method Put -InFile .\consumer-event_api.json -ContentType 'application/json'

mattcoder
2017-07-06 08:02
in the format you sent me

mattcoder
2017-07-06 08:02
the passcode and id are correct

abubics
2017-07-06 08:03
mattcoder: Might want to put those credentials in env vars :wink:

mattcoder
2017-07-06 08:03
but the server return 401

mattcoder
2017-07-06 08:04
yep, i was just spiking

abubics
2017-07-06 08:04
I mean, more for ?public? chat :stuck_out_tongue:

mattcoder
2017-07-06 08:06
you mean i jsut hide the credential?

mattcoder
2017-07-06 08:06
from other viewers?

abubics
2017-07-06 08:06
maybe, up to you . . . I doubt there are any malicious users in here, but it?s good to have safe habits

beth
2017-07-06 08:07
What do you mean by the consumer validating the provider Martin?

mattcoder
2017-07-06 08:07
understood, btw, r u working for http://pact.dius.com?

abubics
2017-07-06 08:08
no, but I have made some sample projects

abubics
2017-07-06 08:08
nothing .net, sorry :slightly_smiling_face:

abubics
2017-07-06 08:10
hm, I only get 404s for your path

abubics
2017-07-06 08:10
and you have no uploaded pacts yet?

mattcoder
2017-07-06 08:11
not a problem at all, great reminding though, matt sent me the cmdlet that is with the credential he is owning, so i wud assume thiis is safe, but you right, better be careful;-)

mattcoder
2017-07-06 08:12
no, nothings there

abubics
2017-07-06 08:13
I have to go, but I definitely get a 404 from ``` curl "https://$user:$pass@arris.pact.dius.com.au/pacts/provider/api/consumer/consumer%20event/version/1.0.0" ``` , not 401

mattcoder
2017-07-06 08:13
thanks dude, that was a great help already

abubics
2017-07-06 08:13
401 suggests the creds aren?t getting through correctly

mattcoder
2017-07-06 08:14
401 not authorized

abubics
2017-07-06 08:15
you might want to not base64 encode the credentials

abubics
2017-07-06 08:17
you could also try putting the username and password in the url, as in my `curl`

abubics
2017-07-06 08:17
not the best approach, but should still work

mattcoder
2017-07-06 08:21
yep, jsut tried, same 401

abubics
2017-07-06 08:26
guess you?ll have to wait for a PoSh person to help :slightly_smiling_face: soz

thadir
2017-07-06 08:30
nvm. we already fixed this. Were still strugeling with the fact that in java you cant autmaticly trigger the provider to make sure the pact is fully verified. So were experimenting. I saw the badges and touch we could use this. But the badges is more for the status page of a project intended so it was a early no coffee moment for me.

beth
2017-07-06 08:44
Do the webhooks not work for the ci of the provider?

beth
2017-07-06 08:45
Why would it be different for Java than any other language?

matt
2017-07-06 08:45
Unfortunately there is no such option for `Invoke-WebRequest` @abubics, you need to either create a `Credential` object or manually construct the `Authorization` header as we?re doing here

matt
2017-07-06 08:45
Also, I will issue you a new set of creds later @mattcoder



abubics
2017-07-06 08:48
they?ve made it so clever it?s unusable ;D


matt
2017-07-06 08:53
@mattcoder I?ve DM?d you a new set of creds

matt
2017-07-06 09:24
FWIW I?ve published a pact to your broker using the below command. @mattcoder, please check your pact dashboard

matt
2017-07-06 09:24
for others, the magic looks like below: ``` $Headers = @{ Authorization = "Basic $([System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes('YOURUSERNAME:YOURPASSWORD')))" } $response = Invoke-WebRequest -Uri 'https://YOURHOST.pact.dius.com.au/pacts/provider/YOUR%20PROVIDER/consumer/YOUR%20CONSUMER/version/1.0.0' -Headers $Headers -Method Put -InFile ./pact.json -ContentType 'application/json' ```

matt
2017-07-06 09:25
It?s _really_ important that the provider and consumer in the path match those in the pact files (but of course converted to URL friendly values)

beth
2017-07-06 09:26
Mwah ha ha, yes, I put in some very strict validation, otherwise it would be a mess.

matt
2017-07-06 09:26
:slightly_smiling_face:

finkingma
2017-07-06 10:10
neat job on the quick fix, publishing new verifications work like a charm


finkingma
2017-07-06 10:14
btw, is there a way to get the badge for specific tags as well? I tried using using https://XXXX.pact.dius.com.au/pacts/provider/MapMakerApi/consumer/ExploratoryTestingGame/latest/prod/badge.svg but that didn't work. Would be great if we could see if specific latest tags would be verified

beth
2017-07-06 10:14
It's next on my list.

beth
2017-07-06 10:16
Then will think about logic for a "whole provider/consumer" status.

finkingma
2017-07-06 10:16
awesome! And if its not verified, the badge shows 'unknown' text.

beth
2017-07-06 10:17
Wondering whether it's useful to put the "3 days ago" text that is shown on the index page, or to just keep it simple.

beth
2017-07-06 10:17
Yes. The verification status is "unknown". Is that unhelpful?

beth
2017-07-06 10:18
I used never, failed, verified and unknown. But happy to take suggestions for improvements.

finkingma
2017-07-06 10:19
I'd expect something like 'changed' or something. Gives more info about what action is required from team

beth
2017-07-06 10:19
"stale" is another option

finkingma
2017-07-06 10:19
also its more in line with the warning message on the index page

beth
2017-07-06 10:19
Good point.

finkingma
2017-07-06 10:20
ow and personally I would prefer the badge without the days


beth
2017-07-07 01:02
@ I've also added the /latest-untagged and latest/tag badges.

beth
2017-07-07 01:03
New feature announcement - if you're using tags, there is now an endpoint to retrieve the latest untagged pact. The url is `/pacts/provider/PROVIDER/consumer/CONSUMER/latest-untagged`

mattfaries
2017-07-07 03:07
has joined #general2

beth
2017-07-07 03:49
Welcome another person called matt, @mattfaries

beth
2017-07-07 03:50
@mattcoder Neil, the main http://pact.net maintainer says there is no .net code for publishing, however, he points people to this script that he wrote: https://gist.github.com/neilcampbell/bc1fb7d409425894ece0

mattfaries
2017-07-07 03:50
Thanks @beth

travi
2017-07-07 04:15
so many matts :slightly_smiling_face:

timothy.clifford
2017-07-07 04:33
Might have to change my name...

beth
2017-07-07 04:33
'Mind if we call you "Matt" to keep it clear?'

timothy.clifford
2017-07-07 04:37
I assumed we already were

finkingma
2017-07-07 07:25
thx @beth works like a charm.!

beth
2017-07-07 07:29
Glad you like it. It was a fun little piece to write. It's using http://shields.io behind the scenes to dynamically create the badges, but we might stand up our own shields server if required.

fitzoh
2017-07-10 03:20
@beth and @matt , I've got a sort of complicated use case if you guys want to hear it


fitzoh
2017-07-10 03:21
So we've got a monolith we've been working on untangling for a while that has a bunch of logical services in it

fitzoh
2017-07-10 03:22
and a couple services which have been split out and are now deployed separately

fitzoh
2017-07-10 03:22
and we have pact tests between the logical services and the microservices

fitzoh
2017-07-10 03:23
this makes tagging a little difficult

fitzoh
2017-07-10 03:23
because when we deploy the monolith, we're deploying a bunch of services instead of just one

fitzoh
2017-07-10 03:24
so we would need to maintain a manual list of all of the services contained within that deployment, and then tag all of those on a deploy

fitzoh
2017-07-10 03:24
I've got a workaround, but it's janky

fitzoh
2017-07-10 03:24
we use a naming convention for all of our pacticipants

fitzoh
2017-07-10 03:25
it's either `microservice-name`, or `monolith_logical-service-name`

fitzoh
2017-07-10 03:26
and the deploy job kicks off a parameterized job and passes in either `microservice-name` or `monolith`, then a gradle task parses that, fetches every paticipant from the broker, filters for ones that match the service name/prefix, and then tags all of them

fitzoh
2017-07-10 03:27
not sure if hierarchical/linked pacticipants are common/something you should necessarily design around, but thought you might be interested

beth
2017-07-10 03:29
Thanks for sharing your usecase @fitzoh. We always like to hear how the broker is being used in the wild to work out what features to build. People always use things in a way you'd never expect, and it's kind of delightful to hear about.

beth
2017-07-10 03:29
If you don't mind, I'll copy that it an issue for our list of future feature ideas.

fitzoh
2017-07-10 03:29
go for it

beth
2017-07-10 03:30
At one stage, I wondered about adding pacticipant tags.

beth
2017-07-10 03:30
would that help you at all?

fitzoh
2017-07-10 03:31
potentially? would tagging a service essentially mean that it's an alias of the tag?

beth
2017-07-10 03:32
Hmm... no.

beth
2017-07-10 03:33
You could tag a pacticipant with an arbitrary string, and then retrieve them by that string.

fitzoh
2017-07-10 03:33
I think I meant the same thing :stuck_out_tongue:

beth
2017-07-10 03:33
Like "get me all the pacticipants tagged "ios""

fitzoh
2017-07-10 03:33
more or less

beth
2017-07-10 03:34
Would being able to say "get me the services tagged 'microservice'" help?

fitzoh
2017-07-10 03:34
yeah, I think that would cover it

beth
2017-07-10 03:35
I do wish I'd called "tags" "labels" instead, as I think it would have been less confusing with git tags.

mattcoder
2017-07-10 03:36
thank you Matt and Beth, all are works out just like magic:-)

fitzoh
2017-07-10 03:36
tags still makes sense for individual pact files

fitzoh
2017-07-10 03:37
we're treating them exactly like we're treating docker tags

fitzoh
2017-07-10 03:37
when we deploy to `stage`, we tag that docker image as `stage` and add a `stage` tag to the corresponding pact files

fitzoh
2017-07-10 03:37
and so on for all our environments

beth
2017-07-10 03:40
Perfect!

beth
2017-07-10 03:40
That's exactly how I'd hoped it would be used.


fitzoh
2017-07-10 03:41
hmm... maybe it would make more sense to have tags for pacts and labels for consumers?

fitzoh
2017-07-10 03:42
I feel like the use cases are probably different enough for the two that it might make sense to use different names

beth
2017-07-10 03:50
A fair point.

beth
2017-07-10 03:50
Less confusing in terms of the functionality.

beth
2017-07-10 03:51
I've updated the issue with "label" instead of "tag"


thadir
2017-07-10 09:27
Were slowly ramping up our usage of the pact broker. And as usual im loving it. But i see a slight ui improvement we could use. You can go to the network graph of an pact. And thats great and all but i would also love to have a filter or somting of witch patcht versions there are and stuff like that. Now its a nice flow diagram but its quite quick confuluded.

beth
2017-07-10 09:42
You're very polite. It needs more than a slight improvement.

beth
2017-07-10 09:42
It's on our list of things to improve.

beth
2017-07-10 09:43
Can you explain more about how you'd like to filter them?

beth
2017-07-10 09:44
My original plan was for the selected service to be in the centre, and then show you all the services it used. Then, as you selected each other service, it would become the centre one.

beth
2017-07-10 09:44
Unfortunately my js skills/time ran out before I could make that happen.

beth
2017-07-10 09:46
We've got some extra people on the team now, with more UI foo than I have, who will be putting some polish on the whole thing.

ngbrown
2017-07-11 04:49
has joined #general2

thadir
2017-07-11 12:26
@beth ill dm you a few things somere this weak, (with some screen shots and ui ideas)

matt
2017-07-11 21:15
that?d be awesome, thanks @thadir!

thadir
2017-07-12 08:16
@matt its in our own selfish interest if we give good input you can get swayed to do it in a way we prefere :wink:.

matt
2017-07-12 08:20
it?s a win win :smile:

matt
2017-07-12 08:20
and pretty much, yes

finkingma
2017-07-12 14:57
was just wondering something: the homepage of the pact broker now shows the latest published / last verified status for this pact, regardless of tags. Is there also a way to see if the latest prod version is still verified? Besides badges :slightly_smiling_face: I'm currently using the broker just in my own personal project, but while working on a feature I kinda miss that information on the homepage of the broker

beth
2017-07-13 00:15
There isn't yet because I didn't know what information would be most useful.

beth
2017-07-13 00:16
And the tags might differ per project.

beth
2017-07-13 00:16
I think we need to add some config

kunwardeep
2017-07-13 03:44
has joined #general2

kunwardeep
2017-07-13 04:05
Just curious about the usage of PACTs . Given that its contract testing... how do we test the contract between the app and the db(s3 to sql). Or do we use other strategies for it

rholshausen
2017-07-13 04:07
@kunwardeep I wouldn't test the contract between an app and a data store. But I have tested the contract via a data store (Dynamodb) where one service wrote a document and another then consumed it.

kunwardeep
2017-07-13 04:51
so does that mean that you mocked the dynamo layer somehow or wrote and read from an actual db?

rholshausen
2017-07-13 06:16
On the provider side, we got the provider to write to the DB and then generated the pact from that. On the consumer side, the Pact test populated the DB from the pact file and invoked the consumer to read it.

kunwardeep
2017-07-13 07:04
:thumbsup:

kunwardeep
2017-07-14 00:35
Can some one point me in the direction of some documentation regarding writing a new implementation of PACT?

beth
2017-07-14 00:56
kunwardeep: Hopefully we can, which language are you using?

kunwardeep
2017-07-14 01:09
elm for front end and ruby for back end

beth
2017-07-14 01:11
So you'll want the javascript docs here: https://docs.pact.io/documentation/javascript.html


kunwardeep
2017-07-14 01:19
elm compiles into javascript but is not used the same way as javascript(when making api call)

kunwardeep
2017-07-14 01:19
so was wondering if there are any docs as such to create a new pact library

beth
2017-07-14 01:20
Ah! Sorry, I misunderstood you.



kunwardeep
2017-07-14 01:21
Perfect :thumbsup:

beth
2017-07-14 23:10
@kunwardeep I realised after I'd sent you that link that the guidelines were heavily out of date. I've done a major re-write of them. Can you have another look please?

matt
2017-07-15 07:37
For those on Windows, Pact .NET just released an update to publish pacts via the library: https://github.com/SEEK-Jobs/pact-net#publishing-pacts-to-a-broker

matt
2017-07-15 07:37
:point_up: @mattcoder


kunwardeep
2017-07-16 23:41
sure

kunwardeep
2017-07-16 23:41
version 3 is the one we should be using...?

beth
2017-07-17 00:13
Not the spec, the implementation guidelines.


mattcoder
2017-07-18 03:00
@matt, what a speedy response for this request, thank you dude.

beth
2017-07-24 00:44
@fitzoh I've added labels to pacticipants, and added the /pacticipants/label/{label} endpoint. I'm just trying to work out what templated URLs to add to the resource to make your use case work as simply as possible.

beth
2017-07-24 00:44
Do you use the HAL links to create your URLs, or do you hardcode them?

fitzoh
2017-07-24 13:43
That's awesome

fitzoh
2017-07-24 13:44
and hardcoded for the most part

fitzoh
2017-07-24 13:44
although most interactions are via `pact-jvm`

sheetal
2017-07-24 19:28
has joined #general2

beth
2017-07-24 22:13
So if we added these calls to pact jvm, it would be useful?

shenahas
2017-07-26 22:57
has joined #general2

shenahas
2017-07-26 23:02
need some help on multiple provider version support in PACT broker

shenahas
2017-07-26 23:04
I am using JUnit for generating Pacts and Pacts maven plugin to post the pact into pact broker. I am using below plugin Configuration.While Consumenr pact is getting uploaded in broker, I am able to see only single entry of consumer pact of version 2.0. Eirlier I have uploaded version 1.0 eirlier, which is not present in the UI. Is there any way to see the multiple version of same provider pact in HAL browser and get different version of PACTS by Https GET request? Currently I am getting only latest consumenr pact version by http://your-pact-broker/pacts/provider/PROVIDER/consumer/CONSUMER/latest Please provide some info regurding this and let me know if you need any informaiton.

shenahas
2017-07-26 23:05
posted same question here <https://stackoverflow.com/questions/45338491/multiple-pact-version-support-from-pact-broker>

beth
2017-07-26 23:22
I have answered on stackoverflow.

shenahas
2017-07-28 21:48
Thanks a lot Beth , It really helps.

king-smith
2017-08-01 00:05
has joined #general2

prudhvi
2017-08-01 14:00
has joined #general2

kale.mcnaney
2017-08-02 22:12
has joined #general2

kale.mcnaney
2017-08-02 22:15
need some help. just got beta access but my host is 503ing https://goodwaygroup.pact.dius.com.au/

kale.mcnaney
2017-08-02 22:15
thanks!

matt
2017-08-02 22:15
Hi @kale.mcnaney, i?ll take a look now

kale.mcnaney
2017-08-02 22:16
ty, @matt!

mouser
2017-08-02 22:30
we may be experiencing a similar issue?


mouser
2017-08-02 22:30
Getting a ?Service Unavailable: Back-end server is at capacity? error when trying to fetch PACTs from the broker

matt
2017-08-02 22:32
On it team - looks like a hiccup with the AWS stack. Shouldn?t be too long

matt
2017-08-02 22:32
Also - my sincere apologies!

matt
2017-08-02 22:35
There is a small DNS change coming your way, TTL on the main load balancer is 60s so things should be coming back up shortly

mouser
2017-08-02 22:42
:thumbsup:

matt
2017-08-02 22:43
I?m still seeing some timeouts so bare with me

matt
2017-08-02 23:04
System is stabilising folks, please send any feedback or issues if you have any new issues. We?ll continue to monitor progress throughout the morning

matt
2017-08-02 23:05
thanks for your patience :pray:

mouser
2017-08-02 23:10
thanks matt

mouser
2017-08-02 23:17
all looking good from our perspective - thanks for getting onto it so quickly @matt!

matt
2017-08-03 00:03
excellent - no worries!

kale.mcnaney
2017-08-03 12:10
all good here as well. thanks @matt

matt
2017-08-03 13:37
For what it?s worth, we?re having a retro on this on Monday and we?ll probably look to re-architecture some of the system as a result. We?ve had a lot more customers join the platform and we need to work through some peculiarities with Kubernetes that underlined the problem.

shenahas
2017-08-04 01:40
HI Beth, I am facing issue while connecting with dockerized pact-broker to non-dockerized postgresql. I have raised a question to https://stackoverflow.com/questions/45496934/pactbroker-docker-image-connection-issue-with-non-dockerized-postgresql Please answer if possible

beth
2017-08-04 02:01
Sure, will have a look as soon as I can. I always use a non docker postgres installation, so there should be no problem.

gareth
2017-08-07 01:28
has joined #general2

fergusstrange
2017-08-08 19:30
has joined #general2

fergusstrange
2017-08-08 19:34
Hey from the :uk: all :wave:

bangn
2017-08-11 01:13
has joined #general2

beth
2017-08-11 02:07
Hey everyone. Just letting you know that things have been a bit quiet on the feature development as @matt and I have been working out on client sites, but we haven't forgotten about you all!

beth
2017-08-11 02:08
We've selected a provider for implementing our social logon feature, and it will be the next thing we implement.

beth
2017-08-11 02:09
The first two 3rd party authentication providers will most likely be github and google.

matt
2017-08-11 06:54
Yep! And we?re also going to be rolling out some platform changes in the background over the coming weeks. One will be going through this evening to improve stability in performance and throughput

matt
2017-08-11 07:36
Change has gone out successfully, you may have noticed a couple of blips on your radars as containers were shuffled about, but there is now a bit more capacity in the cluster which should hopefully create more consistent performance

beth
2017-08-11 07:36
:raised_hands:

cormac
2017-08-15 14:41
has joined #general2

v.lukoyanov
2017-08-15 15:08
has joined #general2

neil
2017-08-18 21:47
has joined #general2

beth
2017-08-22 07:28
Welcome @neil

shamilton
2017-08-30 13:11
has joined #general2

acooper106
2017-08-30 18:19
hello

acooper106
2017-08-30 18:24
I am trying to publish to a local pack broker with @pact-foundation/pact-node@4.12.0. When I run the publishPacts function I am not getting a pact on the broker. It does work when I publish with pact-jvm using mvn pact:publish. Does anyone know how to fix this issue? Also, there are no errors in the terminal.

eskimoquinn
2017-08-30 19:32
Hello here, I am wondering if there is a way to manipulate the request when using the pact-provider-proxy https://github.com/pact-foundation/pact-provider-proxy

eskimoquinn
2017-08-30 19:33
I'd like to modify the request like this document suggests, but I do not think it is possible when using the provider proxy: https://github.com/realestate-com-au/pact/wiki/Verifying-pacts#modifying-the-request-with-live-data

jeffutter
2017-08-30 22:33
has joined #general2

shamilton
2017-08-31 15:06
:wave: hi all. i'm very excited at the potential of Pact for our project.

shamilton
2017-08-31 15:08
anybody know of others writing microservices in Elixir? our first Provider is being written in Elixir and the Consumer is a Ruby app.

matt
2017-08-31 21:08
Welcome!

matt
2017-08-31 21:09
I've heard rumors of an old colleague here in Melbourne, I'll look into it. It's doable if you use the provider verifier docker container

shamilton
2017-08-31 22:33
thanks @matt yeah we saw the provider verifier via Docker. definitely something we'll pursue at first. after that just wondering if there's an active project or any other contributors we can work with.

shamilton
2017-08-31 22:34
...work with on a native Elixir lib.

matt
2017-08-31 23:55
Great! I'm not sure where the last group got to, but if not far we'd be happy to see you up a repo on pact-foundation to get it started and a hangouts to take you through our recommended approach

kunwardeep
2017-09-01 00:55
@shamilton @matt I'd like to see that happen . We do have a fair few services in elixir, but tests are still end2end.

matt
2017-09-01 00:57
Hello! Well you guys were who I was going to approach. Shall we organise a hangouts next week some time and see what we can come up with? @kunwardeep @shamilton

kunwardeep
2017-09-01 00:59
sure @matt.. preferably during business hours . I am not an elixir person.. but willing to learn it

matt
2017-09-02 06:17
Hi @acooper106, if you?re not getting any output at all it?s going to be hard to diagnose! As a starting point, could you please raise an issue on the `pact-node` (https://github.com/pact-foundation/pact-node/) javascript repository and we can track it there?

matt
2017-09-02 06:18
IIRC you are on Windows, so perhaps it?s a compatibility issue (we?re aware of some Windows issues, the cause of them and are working to resolve)

matt
2017-09-02 06:18
As discussed last time, perhaps a simple work around for the time being is to publish using the PoSH script (https://pactbroker.slack.com/archives/C47D4FGPR/p1499255790852938)

beth
2017-09-02 07:16
Yes, absolutely. You can use rack middleware and wrap it around the provider.

beth
2017-09-02 07:18
Oh, I see what you mean. The app is abstracted. You can set up the proxy yourself if you want to verify a running app. I'll send you some sample code.


beth
2017-09-02 09:48
Note the check to ensure that the original value of the header matches the expected format.

beth
2017-09-02 09:49
Are you sure you want to use the provider-proxy? If you have a ruby app, you'd be better off using the normal provider verifier, and if you don't have a ruby app, you'd be better off using the pact provider verifier https://github.com/pact-foundation/pact-provider-verifier

beth
2017-09-05 05:56
who is using webhooks? I'm adding webhook statuses to the index page, and I'd like some beta users to give feedback.

abubics
2017-09-05 05:56
will be soon (starting in the next week or two)

rholshausen
2017-09-05 05:58
@mouser, you up for being a guinea pig?

tjones
2017-09-05 05:58
has joined #general2

mouser
2017-09-05 06:13
Of course, where do I sign up? :grin:

beth
2017-09-05 06:13
I'll ping you when I've pushed the feature @mouser

mouser
2017-09-05 06:14
Excellent - thanks @beth

thadir
2017-09-05 08:23
@beth were not sure yet, i havent had the chance to look at them. But were thinking of using it to use it when a consuemr publishes a contract to triger the provider.

beth
2017-09-05 08:24
That's their purpose!

thadir
2017-09-05 08:34
@beth, atm im realy focusing on getting the teams to use pact. Ill look in to it but my time is a bit close :slightly_smiling_face: but ill will try

fergusstrange
2017-09-05 10:06
@beth we are using and happy to feedback

shamilton
2017-09-05 12:41
sorry just saw this. yeah i could do a hangout. this week is a little crazy. we got Elixir conf. in Seattle

shamilton
2017-09-05 12:44
i'll be available again Sept. 14, or 15. though I could squeeze in a quick call today.

shamilton
2017-09-05 12:44
@matt @kunwardeep where you located? i'm in Texas.

kunwardeep
2017-09-05 12:56
i am in Melbourne... and i think so is @matt

shamilton
2017-09-05 13:11
ok. so about a 15 hour difference then. well i could do either late at night or early in the morning. i do have some coworkers that would like to join too.

shamilton
2017-09-05 13:13
any particular day you want to shoot for?

shashidesai
2017-09-06 19:15
I was curious to know how people are using the webhooks ? Is it possible to see some examples ?

kunwardeep
2017-09-07 00:47
has anyone had any experience in testing event/queue based system using some kind of contract based testing. The scenario is System A writes to a database/queue a job to be done. System B monitors this and if there is a new job, picks up the request and processes it. For us to test this we need an end 2 end system. But was wondering if some one had any experience in implementing some contact based testing for such a platform. The idea would be something similar as pact.

abubics
2017-09-07 00:49
I haven?t, personally, but @rholshausen has been talking about it a bunch recently

abubics
2017-09-07 00:50
Pact isn?t specifically for testing http interfaces, that?s just one transport that?s implemented

beth
2017-09-07 01:03
Ron is able to publish a blog post about this. We'll post it here when it's public.

gareth
2017-09-08 00:49
have you considered a pact emoji for buildkite? :wink:

rholshausen
2017-09-08 00:54
@beth :point_up:

beth
2017-09-09 10:34
Great idea @gareth


beth
2017-09-11 01:58
@shashidesai Webhook are used to kick of provider builds when a new version of a pact is published


beth
2017-09-11 02:01
@mouser @fergusstrange @abubics can you PM me your broker subdomains please?

mouser
2017-09-11 08:24
Ours is 'irexchange' @beth

beth
2017-09-11 10:53
I've updated your broker @mouser. All the webhooks now say "not run" because the amount of work to migrate the old data structure was not worth it, but they'll be accurate once you've triggered the next execution. @rholshausen

mouser
2017-09-11 21:13
Excellent - I?ll let you know how it goes!

thadir
2017-09-12 09:17
@beth how are the things going with the securety part? I still have one super user for em all, witch is a bit scary seeing some of my developers are a bit eager in there clean ujp.

beth
2017-09-12 09:59
Slowly :-( I'm out on client site, so I only get time to work on the broker on the train.

beth
2017-09-12 10:06
I've just been doing little things in dribs and drabs.

matt
2017-09-12 11:13
@thadir would having multiple brokers help you as a shorter term solution? We'd happily create you others if that's the case (I know, it's not ideal)

thadir
2017-09-12 14:16
@matt nah, its more like a thing that process wise is a problem. ATM working on some mock inprovmetns for the UI

abubics
2017-09-13 00:50
feedback on provider verifications: `pact-jvm-provider-gradle` automatically verifies (if using broker pactfiles), so I didn?t even have to change anything :stuck_out_tongue:

rholshausen
2017-09-13 01:06
So what's the feedback @abubics?

abubics
2017-09-13 01:09
um . . . it was exceedingly easy to implement :thinking_face:

abubics
2017-09-13 01:10
there is a risk of people running `pactVerify` with local code changes, and the CI build still being broken . . . but that?s kinda always a risk

abubics
2017-09-13 01:10
although, it?s hard to tell how to avoid it now

rholshausen
2017-09-13 01:12
I set the version to 0 in the build, so the local builds will always be the oldest. Bit of a hack, but it seems to work

rholshausen
2017-09-13 01:12
Then CI sets the version to the build number

abubics
2017-09-13 02:09
ah . . . guess I?ll hit more interesting cases soon . . . looking at versions, the only one I can find is `1-SNAPSHOT` :stuck_out_tongue: maybe something to fix

beth
2017-09-13 02:14
Ron, I'm moving to a timebased approach, because the ordering by version seems to cause more problems than it solves. So this approach might break.

beth
2017-09-13 02:17
Andras, I recommend using some flag based on an env variable that is only set on the ci

beth
2017-09-13 02:18
Would it make more sense to do have a separate "publish verification" task?

beth
2017-09-13 02:18
That only ran on ci? The way the pact are done?

abubics
2017-09-13 02:18
yep, I think that?s what we?ve got on CI, I?m not sure where the `SNAPSHOT` is coming from on local, but I?ll hunt it down soon


abubics
2017-09-13 02:18
maybe

beth
2017-09-13 02:18
The verification could be written to a file in between.

beth
2017-09-13 02:20
@rholshausen what do you think? Two step process on the consumer and the provider?

abubics
2017-09-13 02:20
that?s kinda what I was expecting, mostly from the 2-step consumer side

abubics
2017-09-13 02:21
but that?s a legacy expectation :wink:

rholshausen
2017-09-13 04:03
Hmm, I've just only finished implementing the verification stuff, and you want to change it :disappointed:

beth
2017-09-13 04:11
I know. I'm a bad person.

abubics
2017-09-13 04:14
I don?t think semver should be a problem . . . but highlighting when people may be causing inadvertent issues might go a long way

beth
2017-09-13 04:14
Having a separate publish task would definitely make the behaviour clearer.

beth
2017-09-13 04:17
The asymmetry of the configuration bothered me when I wrote it, but for some reason it didn't occur to me to make a task for it in the ruby.

beth
2017-09-13 04:18
If the verification was written to a file in between the tests and the publication, it would need the url to post it to to be stored as well, as this is dynamic.

beth
2017-09-13 04:19
The task would also have to have access to the credentials set in the code that fetched the pact.

beth
2017-09-13 04:19
It does get a bit trickier, because all that context would need to be maintained

abubics
2017-09-14 04:29
yeah, auto (in the same task) is the easiest for configuration, as long as everything is following conventino

abubics
2017-09-14 04:50
Is there a way to list the pact versions of a consumer-provider pair in the broker? I can?t find anything in the HAL browser

abubics
2017-09-14 04:51
(I was having an issue where `1-SNAPSHOT` was uploaded and verified, so I couldn?t see any of the `0.0.740` etc versions)

abubics
2017-09-14 04:54
right, so I can manually type ``` https://<account>.http://pact.dius.com.au/hal-browser/browser.html#https://<account>.pact.dius.com.au/pacts/provider/<provider>/consumer/<consumer>/versions ``` but I couldn?t find a link to that through the HAL browser

abubics
2017-09-14 04:54
good enough for now


rholshausen
2017-09-14 04:56
Ok, so the `versions` is missing from the links

rholshausen
2017-09-14 04:56
Maybe raise an issue

abubics
2017-09-14 04:56
no, it?s in the consumer page, I just must have missed it

beth
2017-09-14 05:28
I'll put an "all pact versions" relation on the pact resource if it's not there already

d.van.dijk
2017-09-18 09:39
has joined #general2

d.van.dijk
2017-09-18 09:53
I have a unittest that runs with PactRunner. When I use "failIfNoPactsFound = false", I get java.lang.Exception: Did not find any pact files for provider security-api-system-users When I use "@IgnoreNoPactsToVerify", I get au.com.dius.pact.provider.junit.loader.NoPactsFoundException: No consumer pacts were found for provider <provider> and tag 'null'. (URL []) Only when I use both, I get the desired result WARN PactRunner uopId= - Did not find any pact files for provider

d.van.dijk
2017-09-18 13:46
By the way. This happens on pact-jvm-provider-junit_2.11 3.5.3, pact-jvm-provider-junit_2.11 3.5.5 and pact-jvm-provider-junit_2.12 3.5.5

tom
2017-09-18 22:58
has joined #general2

beth
2017-09-18 23:05
@rholshausen will be able to help you with that.

beth
2017-09-18 23:05
@abubics I've added "pb:all-pact-versions" to the pact resource

beth
2017-09-18 23:05
It's deployed

rholshausen
2017-09-18 23:09
@d.van.dijk I'll have a look, with the `@IgnoreNoPactsToVerify` annotation your test should not fail

beth
2017-09-18 23:32
@mouser @fergusstrange @abubics the webhook status feature has been deployed. You'll now see a "last run" time in the webhook status column. If the webhook fails, you'll be able to click through and find the logs from the failing webhook (there will be a link relation called "pb:error-logs")

beth
2017-09-18 23:33
One thing that's missing is some indication that a webhook did NOT run because the pact hadn't changed. Therefore, you may see that the last pact was published more recently than the webhook fired. I'm not sure how to show this, and would welcome feedback.

beth
2017-09-18 23:41
I'm thinking that the mouseover text could explain this.

kong
2017-09-19 01:59
has joined #general2

abubics
2017-09-19 02:20
bad news for us, I?m afraid . . . we?ve got internal-only IPs for TeamCity, so webhooks can?t even route :disappointed:

beth
2017-09-19 02:44
Bugger!

beth
2017-09-19 02:44
Is there some other communication channel?

abubics
2017-09-19 03:35
not easily . . . but this will lead to upgrading the (2+ year-) old internal broker, I hope

abubics
2017-09-19 04:30
you know what might be cool (if not difficult) . . . some visual indicator in the HTML pact page that shows if an interaction has changed (or been added) since the last version of a pact

beth
2017-09-19 04:45
You can see that in the hal browser currently, but not in the html view.

beth
2017-09-19 04:46
go into the hal browser, and then select the "pb:diff-previous-distinct" relation.

beth
2017-09-19 04:46
I like the HTML view idea though.


abubics
2017-09-19 04:52
ah cool . . . I was wondering what those links did :stuck_out_tongue: they didn?t show anything when we had the same pact uploaded 14 times :joy:

beth
2017-09-19 04:54
yeah, not much to show really.

beth
2017-09-19 04:54
the annoying thing is that pact jvm uses a lot of randomly generated data, so there's going to be a lot of noise.


abubics
2017-09-19 04:54
guess I?ll find out in a minute

matt
2017-09-19 04:55
You can avoid the random data though, you just need to make sure you supply the examples rather than rely on the Pact lib to do it



beth
2017-09-19 04:55
and anything based on the ruby impl doesn't use random vaulues.

beth
2017-09-19 04:55
so .net will be fine

abubics
2017-09-19 04:56
well, we?re in Scala- and JS-land, so . . . *shrugs*

alexei
2017-09-20 08:24
has joined #general2

alexei
2017-09-20 09:03
Hello! I have a problem with hosted (.au) Pact Broker. There are several PACTs published, the most of them working (seemingly) as intended. But one particular PACT doesn't get updated in Web UI when republishing. Response 200, everything in response looks just fine. Just changing the name of e.g. Provider with exactly the same data - everything works fine with it.


alexei
2017-09-20 09:09
It looks like the record dosen't not updated despite of this response that update was successful (200). Server side bug? Looking for your help, thanks.

alexei
2017-09-20 09:34
Update. https://grenke.pact.dius.com.au/pacts/provide/<provider>/consumer/<consumer>/versions - shows all the updates. But Web UI doesn't show the latest...

alexei
2017-09-20 09:43
Update 2. https://grenke.pact.dius.com.au/pacts/provide/<provider>/consumer/<consumer>/latest returns that wrong version back (what is definition of "latest"?) which is then shown in WebUI, and https://grenke.pact.dius.com.au/pacts/provide/<provider>/consumer/<consumer>/latest-untagged shows the latest-request version.

beth
2017-09-20 09:43
What versioning scheme are you using?

alexei
2017-09-20 09:43
there are tagged and untagged versions....

beth
2017-09-20 09:43
Semantic or git sha?

alexei
2017-09-20 09:44
x.y.z.f


beth
2017-09-20 09:44
I think it's because the semantic version gem is incorrectly parsing the version.

alexei
2017-09-20 09:45
Correction. While playing, the most versions are like x.y.z.f but some are just x.y.z

beth
2017-09-20 09:45
Someone submitted a PR to change the parsing, and it had unexpected consequences.

beth
2017-09-20 09:45
PM me your broker subdomain and I'll switch it to sort by date created.

beth
2017-09-20 09:51
Ok, try republishing now. It should order by date. You'll need to publish new versions as the existing versions already have an order assigned to them.

beth
2017-09-20 09:52
If you've just been messing around, delete the consumer, and all the pacts will be removed with it.

alexei
2017-09-20 09:59
Worked for the first request, but not for the consecutive....

alexei
2017-09-20 10:00
There is some more infos, and questions. Q. I could not figure out, what is the API call for publishing with a tag?

beth
2017-09-20 10:01
Check out the wiki

alexei
2017-09-20 10:01
I've just published a version 2.0.0.5 with a tag, then the same with a changed pact.

alexei
2017-09-20 10:01
Tried to find there, without success :slightly_smiling_face:

beth
2017-09-20 10:02
It's not really designed for republishing with the same number, however, it should still work, so I'll look into it.

beth
2017-09-20 10:02
Can you send me the instructions to recreate the issue, and I'll have a look at it as soon as I can (night time in Australia)


alexei
2017-09-20 10:05
:thumbsup: Yes, sure. I am using .NET Client and Postman in parallel. Hope to find out how to tag with Postman Reqs (to eliminate problems with the framework)

beth
2017-09-20 10:06
I've just sent you the link for tagging

alexei
2017-09-20 10:06
there are examples for Ruby (or of cause I can use .NET) but I still did not found right format for plain old HTTP Calls

alexei
2017-09-20 10:07
PUT .../pacts/provider/abc/consumer/cde/version/x.y.z/...?

alexei
2017-09-20 10:07
where does the tag goes

beth
2017-09-20 10:07
As an example, to tag Foo consumer version 2.3.0 as the production version, do a PUT to the resource /pacticipants/Foo/versions/2.3.0/tags/prod.

alexei
2017-09-20 10:07
aha...

alexei
2017-09-20 10:08
so it is a separate call?

alexei
2017-09-20 10:08
which goes on consumer, you mean...

alexei
2017-09-20 10:08
If it is, than I got semantic wrong

alexei
2017-09-20 10:09
I can then basically only tags consumer/version? (provider/version) combinations?

beth
2017-09-20 10:09
Yes. You tag an application version, not the pact directly

alexei
2017-09-20 10:09
My thought was about tagging a pact (consumer/provider/version)

alexei
2017-09-20 10:10
Oookay:)

beth
2017-09-20 10:10
Because the tag applies to all pacts of that version eg. Production, Master, Development

alexei
2017-09-20 10:10
That could be also the root cause of problems with WebUI

alexei
2017-09-20 10:12
> Note that the tag is actually placed on the consumer version resource, not the pact itself (conceptually, you are indicating that that particular version of the consumer application is a "prod" version, or a "feature-a" version). The URL structures, however, then allow you to retrieve pacts by the tags on their associated versions.

alexei
2017-09-20 10:13
I see. Those who can read have benefits :slightly_smiling_face:


w.everse
2017-09-21 06:03
has joined #general2

beth
2017-09-21 22:43
@alexei how did you go? Have you got the steps to recreate your issue worked out? Please raise an issue on the pact broker repository when you do.

alok.pandey
2017-09-22 08:08
has joined #general2

veganjenny
2017-09-23 01:35
has joined #general2

alok.pandey
2017-09-25 10:59
Hi evryone

alok.pandey
2017-09-25 11:01
i have my pact files ready.....i wanted to know what happens at provider side ?

alok.pandey
2017-09-25 11:02
pact file is ready means consumer side is done..


alok.pandey
2017-09-25 11:34
Hi @beth i need to publish my pact file to the free broker--- $res = Invoke-WebRequest -Uri "https://royalcyber.pact.dius.com.au/" -Method Put -C:\Users\user\Documents\WORKSPACE\microservice1\target\pacts\test_consumer-test_provider.json -ContentType "application/json" is it right or else what should i do?

alok.pandey
2017-09-25 11:35
i need to have some auth i think

beth
2017-09-25 11:35
There's a windows script for it in the pact net repo

alok.pandey
2017-09-25 11:36
ohk


beth
2017-09-25 11:38
Can I recommend you browse the pact docs site to get a feel for all the documentation? It won't take long, and it should answer most queries that will come up.

beth
2017-09-25 11:39
It useful having some new eyes over it to let us know what is missing or could be improved.

alok.pandey
2017-09-25 11:41
ohk @beth and Thanks .....i will resd whole docs first

alok.pandey
2017-09-25 11:41
*read


matt
2017-09-26 05:52
For the Java/JVM users out there, our very own @rholshausen just published a neat little article on contract testing serverless and async applications with Pact: https://dius.com.au/2017/09/22/contract-testing-serverless-and-asynchronous-applications/

alok.pandey
2017-09-26 14:59
Hi @beth i am trying to upload files to pact broker.... The remote server returned an error: (405) Method Not Allowed.....could u please tell the issue?

alok.pandey
2017-09-26 15:40
Sorry @beth it worked by using -usebasicparsing.

alok.pandey
2017-09-26 15:40
Thanks

kunwardeep
2017-09-27 00:23
can't wait for part 2 of this.

alexei
2017-09-28 10:15
Hi Beth, it is postponed, because we have unfortunately other problems with consumer test itself. My first impression after that day, I?ve used the broker is, that Broker API should not offer tags parameter for ?publish pact? operation at all, because it is designed, that tag is consumer-version related, and not pact related. Parameter in publishPact is then misleading. I?m afraid, I can go into it in depth in the next week at earliest.

jsilver
2017-09-28 22:11
has joined #general2

zerocooljs
2017-10-01 15:02
has joined #general2

beth
2017-10-02 04:15
Open the latest pact (or /latest-untagged or /latest/TAG) in your browser, and click on the badge icon to display the markdown to add to your README.

beth
2017-10-02 04:18
@alexei you are tagging the consumer version (ie. you are saying version 1.2.3 is the production version, or 3.4.5 is the master version) however, the tags are used for looking up the pacts. To get the pact for the latest production version between Foo and Bar, you use `/pacts/provider/Bar/consumer/Foo/latest/production`

beth
2017-10-02 04:21
The reason the version is tagged and not the pact is that 1. the tag "production" should apply to all pacts that belong to version "1.2.3" of the consumer. It doesn't make sense to have the production version of the pact with provider-1 being at version "1.2.3" and the production version of the pact with provider-2 being at version "4.5.6"

beth
2017-10-02 04:22
2. It allows you to tag provider versions as well, which is used when we want to indicate that a provider has been released to production. This will allow us to know whether a pact is compatible with the _production_ version of a provider, not just the development version.

mzacharska
2017-10-03 21:22
has joined #general2

alok.pandey
2017-10-04 11:30
hi guys ...how to set the provider states?

alok.pandey
2017-10-04 11:33
i am using maven plugin in the provider side so i have given my databse url in <stateChangeUrl>....so does the provider runs all the services in pact file with this url?

beth
2017-10-06 02:32
@alok.pandey did you get this working?

alok.pandey
2017-10-06 09:16
@beth yeah its working thanks again.....actually i have one doubt suppose we have to set up the datasource in the consumer side then what should we do?

beth
2017-10-09 03:14
Sorry, can you explain more @alok.pandey? I don't understand what you mean.

beth
2017-10-09 03:15
Do you mean, how to do you set up your data for the consumer side of the pact test? Just the way you normally would for any test.

beth
2017-10-09 03:16
It's best to test just the client code using pact ie. put all the code that makes the calls to the provider into one class, and just test that class. If you start using pact to test your entire consumer stack, you tend to get bloated and hard to maintain tests.

alok.pandey
2017-10-09 12:53
Yes i get it @beth very much informative....

alok.pandey
2017-10-09 12:53
Thanks

nic
2017-10-09 13:01
has joined #general2

nic
2017-10-09 13:02
quick request for help, I'm getting a 401 on my provider when I run rake pact:verify

nic
2017-10-09 13:03
I have env vars set for my username/password and can see them being passed into pact helper

nic
2017-10-09 13:03
if I copy the url it says its trying to access from the console into my browser it works fine


thadir
2017-10-09 13:10
@nic question is it maven based or other language in what lang is the provider?

nic
2017-10-09 13:14
thanks @thadir its ruby, don't worry I found it in the docs eventually! https://github.com/realestate-com-au/pact/wiki/Verifying-pacts#with-basic-auth

thadir
2017-10-09 13:15
np, most of the pact folks are from Australia so time zone is a thing here :wink:.

nic
2017-10-09 13:15
yeah realised that - thought I'd chuck it in anyway and eventually somebody would read it

thadir
2017-10-09 13:17
Welp im in a EU time zone but use mostly the Java + JavaScript so yeah cant help you a 100% but the docs help

beth
2017-10-09 20:26
Yeah, sorry @nic, we were all asleep. Thanks @thadir. Glad you found an answer. If you can't find something in the docs, please let us know so we can add it.

beth
2017-10-09 20:27
It seems it was hard to find @nic. Is there some way to make it easier to find?

thadir
2017-10-10 15:34
before I forget (we had a great discusion about contract testing here :)) and one question I could not answer was well when somone asked when will the "beta" period end and when will we switch to a subscription and what pricing model will be used. There were also some discussion how to handle contracts ouside the span of your controll. When you start making a public API, we like the idea of the HAL browser and the insight the broker gives us. But we do not like the idea of some unkown force breaking our builds.

alexei
2017-10-16 12:48
Using Pact .NET Framework (which contain Ruby HTTP/S Engine?), I got the error message, when retrieving the PACT File for Provider verification. ``` Error reading file from https://xxx.pact.dius.com.au/pacts/provider/yyyy/consumer/zzzz/latest SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed C:/pact-win32/lib/ruby/lib/ruby/2.2.0/net/http.rb:923:in `connect' ```

alexei
2017-10-16 12:49
with any https:// address

alexei
2017-10-16 12:50
please help to figure out, what the pact is going on?.

alexei
2017-10-16 12:51
uploading pact works fine.

alexei
2017-10-16 12:57
I found in pact-win32 ruby directory a ca-bundle.crt which is referenced by some config files of ruby, and which ist expired in 2015?.

alexei
2017-10-16 13:08
exchanged - nothing changed?.

alexei
2017-10-16 17:10
Solved: the environment blocked access to SSL certificates validation, Turned off SSL Certificate validation in Code for this to work. Probably an option (don?t check SSL Certificates for validity) for that could be helpful for some projects.

abubics
2017-10-16 22:31
don?t you ideally want the opposite of that? i.e. stop blocking cert validation

alexei
2017-10-17 09:01
@abubics I guess in many of test environments self-signed certificates are very common. Pact would not be able to work with the broker and (probably, did not check yet) internal https services this way.

beth
2017-10-17 09:04
@alexei glad you've fixed it, but I'm not sure why you've encountered this problem at this time. I wonder if it's a windows specific error. Is this the first time you've run this code on windows?

alexei
2017-10-17 17:15
no, it?s environment specific (I mean, restrictive firewalls here). Like if I execute - ?curl https://amazon.com? - SSL Certificate Error is returned. It is not very common for small companies, but could happen at large enterprises.

alexei
2017-10-17 17:17
I have the next question which is Pact related, but not PactBroker related.

alexei
2017-10-17 17:17
I have a pact which tells, that an array of objects is expected, size >1

alexei
2017-10-17 17:20
`MinType(new {id=type("abc")},2)`

alexei
2017-10-17 17:21
meaning, this response should match [ {id=?string?}, {id=?string2"},?] etc.

alexei
2017-10-17 17:26
in my ConsumerTest the mock is doesn?t generate concrete values, though, so that assertion: assert mockService.method().count > 1 fails (.count is 0)

alexei
2017-10-17 17:39
O_o actually pact file looks fine, hier are some snippets

alexei
2017-10-17 17:45
``` Body= new { entities = PactNet.Matchers.Match.MinType( new { properties = new { id = PactNet.Matchers.Match.Type("id"), description = PactNet.Matchers.Match.Type("desc") } }, 2) } ```

alexei
2017-10-17 17:46
Pact file: ``` "body": { "entities": [ { "properties": { "id": "id", "description": "desc" } }, { "properties": { "id": "id", "description": "desc" } } ] }, "matchingRules": { "$.body.entities": { "min": 2 }, "$.body.entities[*].*": { "match": "type" }, "$.body.entities[*].properties.id": { "match": "type" }, "$.body.entities[*].properties.description": { "match": "type" } } } ```

alexei
2017-10-17 17:48
actually expected, that ``` "entities": [ { "properties": { "id": "id", "description": "desc" } }, { "properties": { "id": "id", "description": "desc" } } ] } ``` will be returned by mock? Okay will try to debug a bit, ideas are welcomed. If I hardcore the exact two elements in Pact, then mock if returning them just fine.

eskimoquinn
2017-10-17 20:17
@beth was either my suggestion or your suggestion something that was ever implemented? If so can you point me to the version?

beth
2017-10-17 22:57
Can you log out the live body in your code? What do you get?

alexei
2017-10-18 12:25
Guess what. It wasn?t Pact Bug, it was a Pact feature! Response should have had another parameter, which I thought is not related to this pact, but it actually was! So that Consumer UnitTests failed with the right reason, perfect Pact job!

alexei
2017-10-18 12:29
The next hurdle. I want to UnitTest the Consumer method `doSmthWithServiceResponse()`, which looks reasonable at the moment. This method calls the Service (or Pact Mock in our case) and does a bit more with its response.

alexei
2017-10-18 12:31
Response has an ?entities?-array (above) - and the UnitTest fails, as ?postprocessing? of response requires that id-s (above) are different.

alexei
2017-10-18 12:33
so instead of ``` "entities": [ { "properties": { "id": "id", "description": "desc" } }, { "properties": { "id": "id", "description": "desc" } } ] } ``` I would need: ``` "entities": [ { "properties": { "id": "id1", "description": "desc" } }, { "properties": { "id": "id2", "description": "desc" } } ] } ``` to be returned. How (and if) I can implement that in Pact?

alexei
2017-10-18 12:36
Still for this same pact (type matching, no hardcoded values)

cornelia.zintl
2017-10-18 13:40
has joined #general2

alexei
2017-10-18 13:45
https://github.com/SEEK-Jobs/pact-net/issues/117 - basically the same, but simpler example

thadir
2017-10-19 10:52
A col fact for PACT users consumer driven contact testing is back on the ThoughtWorks techradar


jsilver
2017-10-19 18:12
Hey All, I'm integrating Pact testing and have a question: Let say I'm writing a contract to retrieve `zoo/cats/:id` and that contract expects the cat to have exactly 2 stripes, one blue eye, and one green eye. If our provider generates this exact cat, but with a nondeterministic ID, how can the consumer know which id to include in the request when generating a pact?

abubics
2017-10-20 04:32
Generally, you would set up whatever entities in the state pre-step. So, if the state is `special cat (2 stripes, blue eye, green eye)` you would make sure to set your data to have the expected ID, too.

abubics
2017-10-20 04:33
but, that?s a very specific scenario

abubics
2017-10-20 04:34
it?s probably more useful to generalise on the shape of the data, and only be so specific about data you?re explicitly setting

abubics
2017-10-20 04:35
like, if you have an endpoint that returns some of the data you send it, you could make sure that the response has the same literals

matt
2017-10-20 07:12
@jsilver typically you'll have a standard test data fixture for the provider which will have these entities created already.

matt
2017-10-20 07:13
You'll use provider states to manage the delta

mende
2017-10-20 15:08
has joined #general2

kevin.meiresonne
2017-10-26 11:55
has joined #general2

kevin.meiresonne
2017-10-26 11:56
Hi, I just found you can configure how to compare pact versions on https://github.com/pact-foundation/pact_broker/wiki/Configuration Is there a way I can change the version parser of a hosted pact broker at Dius?

eskimoquinn
2017-10-26 15:03
@matt is it possible to change values in the request before the call is made to the provider in the provider verification? I cannot create ids on the system that that I am verifiying, so the typical way to set of the provider states will not work for me.

eskimoquinn
2017-10-26 15:42
that is, we have a rest service that sits on top of a read only database, therefore we cannot create records with specific IDS. So ideally the consumer would supply a provider state, which we then could create a record of the id stated in the example from the PACT. However, we cannot do that because of the read only limitation. Can we change the request to put in another ID before the pact verification?

matt
2017-10-27 05:57
Hi @kevin.meiresonne, it can be done. Let us know offline and we'll set it for you.

matt
2017-10-27 05:58
You could in Java using request filters. What language are you again? If the values are known / static in the provider, why not just update the consumer tests with those values?

kevin.meiresonne
2017-10-27 09:36
Is there a way to query verification results based on a tag?

kevin.meiresonne
2017-10-27 09:39
I only find how to do it on a version e.g. /verification-results/consumer/{consumer}/version/{consumerApplicationVersion}/latest

eskimoquinn
2017-10-27 13:43
In this case, we are using ruby. For the second question, we did end up doing what you suggest but it increased the coordination needed between the consuming team the providing team, which while that works, its not ideal.

eskimoquinn
2017-10-27 15:06
@beth, @matt et. al. We are using the pact-provider-proxy gem and we would like to publish our verification results to the pact broker. However, when we set up our pact_helper to include the app_version and the publish_verification_results boolean, we get an error that indicates that our rack config is missing (http://config.ru). Is this a bug, or do we have something configured incorrectly? Also the tests do not run, yet it still sends a verification to the pact broker. Something seems amiss here.

eskimoquinn
2017-10-27 15:06
Actual error message

eskimoquinn
2017-10-27 15:08
Without this block, our test verify as we would expect.

matt
2017-10-27 21:35
Verification is still sent to broker on test failure, the status is different though (ie. A failure instead if a success)

matt
2017-10-27 21:36
Did you create a http://config.ru as the error suggested? (I'm just shooting in the dark here..)

matt
2017-10-27 21:37
@kevin.meiresonne I'm not sure if it does yet. @beth might know. We have something cooking on the horizon that will help in that space though

kevin.meiresonne
2017-10-30 08:06
@matt Great to hear. Happily be a beta tester for that.

beth
2017-10-31 03:55
@eskimoquinn I would recommend using the pact-provider-verifier gem instead

beth
2017-10-31 03:57
I haven't actually looked at the proxy gem for ages, as most people use the provider-verifier gem instead. The main difference between the two is that the proxy gem requires the provider states to be declared in a ruby file, where as the provider-verifier changes the states by hitting a url.

beth
2017-10-31 04:00
ok, I've had a look at the code. with the proxy gem, you should be configuring a rake task, not a service_provider block. You're overriding the default service provider configuration, which is why it's complaining about not finding the http://config.ru. the app_version and the publish_verification_results flag haven't been exposed in the rake task interface yet. I'll add them now.

beth
2017-10-31 04:30
@kevin.meiresonne I'm working querying verifications by tag at the moment. You can find this information currently but it takes a few calls. Have a look at this issue: https://github.com/pact-foundation/pact_broker/issues/141

beth
2017-10-31 04:32
@eskimoquinn I believe this feature will be available in the future, when we move to a shared rust implementation.

beth
2017-10-31 04:33
Oh, cool. I thought we were so old that we'd dropped off it!

beth
2017-10-31 04:44
I've also almost got a version of the index page that has the prod tag info on it, but the person asking for it stopped responding to me, so I've let it drop.

beth
2017-10-31 05:04
@eskimoquinn I've put out a new version of the provider-proxy gem with the new fields in the rake task.

kevin.meiresonne
2017-10-31 08:43
@beth Thanks for the update. I've been sharing some information with @matt on how we intend to use the broker, with some feature requests on the UI dashboard side. Happy to challenge what you've been working on on the index page :slightly_smiling_face:

beth
2017-10-31 09:33
There is a repositoryUrl available on the pacticipant resource. That's been in there since day 1, I'm surprised I didn't remember it.

beth
2017-10-31 09:37
Ah... that would be because it's in the database, but not in the resource.

beth
2017-10-31 10:08
I've updated the code to allow the repositoryUrl to be set, will deploy it some time in the next few days.

fergusstrange
2017-10-31 22:27
Seeing issues with the broker just now, any one else?

beth
2017-10-31 22:27
@kevin.meiresonne there is an alpha feature in the broker now that shows you the "matrix" of pacts and verifications. The URL is /matrix/provider/PROVIDER/consumer/CONSUMER

beth
2017-10-31 22:27
I just deployed

beth
2017-10-31 22:28
It may take a while to come up

fergusstrange
2017-10-31 22:28
Ah

beth
2017-10-31 22:28
let me check

fergusstrange
2017-10-31 22:28
:thumbsup: no worries, I'm off to bed anyway

fergusstrange
2017-10-31 22:28
:wave:

beth
2017-10-31 22:28
it looks like it's takeing longer than usual to recover, will check

beth
2017-10-31 22:34
Found the problem, redeploying now

beth
2017-10-31 22:41
Brokers back up, apologies for the outage.

beth
2017-11-01 01:04
Ok broker users, I have a new feature for you to beta. I haven't had time to give it a good shakeout yet, but I'm putting it out there because a few people have been asking for a similar thing, so I'll put it out and see how it goes. It's a tool set that allows you to check the verification results before you deploy a consumer.


beth
2017-11-01 01:05
Here are the usage instructions: ``` Usage: pact-broker can-i-deploy -a, --pacticipant=PACTICIPANT -b, --broker-base-url=BROKER_BASE_URL Options: -a, --pacticipant=PACTICIPANT # The pacticipant name. Use once for each pacticipant being checked. -e, [--version=VERSION] # The pacticipant version. Must be entered after the --pacticipant that it relates to. -l, [--latest=[TAG]] # Use the latest pacticipant version. Optionally specify a TAG to use the latest version with the specified tag. -b, --broker-base-url=BROKER_BASE_URL # The base URL of the Pact Broker -u, [--broker-username=BROKER_USERNAME] # Pact Broker basic auth username -p, [--broker-password=BROKER_PASSWORD] # Pact Broker basic auth password -o, [--output=OUTPUT] # json or table # Default: table -v, [--verbose], [--no-verbose] # Verbose output. Default: false Returns exit code 0 or 1, indicating whether or not the specified application versions are compatible. ```

beth
2017-11-01 01:06
Here is an example of a query using the test broker (you can all play around with the data in there): ``` ./pact-broker can-i-deploy --pacticipant "Foo Web Client" --version 1.0.2 --pacticipant "Activity Service" --latest --broker-base-url https://test.pact.dius.com.au --broker-username dXfltyFMgNOFZAxr8io9wJ37iUpY42M --broker-password O5AIZWxelWbLvqMd8PkAVycBJh2Psyg1 Computer says no ¯\_(?)_/¯ CONSUMER | CONSUMER_VERSION | PROVIDER | PROVIDER_VERSION | SUCCESS ---------------|------------------|------------------|------------------|-------- Foo Web Client | 1.0.2 | Activity Service | 1.0.1 | false One or more verifications have failed ```

beth
2017-11-01 01:07
@kevin.meiresonne you can specify the version for the latest tag also by doing `--pacticipant PACTICIPANT --latest TAG`

beth
2017-11-01 01:12
For use in conjunction with the above tool, there is a `pact-broker create-version-tag` command. ``` Usage: pact-broker create-version-tag -a, --pacticipant=PACTICIPANT -b, --broker-base-url=BROKER_BASE_URL -e, --version=VERSION Options: -a, --pacticipant=PACTICIPANT # The pacticipant name -e, --version=VERSION # The pacticipant version -t, [--tag=TAG] # Tag name for pacticipant version. Can be specified multiple times. -g, [--tag-with-git-branch], [--no-tag-with-git-branch] # Tag pacticipant version with the name of the current git branch. Default: false -b, --broker-base-url=BROKER_BASE_URL # The base URL of the Pact Broker -u, [--broker-username=BROKER_USERNAME] # Pact Broker basic auth username -p, [--broker-password=BROKER_PASSWORD] # Pact Broker basic auth password -v, [--verbose], [--no-verbose] # Verbose output. Default: false Add a tag to a pacticipant version ```

beth
2017-11-01 01:15
The recommended usage of these tools would be to tag the pacticipant version every time it is deployed to a stage (dev|test|staging|production) so that you don't have to know the exact version of the other services, but can refer to them as `--latest TAG` eg `--latest prod`

beth
2017-11-01 01:16
eg. on deploy of any pacticipant to prod `pact-broker create-version-tag --pacticipant Foo --version ${VERSION} --tag prod ...`

beth
2017-11-01 01:18
before deploy of a consumer to prod `pact-broker can-i-deploy --pacticipant "Foo Consumer" --version ${VERSION} --pacticipant "Foo" --latest prod`

beth
2017-11-01 01:22
Let me know if you have any questions, and what you think of it if you try it. It's just in dark release, so there's plenty of room for any necessary changes.

matt
2017-11-01 01:24
@matt pinned a message to this channel.

thadir
2017-11-01 09:47
@beth this looks interesting, we could use this in buildpipes like Jenkins to validate if somting can work in production. But this means the taging interface needs some TLC

thadir
2017-11-01 09:49
Nope you got updated, it helps that the microservice comuniety is loving it, im going to talk about it in a dutch tech meat up soon :slightly_smiling_face:. It has some downside as its a tool for a process and a mind set and when its not fully adapted there are a few snags.

eskimoquinn
2017-11-01 17:19
Thanks so much! Trying it out soon.

eskimoquinn
2017-11-01 17:21
Thanks!

jsilver
2017-11-01 19:09
I've been experiencing a flakey pact test while running tests in CircleCI. The Pact Server fails to boot, and throws an ` ECONNREFUSED`. I am yet to experience this locally but it's come up quite a bit while running in Circle. We're using `pact-js` and `jest`. Anyone seen this before?

matt
2017-11-01 20:11
@jsilver I haven?t seen that, no. My guess is that perhaps there is a race condition with starting the server and it being available for the jest test. I don?t know Jest very well, does it run in the browser?

matt
2017-11-01 20:12
it?s possible jest thinks the server is up, and the pact tests start (which involves sending http requests to the server). If the server is not yet available on the port that could cause that error

matt
2017-11-01 21:20
hi all, sorry for the interruption! We are looking to get some testimonials about Pact and the Broker from our most loyal users - you! We?d like to put this on our website and other marketing collateral going forward, so you?ll practically be famous... Whilst we appreciate any feedback, here are some options to consider, in descending order of complexity/effort: 1. Record a video hangouts type thing with a Q & A style interaction (we could obviously somewhat prepare this in advance) 2. Written case study (e.g. The tech stack, the environment, number of services etc. and how Pact and, ideally, the broker, was critical to your success) 3. Guest blog post type thing 4. Brief testimonial e.g. ?We use pact to move faster, safer? blah blah blah at <your organisation>? - <name> <title> Oh, and did I mention that we?ll be speaking at the popular YOW! Tech conference in Australia (Melbourne, Brisbane and Sydney) on Integration Testing strategies in early December? We?ll have a marketing campaign built around this that will likely include this material which could be great brand exposure. If this interests you, please contact me offline or drop me a note a .

pivison
2017-11-01 22:56
has joined #general2

jsilver
2017-11-02 20:56
Hey @matt, that's what we figured was happening. We're wondering if there's some kind of health check endpoint we can wait on to check the status of the server. I see that this package is deprecated, but it looks like there was some chatter on this issue: https://github.com/DiUS/pact-consumer-js-dsl/issues/32

matt
2017-11-02 22:14
You don?t really need a health check endpoint, simply knowing the port is available is all that is required - when the port is up, the service is up

matt
2017-11-02 22:14
make sense @jsilver?

beth
2017-11-02 22:58
@jsilver you can poll the root url with the header 'X-Pact-Mock-Service: true' and once the mock service is up, it will return a 200.

matt
2017-11-02 22:59
:point_up: even better

matt
2017-11-02 22:59
@beth is it possible the port is available but not the service?

beth
2017-11-02 23:00
Yup. I've been adding the tags to both the pact publishing and verifying code so that it's all done as part of the normal process. In regards to the tagging CLI `pact-broker create-version-tag`, what features would you like to see?

beth
2017-11-02 23:01
Could you explain your tagging/branching/release process?


beth
2017-11-02 23:20
So you can check the port any way you like. I've just tended to poll until that HTTP response came back 200 because otherwise you get an error response in the logs.

beth
2017-11-02 23:20
(if you try and it any url without an interaction being set up it will error)

beth
2017-11-02 23:21
I guess you could do a tcp connection without actually making a response as well.

matt
2017-11-03 07:44
That's what pact js does (tcp Conn)

matt
2017-11-03 07:44
Thanks, that's really helpful to know though

thadir
2017-11-03 13:29
@beth, sure ill do that later today when i have some time to explain this prity Java, C# process. For full automated release processes.

jsilver
2017-11-06 19:39
Hey @ and @, I'm still trying to debug the non-deterministic pact server failures and came across something interesting. Our `integration.log` shows the correct flow for the each test in the suite (interaction registered, request received, matching request found, interaction verified). However, the test fails with a Jasmine timeout error. We are using `pact-js` and Jest.

jsilver
2017-11-06 19:48
It appears that the above error has to do with the resolution of promises in the pact-js code. I'm looking into it further, but would appreciate any directional guidance

timothy.clifford
2017-11-06 22:31
@jsilver I?ll try and have a look later this evening

matt
2017-11-06 22:34
@jsilver I might be able to look a little later today, a PR would be most welcome if you can track it down. Thanks for your digging this far

matt
2017-11-07 12:10
@jsilver any chance you could please create an issue to track this on the `pact-js` repo? + Ideally a repro

alexei
2017-11-07 12:17
Using .NET Pact Framework, is there any feature for choosing arbitrary free port for the mocks, built-in in the framework? The reason is, that when some CI Jobs running in parallel for different services, ports collision is possible when the ports are hard-coded.

kevin.meiresonne
2017-11-07 13:42
not that I'm aware of, but it's pretty easy to implement that yourself.


jsilver
2017-11-07 15:27
@matt, I created an issue that includes the test file, and two log files as gists: https://github.com/pact-foundation/pact-js/issues/124. Thanks again for the help!

matt
2017-11-07 20:16
I?m not sure, sorry @alexei. You might need to ask on the Pact Net repo where Neil can answer (not sure he?s on here)

thadir
2017-11-08 10:49
We see this at random happen so now and then. If we kick the build ofthen enogh it will work. But it seems there are some small bugs. I cant see the brokers logging. But me thinks we found somting rare.

alok.pandey
2017-11-08 13:09
Hi @beth

matt
2017-11-08 13:57
has joined #general2

matt
2017-11-08 14:01
Is it common to have one broker for the entire company? Or should each team have a dedicated broker?

thadir
2017-11-08 14:06
@matt depens how you want to do it. We disided to use a broker for the whole company internal. So we all can see how things are tied and dependent. But were also going to as soon as we get a good feeling make a broker to help our clients to connect to get the full API structure of our clients depended on our API's in chart.

matt
2017-11-08 14:10
have you run into any issues sharing a broker with the whole company?

matt
2017-11-08 14:13
I'm wondering if the UI gets a bit messy with many pact files and no way to organize them.

kevin.meiresonne
2017-11-08 14:16
The current pact broker UI only shows the latest versions of the different pacts, so I think that's manageable. How many pacts does your company have (how many service to service dependencies?)

matt
2017-11-08 14:18
we are just getting started but have many teams (and lots of engineers)

matt
2017-11-08 14:18
I think i'm going to try a shared broker server and see how that goes

matt
2017-11-08 14:19
is there an option to pay for a professionally hosted broker? if so, is there pricing info available?

thadir
2017-11-08 14:48
@matt yeah it gets a bit clutterd. But the UI is the leaset of my concerns.. The test are the things im interested in and were starting to use the badges that @beth implemented a while back so they can see if its ok. The UI is more a thing we use to have the talk how our eco system looks like.

matt
2017-11-08 14:54
cool. thanks for the info.

matt
2017-11-08 14:54
maybe one day we'll have folder support in the UI

matt
2017-11-08 14:54
to organize all the pacts

thadir
2017-11-08 14:55
That will happen, there realy working on it. But there other concerns for now :slightly_smiling_face:. And still there doing a splended job in givin support

matt
2017-11-08 14:55
awesome

thadir
2017-11-08 14:56
just wished they would tell me when the beta was going to end. I sort of need to get time to arrange the money for the tool We realy want to pay it so they can even focus more on it.

matt
2017-11-08 14:57
yeah, I'd be happy to pay. Especially if that means features get developed faster


thadir
2017-11-08 15:19
:slightly_smiling_face:

beth
2017-11-08 20:42
Bargain

andrew.nicholson
2017-11-09 20:32
has joined #general2

andrew.nicholson
2017-11-09 20:44
Hello! I have a question about the pact-provider-proxy gem. Is there any way to get it to output a report file that could be read by a Jenkins job? I have Jenkins running my pact verification tasks, and would love to see the verification failures surfaced in the Jenkins interface.

andrew.nicholson
2017-11-09 20:47
Rspec tests are able to produce Junit output XML, which works perfectly -- is there anything like that?


matt
2017-11-09 20:57
Is there any reason why you?re using the `pact-provider-proxy` gem in the first place?

matt
2017-11-09 20:58
but the short answer (from me) is I?m not sure, but if not I think we would like to support this sort of thing

andrew.nicholson
2017-11-09 21:35
So, we're using the `pact-provider-proxy` gem in order to have our pact verification run against an external URL -- we aren't using a rack app. Is there something else we should be using for this purpose?

beth
2017-11-11 02:42
@andrew.nicholson use the pact-provider-verifier instead. There is an --format json option.

beth
2017-11-11 03:04
I've just added the --format RspecJunitFormatter option. You'll need pact-provider-verifier 1.10.0

matt
2017-11-11 05:50
@beth loving the JSON formatter on the verifier, we can now properly break down the provider tests in Go land and see specifically where things failed


beth
2017-11-13 02:17
@thadir @matt we wish we knew when the beta was going to end too! DiUS is a consulting company, not a product company, so we haven't had dedicated time in the past to work on it. This year should be different, as Pact and the Broker are becoming more central in DiUS' overall business plan.

beth
2017-11-13 02:18
The plan is to make Pact and Pact Broker development self funding, by charging for the features that will make pact work "at scale" (but still leaving the core product open source).

beth
2017-11-13 02:20
Talking of the open source product, somebody was wanting to view tags in the index page. I can't remember who it was. @kevin.meiresonne? I've just released this feature, and the documentation for it is here: https://github.com/pact-foundation/pact_broker/wiki/UI-Documentation

beth
2017-11-13 02:59
@matt in the backlog of features for the "pact at scale" version of the broker is proper authentication, authorization, user administration and permissions.

matt
2017-11-13 03:13
thanks. At work i've run into a bit of push back on using the DiUS hosted broker. The preference is for self hosted instances to minimize any security concerns.

beth
2017-11-13 03:14
Sure. At the moment, the docker one is basically the same product.

beth
2017-11-13 03:14
It's unlikely to get proper auth or user management any time soon however.

matt
2017-11-13 03:14
has DiUS dealt with larger companies before that have a security review process for vendors?

matt
2017-11-13 03:15
i'm wondering if there's already some marketing style PDFs to help persuade decision makers about DiUS

beth
2017-11-13 03:15
We've probably been involved in reviews from the other side! But the broker hasn't gone through that yet. You raise an excellent point.

beth
2017-11-13 03:15
Let me have a chat to @matt and see what we can come up with.

beth
2017-11-13 03:16
At the moment, all the material we have is on the http://pact.dius.com.au page.

matt
2017-11-13 03:16
i was super excited when DiUS provisioned our broker since we'd be able to get started immediately with Pact and not have to maintain yet another server. the initial reaction however was who is DiUS and why should we trust them with any of our data

beth
2017-11-13 03:16
That is a fair point! Trust must be earned.

matt
2017-11-13 03:17
a bunch of our APIs are open source so they don't raise any security concerns. I'm starting there for now with the hosted broker, other teams have already started spinning up internal servers. I think having one broker per team though isn't a great use of resources.

beth
2017-11-13 03:18
Given that the point is to share contracts between teams, you do loose some of the value.

beth
2017-11-13 03:18
You really want all the contracts for each service to be in the same broker, otherwise the can-i-deploy tools won't work.

beth
2017-11-13 03:18
Or rather, you want all the services that talk to each other to use the same broker.

matt
2017-11-13 03:18
that's great to know. i will keep this in mind when discussing pact internally

beth
2017-11-13 03:19
It's not such a bad thing to have a broker per "bounded context" however.

matt
2017-11-13 03:19
i love the idea of DiUS providing pact via software as a service. teams don't have to worry about server upgrades and can focus on testing. and then there'd be paid support available as well.

beth
2017-11-13 03:20
As in, if there are services that can be separated into groups that only talk internally, they could have their own broker. You'd lose value if you started spreading services that talked to each other across different brokers.

beth
2017-11-13 03:20
Exactly. Quite a few of the places where we have implemented pact are using old versions of the broker, and as it's moving quite quickly with feature addition at the moment, they're not getting the full value proposition out of pact.

beth
2017-11-13 03:21
As an example, the verification results and can-i-deploy tool (which I think are some of the most important features of the broker) have only been implemented in the last 6 months.

beth
2017-11-13 03:22
Also, the README badges... they're missing out on readme badges!!! :open_mouth:

matt
2017-11-13 03:22
:slightly_smiling_face:

matt
2017-11-13 03:22
we are just getting started with pact. here's a simple example of how we're using it on one team via Ruby: https://github.com/instructure/test_advisory_board/tree/master/pact

matt
2017-11-13 03:23
any idea what the consulting rate is for some high level advice? i think it'd save us a ton of time to have an expert explain the best use of Pact

beth
2017-11-13 03:24
Send an email to and we can have a chat about it.


beth
2017-11-13 03:24
It's a topic we like talking about, we're more than happy to do some consulting on it.

matt
2017-11-13 03:26
email sent :slightly_smiling_face:

beth
2017-11-13 03:27
Whereabouts is your team located @matt?

matt
2017-11-13 03:27
most of us are in salt lake city, utah

matt
2017-11-13 03:28
I work remotely


beth
2017-11-13 03:29
We're based in Melbourne, Australia, so there's the potential for us to do some online collaboration.

matt
2017-11-13 03:29
we're trying to figure out how to test APIs as we move to a microservices architecture. pact seems like an awesome fit.

beth
2017-11-13 03:29
That's what pact was written for, so yes, it is.

matt
2017-11-13 03:29
https://github.com/instructure/canvas-lms :arrow_left: is the main project we're working on

beth
2017-11-13 03:30
I threw together this the other day if you're interested: https://docs.pact.io/about_pact/history.html

matt
2017-11-13 03:30
one nice thing about Instructure is a bunch of the software is open source, so it's a bit easier to collaborate.

matt
2017-11-13 03:30
i read through the history, thank you for linking that on github

matt
2017-11-13 03:30
i think rust FFI for sharing code is interesting.

matt
2017-11-13 03:31
rust isn't a language i have any experience with, i'm more familiar with golang.

beth
2017-11-13 03:31
Yeah, it will be an interesting part of the journey.

matt
2017-11-13 03:31
we have some teams using Rust at instructure though and they like the language.

matt
2017-11-13 03:32
we had a similar issue at work recently, trying to figure out how to share a common server across many different languages. ended up selecting gRPC


beth
2017-11-13 03:33
Interesting!

matt
2017-11-13 03:33
i like gRPC because we are using a Kotlin server on Android/iOS/Desktop

matt
2017-11-13 03:33
if we used C++ or some other low level language, that's a bit more difficult to find contributors for.


matt
2017-11-13 03:34
I'm not sure if pact works with protocol buffers, GraphQL, or other more exotic API technologies.

matt
2017-11-13 03:34
most of our APIs are standard REST

beth
2017-11-13 03:35
No, it's not very exotic yet. HTTP for all implementations, and message support for JVM currently.

matt
2017-11-13 03:39
swagger + pact is also interesting, I wonder if there are any success stories with that approach beyond Atlassian.

beth
2017-11-13 03:39
I haven't actually used it myself yet, but you could try asking on the gitter channel.

beth
2017-11-13 03:43
Really interesting slidedeck @matt, thanks.

matt
2017-11-13 03:50
we looked at a *ton* of options for reusing code across arbitrary languages :slightly_smiling_face:

matt
2017-11-13 03:50
nice part about gRPC is all the code gen is for free from the protobuf.

matt
2017-11-13 03:51
pretty sure they support all the languages Pact uses as well.

matt
2017-11-13 03:51
i wish kotlin native was a bit further along in development, that seems like an interesting option.

matt
2017-11-13 06:51
@thadir @matt I know it wasn't necessarily what you meant, but I am here to assure you that beta doesn't mean we don't take responsibility of your data and the platform seriously. We do.

matt
2017-11-13 06:53
As Beth mentioned, things are starting to move and we should have more traction coming into the new year. All going to plan I'll have some dedicated time in my schedule permanently on improving and growing this product. We do really appreciate your patience in the meanwhile

matt
2017-11-13 06:54
One thing we could be better at is publishing the many new features incorporated into the broker which are cooking in weekly or better.

abubics
2017-11-13 06:59
Maybe it?s worth mentioning, too, that it?s unlikely that there?s anything sensitive in your test data.


abubics
2017-11-13 07:00
If there is, perhaps you?re relying on security through obscurity, which is a whole other class of problem :wink:

abubics
2017-11-13 07:01
Hopefully there are no algorithmic-detail trade secrets leaking out through APIs :thinking_face:

matt
2017-11-13 07:01
It's normally structure of APIs etc that people concerned about. But I suppose we don't want to be seen as deflecting responsibility either!

matt
2017-11-13 07:02
Well, if you think of APIs as products they could be quite revealing of a companies strategy

abubics
2017-11-13 07:04
true . . . new pact tests for features under development could always be a leak risk. Especially for internal APIs.

kevin.meiresonne
2017-11-13 08:08
@beth Thanks for the initial support for tags on the broker UI! Already helps me a lot in verifying results across our branches!

thadir
2017-11-13 09:21
@matt and @beth im quite sure you do. And im loving you folks so mutch, im goin to do a meetup in the Nehterlands all about pact and why we want to use the service. And there a few feature request ill have when we start paying :innocent:

matt
2017-11-13 09:32
Request them now and you might get them for free :grin:

thadir
2017-11-13 09:41
Lol, it has to do with autentication and richts, I want to be aible to mark pacts for "public" and "private" groups. MOre in the sence like we got our internal API's and then we got the API's we expose to uor clients.. Its a payed feature eather way for the broker :slightly_smiling_face:

beth
2017-11-13 09:41
That makes sense. We've had a few discussions along similar lines.

beth
2017-11-13 09:42
Do you use github for your repo?

matt
2017-11-13 09:43
Yep, we've been thinking about how to deal with this. Lots of ideas, we'll definitely run ideas by you

thadir
2017-11-13 09:46
Also, we been working with a lot of AIM sulutions as for our product, so if you need to figure out what kind of autentication protcol you want I can help with that my skils in Ruby are non existanced but im prity god at scala and java these days. We do not use git, we use bitbucket for our software and most is closed sorce alas. But im hoping to change that a bit :slightly_smiling_face:

beth
2017-11-13 09:47
Does bitbucket do social login?

thadir
2017-11-13 09:48
Not any more, let me check. It alouwes google login

beth
2017-11-13 09:48
that's a pity. Are you interested in using google as a social login?

thadir
2017-11-13 09:52
Nope, not for our source, were going to us federation based autentication to unlcok some of those features this would be openid connect or somting in those lines (were still looking in to it). The big idea is that were going to be the Autenticaiton Broker for the european harbor market. And you want to keep social (life) and corparate (work) seperate. Were still doing the design session on those tho.

beth
2017-11-13 09:54
So, you're still working on a federated identity server then? So you'd just want a "local" pact broker login for each user to start with.

thadir
2017-11-13 09:59
@beth sor tof, were goin gto implement an federation setup based on openid connect. This is a good protocol and thats how we want to help our clients to work with our sytems. And thus also for the pacts. But were still in the product picking phase of figuring out where to buy the solution seeing that openid connect is quite new and no one relay supports it 100% to spec atm. So there looking at road maps etc seeing who fits the bill the best.

beth
2017-11-13 10:00
Understood.

andrew.nicholson
2017-11-13 14:16
I am looking at migrating our current provider setup to use the `pact-provider-verifier` gem -- it looks like to setup provider states we will now need to put an HTTP endpoint on our provider to handle that setup?

andrew.nicholson
2017-11-13 14:16
Previously with the `pact-provider-proxy` we were able to define that setup in a ruby file

matt
2017-11-13 14:40
Yeah, that's the primary concern. Leaking new features.

jsilver
2017-11-13 14:47
Hey @matt. After some experimenting I found that the Jest's parallelized test running was causing the flakiness / non-determinism. I've added a comment to the issue I filed (https://github.com/pact-foundation/pact-js/issues/124). Any ideas of why this might be happening?

rolyat.wilson
2017-11-13 18:21
has joined #general2

matt
2017-11-13 20:17
Replied on the issue itself, thanks Jeff

beth
2017-11-13 22:25
We need to put some warning front and centre on the JS repo about running in parallel @matt

matt
2017-11-13 22:28
I added to troubleshooting section, and also to section on Jest tests

beth
2017-11-13 22:29
@andrew.nicholson yes, that's the language independent way of setting up provider states. Note that the URL doesn't have to be in the application itself, it could just be a little rack server running with the same connection to the db.

beth
2017-11-13 22:30
There was some functionality that the proxy didn't have that you wanted, that the verifier gem did, just trying to find what it was.

beth
2017-11-13 22:31
Ah, right, it was the XML output.

beth
2017-11-13 22:34
ok, I'm not sure if this will work, but give this a go with your original pact-provider-proxy gem. Add the `rspec_junit_formatter` gem to your bundle.

beth
2017-11-13 22:38
In your pact_helper.rb file ``` require 'rspec_junit_formatter' ::RSpec.configuration.add_formatter RspecJunitFormatter, "rspec.xml" ```

beth
2017-11-13 22:39
If that doesn't work, I'll have a look at adding it officially to the API so you can keep using it.

beth
2017-11-13 22:39
(Really, most of the support goes in to the verifier these days though)

andrew.nicholson
2017-11-13 23:20
@beth Noted re: the provider states. I'll try that out -- thank you!


andrew.nicholson
2017-11-14 14:58
@beth that appears to work -- thanks so much for the quick, helpful response. we are looking at upgrading to the verifier gem in the future

thadir
2017-11-14 16:53
Hmm been digging trough the pact-jvm project and the documentation so i can do a presentation on the Pactbut the doucmentation for JVM is a bit a hard read. If you go blank in to it.

matt
2017-11-14 20:25
@thadir we have a few slide decks we use, perhaps we could share with you as a starting point? What?s the purpose of your talk?

thadir
2017-11-14 20:50
The name is to pact or not to pact. And the purpose is explaining how we ended up with pact and choosing for it. And the pitfalls around it if you think it's a magic bullet

matt
2017-11-14 20:52
cool, that is a pretty standard talk for us. In fact, we?ve done 2 of them in just the last 2 business days :slightly_smiling_face: @rholshausen @beth - any thoughts?

thadir
2017-11-14 20:57
And of course the things we think why folks need to work with it :slightly_smiling_face:. Im prity happy the flow were sorta going for a story telling style (well my first ddraft got 9 days to finish it XD). Also making some cool demo code that ill put on github for folks to play with.

thadir
2017-11-14 21:02
But im going to turn in for the night :slightly_smiling_face:. cya later folks



beth
2017-11-15 04:01
I'm a bit wary of the sharpened pencils however. Seems like a recipe for disaster with toddlers.

beth
2017-11-15 04:01
@thadir my slides are pretty old now, and tbh, quite ugly!

timothy.clifford
2017-11-15 04:05
#2 pencils - that?s very precise.

thadir
2017-11-15 15:49
@beth ill restyle them its just inspiration im looking for

fkoner
2017-11-15 16:03
has joined #general2

andrew.nicholson
2017-11-15 17:48
Whoa! I was going to ask for a feature to have showing pacts by tag on the front-page of the pact-broker, but I see now that it's already implemented in the newest version! Super rad!

beth
2017-11-15 21:54
It's all going on at the moment in the broker @andrew.nicholson. Like a frog in a sock.

beth
2017-11-15 21:56
@thadir The animations on slide 11 I find are very helpful in explaining the steps of pacting: https://docs.google.com/presentation/d/15Be5WOS6CTGDh_9aHEmpgrh69U0QedFxfhSTJnyXPNo/edit?usp=sharing

matt
2017-11-15 21:59
I hope that Aussie colloquialism lands :grin:

thadir
2017-11-15 22:31
Thx ill look in to it :slightly_smiling_face:


beth
2017-11-16 05:06
@andrew.nicholson you don't happen to live in Melbourne do you? I know an Andrew Nicholson, but I imagine there are a few around.

andrew.nicholson
2017-11-16 14:17
@beth no go, I'm in Ann Arbor, MI USA

kevin.meiresonne
2017-11-17 08:59
Question: is there an easy way to only publish pacts to the broker if they have actually changed? Currently we publish everytime our build succeeds which leads to a lot of published pacts which are actually identical to previous versions.

beth
2017-11-17 09:24
Yes, that's ok. The underlying content is not recreated.

beth
2017-11-17 09:25
You want to publish each time, because otherwise you won't get a result from the can-i-deploy tool for that version.

beth
2017-11-17 09:28
The broker is designed to work with CI, and it assumes that a great number of the pacts will be identical. When you publish a verification, it's actually linked to the underlying content, not the publication. This is why, if you publish an identical pact, it will be "pre verified" if the version before it was already verified.

kevin.meiresonne
2017-11-17 09:57
Oh, so if I push the same pact multiple times with a different version (git sha), it won't store the contents of that pact multiple times if it's the same?

kevin.meiresonne
2017-11-17 09:58
That's brilliant!

beth
2017-11-17 10:20
I like to think so :wink:

beth
2017-11-17 10:22
But really, it's just that it was designed to work with CI, so it made sense.

matt
2017-11-17 10:36
The pre verification that we achieve as a result of this magic is one of the biggest benefits. It means your consumers aren't constantly having to wait for providers to reverify a contract for each trivial build.

kevin.meiresonne
2017-11-17 12:13
Is this explained somewhere? Wasn't aware of this at all, and it's a key benefit!

matt
2017-11-17 12:26
I think it's on the wiki, but we definitely need to start communicating the features better for sure

beth
2017-11-17 20:45
Good point @kevin.meiresonne. There's a high level mention of verifications on the README, and a how-to on the wiki, but I don't think I've explained the versioning and pre-verification anywhere properly.

thadir
2017-11-22 19:32
So been going trough the motion, tomrow ill be holding the presentation and also finsihg up the demo code box for PACT. For the ones interested this is the flow im going for its a rough scetch: https://docs.google.com/presentation/d/1ETU1XXXZ9UEQT8aWPVcN7pj7x1afYlyCvx3FcKQzSLw/edit?usp=sharing

beth
2017-11-22 21:40
Love the sub title

beth
2017-11-22 21:44
Looks good!

thadir
2017-11-22 22:20
:slightly_smiling_face: yeah, stole it from your slides @beth good inspiration :wink:

rholshausen
2017-11-22 22:28
@thadir Awesome visualisation on the complexity of micro-service interactions, well done!

thadir
2017-11-22 22:30
That was the reason we wanted to go this route. Tomorow ill make more demo code (get my scala on etc )

thadir
2017-11-23 22:34
Wel did the talk was a sucsess (ended up doing it dutch bc all english speakers didnt show up on the meet up :)). But was asked to do it again. Will update the demo code, is there also a demo packt broker I could use for this so we actealy have a real life test example of the many pact test there are posible?

rholshausen
2017-11-23 22:37
I'm sure @matt could get one setup for you

matt
2017-11-23 22:38
yep, I can do that. Or you can use the `http://test.pact.dius.com.au` broker which is a bit of a free for all

matt
2017-11-23 22:39
also, awesome!!

thadir
2017-11-23 23:46
@matt ill use that one, were going ot make the consumer in most suported language and then I want to keep it up to dat so you got a good example of how to use pact (and thus somting in the way of the spring-boot examples) repo

beth
2017-11-24 00:52
The creds are ``` Broker user: dXfltyFMgNOFZAxr8io9wJ37iUpY42M Broker password: O5AIZWxelWbLvqMd8PkAVycBJh2Psyg1 ```

thadir
2017-11-24 08:57
Thx, ill do that thi sweekend :slightly_smiling_face:

raghunandanjahagirdar
2017-11-26 11:02
has joined #general2

zac.sims
2017-11-28 11:11
has joined #general2

zac.sims
2017-11-28 11:36
Hi :)

thadir
2017-11-28 12:02
Hey @zac.sims and @raghunandanjahagirdar welcome to the PACT hangout for the guys who like to pact :wink:

zac.sims
2017-11-29 09:55
@beth thanks for the quick account verification, much appreciated

beth
2017-11-29 09:56
My pleasure. Let me know if you have any queries.

beth
2017-11-29 09:58
If you don't get a response for a while, it's because we live in Australia, and we're probably asleep! But we've got a really great and experienced group of users who should be able to give you an answer if we're not around.

beth
2017-11-29 10:02
@thadir I'm madly practising for my YOW talk now, and it just occurred to me how tricky it would be to practice a talk in one language, then present it in another. I'm impressed!

thadir
2017-11-29 10:04
@beth english was the practiced one :slightly_smiling_face:. But english and dutch are a bit close so no worries.

zac.sims
2017-11-29 10:06
I'm in Melbourne :)

zac.sims
2017-11-29 10:08
Good luck for YOW! (tomorrow? Or the Sydney one?)

kevin.meiresonne
2017-11-29 10:25
English and dutch are close? Dat is de eerste maal dat ik die hoor! :slightly_smiling_face:

thadir
2017-11-29 10:50
Kevin, natuurlijk wij zijn angolsacties en we hebben zo veel engelse woorden in onze eigen taal :wink:.

zac.sims
2017-11-29 18:58
See, this is why we need contracts :joy:

thadir
2017-11-29 19:04
Exactly :wink:

beth
2017-11-29 22:51
Tomorrow in Melbourne, then Brisbane and Sydney next week.

beth
2017-11-29 22:51
Thanks!

beth
2017-11-29 22:53
I'm interested to know, from the developers who work in non-english speaking countries, what proportion of code is english based vs local language?

thadir
2017-11-29 22:56
Hmm, code base is a mix between dutch and english. Seeing that the "language for perticular things in the harbor" is so Tipacly dutch that we disided that most stuff wil be english. But if it reperesents soming so particular to the market we sort of mix it up. Code is mostly english seeing thats natural. Java DOC to but some of the prosess analys documents are dutch

beth
2017-11-29 22:57
Hello, neighbour.

beth
2017-11-29 22:58
Interesting. Thanks.

thadir
2017-11-29 22:59
But @beth I must say it is difrent per company. For example I worked for banks mandatory english bc the european legestatrion is english. etc.

beth
2017-11-29 23:00
Ah, I see.

kevin.meiresonne
2017-11-30 08:44
Our code base is 100% english

kevin.meiresonne
2017-11-30 08:45
But we're a global company, so we have many different nationalities

thadir
2017-11-30 12:13
So a calouge taged me on this http://cloud.spring.io/spring-cloud-contract/ quite interesting. It feels very PACT based tho.

dniles
2017-11-30 13:54
has joined #general2

matt
2017-12-01 11:14
@thadir yeah we chat to them a bit. Nice people, and they've added support for Pact contacts too!

matt
2017-12-01 11:15
I don't do much Java these days, but if you try we'd be keen for feedback etc

thadir
2017-12-01 11:24
We will pock it @matt we use PACT and i sort of like it mostly and the cross platform part. (And yes I don't like the fact I get Scala for my test but I can live with it). Ill defently will try it but its already PACT wise here :wink:.

kevin.meiresonne
2017-12-04 09:56
I'd like to put pact verification badges on our build dashboard. I found in the documentation how to get the badge of the latest verification of a tag of a certain consumer. However, I want to put a badge for the latest verification of a certain tag of my provider. In other words: I want the latest verification badge of the "master" tags of my consumer and provider. Is that possible?

beth
2017-12-04 09:59
That makes perfect sense. Not yet, but let me make an issue for it. It shouldn't be hard.


kevin.meiresonne
2017-12-04 10:00
Great! Thanks!

beth
2017-12-04 10:02
Just thinking about the URL. `https://your-broker/pacts/provider/PROVIDER/consumer/CONSUMER/latest/TAG/badge.svg` We don't currently have an example of anything that specifies both a consumer tag and a provider tag.

kevin.meiresonne
2017-12-04 10:03
yes, indeed

beth
2017-12-04 10:03
We're really not looking up the status of a pact now, we're looking up the status of a verification that is selected by both consumer and provider tags.

kevin.meiresonne
2017-12-04 10:04
I thought as much, a URL with tags for both provider and consumer would make sense though

beth
2017-12-04 10:04
Actually. It's almost like a status badge for a matrix row.

kevin.meiresonne
2017-12-04 10:04
at least for us

kevin.meiresonne
2017-12-04 10:04
exactly

beth
2017-12-04 10:04
I could reuse that URL definition.

kevin.meiresonne
2017-12-04 10:04
except that the matrix doesn't show tags yet

kevin.meiresonne
2017-12-04 10:05
which makes it VERY large after a while :slightly_smiling_face:

beth
2017-12-04 10:05
Yeah, sorry. I havne't forgotten about it. I'm just snowed under.

beth
2017-12-04 10:05
Presenting at a conference this week.

beth
2017-12-04 10:06
Yes, the matrix does become large quickly! I didn't put paging on the UI resource initially, and I tried to load one of the pages, and it took AGES AND AGES and I was like, oh, there's something wrong with the kube stack... but no. Just the effect of a many to many relationship!

kevin.meiresonne
2017-12-04 10:07
no worries

kevin.meiresonne
2017-12-04 10:07
trying to get the company to adopt pact across the platform

beth
2017-12-04 10:07
You know how to query the matrix by tags right? It's just that they don't come back in the results.

kevin.meiresonne
2017-12-04 10:08
so things like these do help make my case :slightly_smiling_face:

beth
2017-12-04 10:08
indeed.

kevin.meiresonne
2017-12-04 10:09
is the querying the same as on the "home"?

kevin.meiresonne
2017-12-04 10:09
?tags=mytag

kevin.meiresonne
2017-12-04 10:09
or something else?

beth
2017-12-04 10:16
I haven't written up the user docs yet, but here is the pact between the broker client (the `can-i-deploy` tool) and the broker https://github.com/pact-foundation/pact_broker-client/blob/master/doc/pacts/markdown/Pact%20Broker%20Client%20-%20Pact%20Broker.md

beth
2017-12-04 10:18
You would do `q[][pacticipant]=PROVIDER&q[][pacticipant]=CONSUMER&latestby=cvp&latest=true&tag=master`

kevin.meiresonne
2017-12-04 10:27

kevin.meiresonne
2017-12-04 10:27
I'm probably doing it wrong :slightly_smiling_face:

beth
2017-12-04 10:28
No, the two URLs don't go together.

beth
2017-12-04 10:28
There are two formats.


beth
2017-12-04 10:29
I haven't made a fully queryable UI page yet.

beth
2017-12-04 10:30
To do the full query, do a curl and set your content type to "text/plain".


kevin.meiresonne
2017-12-04 10:31
ah right

beth
2017-12-04 10:31
You'll need to use -g to stop it interpolating the [] if you're on mac

kevin.meiresonne
2017-12-04 10:31
I thought you referred to filtering on the UI

beth
2017-12-04 10:32
I developed the API for the can-i-deploy, then did a very basic UI on top of that just to be able to visualise it properly, but I didn't put the full querying into it (yet).

beth
2017-12-04 10:32
Then, I was finding it hard to visualise the JSON returned by the API, so I added a text/plain content type that returns a table.

beth
2017-12-04 10:33
I need to properly document the format for querying the matrix.

beth
2017-12-04 10:34
You can reverse engineer it by looking at the queries generated by the different scenarios in the can-i-deploy documentation here: https://github.com/pact-foundation/pact_broker-client#can-i-deploy

beth
2017-12-04 10:36
We want the badge to be the same as the results for `pact-broker can-i-deploy --pacticipant CONSUMER --pacticipant PROVIDER --latest TAG`

beth
2017-12-04 10:36
Anyway, gotta head to bed now. I'll get on to it ASAP. Working on verification hooks now, because I may have said in my talk that they already existed...



siaynoqmage
2017-12-04 22:37
has joined #general2

siaynoqmage
2017-12-04 22:44
Hi - I'm looking for a working example with Pact (in .NET) using AMQP (RabbitMQ) protocol - can anyone provide me one? :slightly_smiling_face: thanks in advance!

beth
2017-12-04 22:45
Hi Zoltan. Unfortunately, the message pact is currently only implemented for the JVM.

beth
2017-12-04 22:45
We're working on adding it to the other implementations.

siaynoqmage
2017-12-04 22:45
I see

beth
2017-12-04 22:45
However, it's not that hard to write a message contract yourself.

beth
2017-12-04 22:46
You can still use the broker to exchange the contracts.

beth
2017-12-04 22:46
I know it's not .net, but here's an example of writing your own contract: https://github.com/DiUS/diy-contract-example

siaynoqmage
2017-12-04 22:46
no worries, thanks for the info :slightly_smiling_face:

beth
2017-12-04 22:46
Message contracts are super simple, because there's no interaction, just a list of messages.

beth
2017-12-04 22:47
If you have a look at the pact specification v3, you'll see the format that pact uses for serialising the messages. It's pretty similar to the http pact, except the "interactions" key is called "messages".

beth
2017-12-04 22:49
The key is to separate your message writing and handling code from your message sending and retrieving code. Then you write the contract between the writer and handler, effectively ignoring the protocol.


siaynoqmage
2017-12-04 22:51
great, I'll have a read and let you know if something is still unclear :slightly_smiling_face:

thadir
2017-12-05 10:02
Hmm, I got a good question to day.. PACT is realy json based but some of our old webservices use XML and SOAP that is actealy also interesting to put under pact to see who provides and who conusmes. Is this posible with PACT

matt
2017-12-05 10:50
The principle is the same yes, however as you guessed we only really support JSON matching at this point. I think JVM supports XML but none of the matchers. PR welcome :grin:

thadir
2017-12-05 11:02
Lol I use JVM biger problem for me is that the i get SCALA for free with the JVM version test. Not that i mind but its just a lot of data for a test.

pfajardo
2017-12-05 18:13
has joined #general2

matt
2017-12-05 21:29
:slightly_smiling_face:

sharding
2017-12-08 00:08
has joined #general2

sharding
2017-12-08 00:09
Hello, I am new to Pact and Brokers. I am curious if it is possible to publish a broker to heroku?

sharding
2017-12-08 00:09
Thanks

beth
2017-12-08 00:10
I think there's an example in the code base.

beth
2017-12-08 00:10
Have a look in the example folder.

sharding
2017-12-08 00:11
Sorry I forgot to say on node js.

sharding
2017-12-08 00:11
I saw the one with ruby.

beth
2017-12-08 00:12
No. There's only a ruby implementation.

sharding
2017-12-08 00:12
So, it is not possible to use node js?

beth
2017-12-08 00:12
Do you mean, running a broker on node, or using Pact with node?

sharding
2017-12-08 00:13
running a broker on node with heroku.

beth
2017-12-08 00:13
No. It's written in Ruby.

matt
2017-12-08 00:13
But you could definitely host it on Heroku

matt
2017-12-08 00:13
I?ve thought about making a one-click deployment for it, just never got around to it

sharding
2017-12-08 00:14
So, in order to use a broker it has to be written in ruby?

matt
2017-12-08 00:14
no, the Broker is written in Ruby. It has an API, so in theory you could use any language

matt
2017-12-08 00:14
we have first class support for the broker in Ruby, JVM, JS, Python, Golang and probably others too

beth
2017-12-08 00:14
It uses a JSON api, the implementation language is irrelevant.

sharding
2017-12-08 00:15
sorry... So I can use js with heroku to publish a broker?

sharding
2017-12-08 00:15
I have been researching how to do this all day, with no luck.


beth
2017-12-08 00:18
Have a look at that example

matt
2017-12-08 00:20
@sharding can you provide some more background on what you?re trying to do? The broker is (simplified) a repository of pact files, with an API on top of it. It is written in Ruby, and so has to be running in a Ruby runtime - you could host it on Heroku. Pact more broadly is a testing framework, that requires pact files to be generated (from the consumer) and validated (by the provider). The broker is one, and the recommended way, to share and collaborate on those files

matt
2017-12-08 00:20
Those tests will be written in whatever language your consumer/providers are written in (e.g. JVM, Go, Ruby etc.)

matt
2017-12-08 00:21
If you don?t want to host your own, you could signup for one at http://pact.dius.com.au/

beth
2017-12-08 00:21
Any reason why you wouldn't use a hosted one?

sharding
2017-12-08 00:22
@matt I am trying to do this in js ```const opts = { pactUrls: 'PACT_URL', pactBroker: 'HEROKU_URL_HERE', pactBrokerUsername: keys.PACT_BROKER_USERNAME, pactBrokerPassword: keys.PACT_BROKER_PASSWORD, tags: ['prod', 'test'], consumerVersion: '1.0.0' } pact.publishPacts(opts) .then(() => { console.log('Pact contract publishing complete!') }) .catch(e => { console.log('Pact contract publishing failed: ', e) })```

sharding
2017-12-08 00:23
but if I create a node based heroku app then use that url, it will not work.

sharding
2017-12-08 00:24
Maybe I am thinking about this wrong.

matt
2017-12-08 00:25
ok so can I assume that you have a local consumer test similar to https://github.com/pact-foundation/pact-js/blob/master/examples/e2e/test/consumer.spec.js ?

matt
2017-12-08 00:25
?and that you have some local pact files ready to publish?

beth
2017-12-08 00:29
I think we're all getting confused about the distinction between deploying a pact broker (an application that is written in Ruby and has a JSON api) and publishing a pact to the broker using node.

sharding
2017-12-08 00:42
@matt yes. I have all of the above.

matt
2017-12-08 00:42
OK cool, so it?s just the Broker you are trying to deploy to Heroku? And as Beth asked, any reason not to just get a free managed one from https://pact.dius.com.au?

sharding
2017-12-08 00:43
No reason just want to set out to finish what I started.


sharding
2017-12-08 00:44
and yes trying to deploy a broker to heroku.

sharding
2017-12-08 00:45
when I setup a heroku instance in node, it will not let me publish it.

sharding
2017-12-08 00:45
I keep getting an error.

matt
2017-12-08 00:46
OK, so can you confirm your broker is running in Heroku? Can you cURL it or something to see if it is responding?

matt
2017-12-08 00:46
How have you set the Heroku instance up?

sharding
2017-12-08 00:46
heroku create, then push to master.

sharding
2017-12-08 00:46
with express.

matt
2017-12-08 00:47
It sounds like you?re trying to deploy your application/API to heroku, not the broker

sharding
2017-12-08 00:48
ok. I am not quite following.

matt
2017-12-08 00:49
You are talking about express, which is a Node libarry. So you can?t be deploying the broker, which is a Ruby app. What are you deploying to Heroku?

sharding
2017-12-08 00:51
ok. so basically I need to setup a heroku instance using ruby on heroku, then use the pact api to connect to the instance?

matt
2017-12-08 00:51
I think there is a more fundamental confusion, which perhaps we should clear up

matt
2017-12-08 00:52
I?m wondering if perhaps you?re mixing up the publishing of the contract part from the consumer test, from the verifying the contract part on the provider API. What is the express app that you?re publishing to Heroku?

sharding
2017-12-08 00:53
the provider.



matt
2017-12-08 00:54
The code from above has nothing to do with the provider, it is about taking the pact file (a `.json` file somewhere in your code base probably) and publishing it to the Broker. In that snippet of code above, you are telling it to publish the contract to `HEROKU_URL_HERE`, which isn?t a Broker, but your provider API

matt
2017-12-08 00:56
the workflow should look more like this 1. Consumer test runs, producing a `my-consumer_my-provider.json` type file 2. Publish this file somewhere (e.g. a broker) 3. Verify that your provider API meets the contract, by downloading all contracts (from a broker) and running the pact verifier against your running api (in this case, you wanted to run it against an API deployed to heroku)

beth
2017-12-08 00:57
Though if you can run your provider locally, it will make your life easier

matt
2017-12-08 00:57
JS example of those three steps are in https://github.com/pact-foundation/pact-js/tree/master/examples/e2e/test 1. consumer.spec.js 2. publish.js 3. provider.spec.js and as beth says, you probably don?t want to be doing step 3 against a Heroku published app, but one running locally

matt
2017-12-08 00:58
Might I suggest you have a run through https://github.com/DiUS/pact-workshop-js to understand all of these concepts better, including publishing to a broker (last step)

sharding
2017-12-08 00:59
thats exactly what I am following. I did the entire thing.

sharding
2017-12-08 00:59
except the broker part will not work the way I am trying.

sharding
2017-12-08 00:59
so can I do the `pactBroker:` from my example, with a localhost url?

matt
2017-12-08 01:00
only if you have a running pact broker on your localhost, which I?m guessing you don?t

matt
2017-12-08 01:00
that parameter needs to be pointed to a running pact broker instance, which is this Ruby app: https://github.com/pact-foundation/pact_broker

sharding
2017-12-08 01:01
point to a running pact broker using ruby, even if it is localhost?

beth
2017-12-08 01:02
That sentence is ambiguous!

beth
2017-12-08 01:02
The broker is running on ruby. Your pact publishing code is node.

sharding
2017-12-08 01:02
gotcha.

sharding
2017-12-08 01:03
So if I create a ruby server locally I can point my js api to that?

sharding
2017-12-08 01:03
using local host.

beth
2017-12-08 01:04
You can use the locally running broker as a way of exchanging the pact.


sharding
2017-12-08 01:05
and then point to it from my js code.

beth
2017-12-08 01:05
If you let us know which hosted broker you have we can tell you what the configuration should look like.

sharding
2017-12-08 01:05
`hosted broker`?

matt
2017-12-08 01:05
You could run the broker locally. But for real apps you wouldn?t do that. Think of the pact broker as a database for your Pacts. It needs to be a long lived application running somewhere that all of your consumers and providers publish and read from. So if it?s only on your machine it won?t enable the collaboration you need.

matt
2017-12-08 01:06
https://pact.dius.com.au <- get a FREE hosted broker here (that?s what this Slack channel is about) and you don?t need to manage your own broker _at all_

beth
2017-12-08 01:06
This is a slack channel for the DIUS hosted broker product.

sharding
2017-12-08 01:09
k. Thanks for the help

beth
2017-12-08 01:13
Happy to help. Even if we were a bit confused about what we were helping with! Do let us know if you can't work past this. Having your code in a public repo or a gist would make it easier to pinpoint problems.

beth
2017-12-18 04:32
@kevin.meiresonne I've made you a Christmas present. You can get your matrix badge at `/matrix/provider/PROVIDER/latest/PROVIDER_TAG/consumer/CONSUMER/latest/CONSUMER_TAG/badge.svg`

alok.pandey
2017-12-18 12:43
Hi

alok.pandey
2017-12-18 12:43
Guys

alok.pandey
2017-12-18 12:45
If suppose we are running pacts consumer with junit ....can these be ran with maven tests like a normal test which run with maven test command...

thadir
2017-12-18 16:03
Ow yeah easy peasy

thadir
2017-12-18 16:05
As long as you fit to the JUNIT sceme name it works fine. This is the provider. Consumer is even more convienten as its a @Rule for a unitest. You should to add some asserts.

sharding
2017-12-20 22:26
I know this is a pact broker channel, but I am curious if it is possible to do multiple interactions in pact with just one server?

sharding
2017-12-20 22:27
When I try to do multiple interactions I am gettting this error `Error: done() called multiple times`

matt
2017-12-20 22:28
Hi Otis, could you jump on gitter and share your code?

matt
2017-12-20 22:28
We can answer there.

sharding
2017-12-20 22:29
gitter?

matt
2017-12-20 22:29
Even better, ask on StackOverflow

matt
2017-12-20 22:29
This way the answer is searchable for others

sharding
2017-12-20 22:30
Is there a pact area in gitter?

sharding
2017-12-20 23:57
Thanks

sharding
2017-12-22 19:02
I am having an issue with pact headers in the interactions. Is it necessary to have the request header in the interaction, or does pact automatically create them per the request?

rholshausen
2017-12-22 22:43
@sharding what headers are you having an issue with?

sharding
2017-12-22 23:37
@rholshausen it was a problem with my code, not pact. I got it figured out. Thanks

matt
2017-12-23 02:12
Anything to share with others in terms of lessons?

beth
2017-12-23 02:13
And recommendations for improving the docs?

dennis
2017-12-27 13:59
has joined #general2

dennis
2017-12-27 14:10
Hi, I don?t know if this is a question pact broker related, or just pact. But we are trying to figure out if the provider is the application, or the controller or event the complete endpoint ...

dennis
2017-12-27 14:10
Or will this create one big clutter in the network graph

beth
2017-12-28 23:39
@dennis typically the provider is the application

beth
2017-12-28 23:40
However, in your unit tests, you may choose to verify an interaction against a particular controller (if you're using junit)

thadir
2018-01-03 10:12
First off: Happy new year folks lets make 2018 the year of PACT (instead of DOG). Here is a interesting chalange, we now have a conumser that fully a SQL database that does the request. It somthing totaly untestable (oracle SQL doesnt rely know unitest). So were opting to make a side project just to make the pact visable. Now the challange is that the contract is reversed engineerd based on the code :sweat_smile:. Makes you hate that idea :thinking_face:

eskimoquinn
2018-01-03 18:37
Any word on this feature?

eskimoquinn
2018-01-03 18:38
is this something that has now been implemented?

eskimoquinn
2018-01-03 18:39
bump

lihongmei
2018-01-04 08:43
has joined #general2

alexei
2018-01-04 19:20
Our webhook for pact-broker uses POST to HTTPS site with self-signed certificate. Is there an option to turn SSL-Check off at creation of the web-hook?

travi
2018-01-04 19:26
would be better to tell the server to trust the self-signed cert :wink:

alexei
2018-01-04 19:37
I think that is an issue waiting on a commiter:) https://github.com/pact-foundation/pact_broker/issues/153

alexei
2018-01-04 19:38
How that? I will try the workaround linked with the issue, changing ruby code.


alexei
2018-01-04 19:53
Not using a docker version, but just using with the simple ruby web-server. So I?ve change the $ROOT/pact_broker/lib/pact_broker/domain/webhook_request.rb restarted the server, but it did not help? Strange?.

alexei
2018-01-04 20:12
Got it. The installed gem had to be update, not the sources. Or somehow rebuild the sources? Now works fine!

matt
2018-01-05 22:29
@thadir happy new year mate!!

matt
2018-01-05 22:29
Sorry we?ve all been off for a bit - even managed to stay away from computers and Slack (which if you look at our commit logs is _super_ rare)

matt
2018-01-05 22:30
We?re brewing up some big changes in 2018 - but not sure SQL contract tests will make that list - good luck! :wink:

matt
2018-01-05 22:33
@eskimoquinn sorry we?ve all been afk! I can?t speak for the Ruby implementation, but we are looking to add some more capability to the other language implementations that allow this. If you could raise an issue on the pact-ruby (https://github.com/pact-foundation/pact-ruby) github that will get our attention to solve it!

beth
2018-01-06 01:17
@thadir here's a DIY example for an SQL contract. You'd obviously need to do smarter matching on the SQL string. https://github.com/DiUS/diy-contract-example

beth
2018-01-06 01:20
@eskimoquinn are you using the native ruby verification (against a rack server) or the pact-provider-verifier, or the pact-provider-proxy?

beth
2018-01-06 01:23
This is the theory, but the actual details of how you'd wire it up differ based on which verification tool you're using https://github.com/pact-foundation/pact-ruby/wiki/Verifying-pacts#modifying-the-request-with-live-data

zac.sims
2018-01-07 00:22
So what are these juicy plans for pact in 2018? I'm now super curious :joy:

beth
2018-01-07 00:23
We're finally getting on to message pacts for non-jvm implementations

beth
2018-01-07 00:23
That's the big one.

zac.sims
2018-01-07 00:24
Oh. That'd be awesome!

matt
2018-01-07 21:13
It's more than that though, but we'll leave it at that until it's at least in a workable draft for people to toy with :wink:

beth
2018-01-08 03:32
@alexei I've added the ability to add certificates to be used when executing a webhook. I haven't yet created the API for it, but if you send me the cacert for your certificate, I will insert it straight into the database for you.

biaofu
2018-01-08 11:30
has joined #general2

alexei
2018-01-08 13:27
Thank you @beth, but we already did a local installation of the broker :slightly_smiling_face: (at the moment still the basic setup with WEBrick & SQLite3 db?)

beth
2018-01-08 23:47
@alexei you'll want the latest gem so you don't have to hack the ruby code. I'll put out a release for you. You can't use the docker container?

alexei
2018-01-09 17:28
@beth the challange is that customer has windows-only restriction, so_ actually, I am creating a windows docker container for pact_broker, which I probably can share when done. But windows & docker is a pain?. I will be happy to get help from you on the way, will dm you later!

alexei
2018-01-10 15:56
It looks like webhook is triggered each time the pact file is uploaded, even when there are no changes. Is there a way to trigger only, if pact file contents changed?

alexei
2018-01-10 18:17
Okay, it was as so often user error :slightly_smiling_face: The test code was changed recently, generating random uuid-s in one field each time, so that pacts are different for real. We?ll fix the test, different pacts after each test run make no sense?.

alexei
2018-01-10 18:44
Now I?ve even realized why you may need Matchers in Request :slightly_smiling_face:

beth
2018-01-10 23:03
Awkward! Good luck! Let me know if we can help.

beth
2018-01-10 23:03
Common trap!

m.groeneweg
2018-01-11 08:21
has joined #general2

alexei
2018-01-11 14:48
New problems :slightly_smiling_face: The first one: After update from 2.0.17 to 2.2.1 I am getting in output (!) (and nothing more from pact) `Could not find command "http://<host>:8080/pacts/provider/<service1>/consumer/<service2>/latest" ` test is marked green, but nothing was tested as it looks. 2.2.1 -> 2.0.17 works again. (never tried another intermediates)

alexei
2018-01-11 15:13
The second (and the reason why I?ve updated): Pact Verifier (in 2.0.17) seem to have problems with a matcher (RegExp or Type) which was put in Request/Header ``` "interactions": [ { ? "request": { "method": "get", "path": "/documents ", "headers": { "Accept": "application/pdf", "Correlation-Id": "8c607b69-3d35-4355-9033-a77d7fce62c5" }, "matchingRules": { "$.headers.Correlation-Id": { "match": "regex", "regex": "^[{(]?[0-9a-fA-F]{8}[-]?([0-9a-fA-F]{4}[-]?){3}[0-9a-fA-F]{12}[)}]?$" } } }, ... ``` Verification fails with: ``` Verifying a pact between .... Failure/Error: replay_interaction interaction NoMethodError: undefined method `strip? for #<Pact::Term:0x427c218> ```

alexei
2018-01-11 15:16
?which looked exactly like: https://github.com/pact-foundation/pact-net/issues/115 Should I take another version?

alexei
2018-01-11 15:27
https://status.github.com/messages - _sorry, did not meant to take down the whole github with reading the pact issues_ :smile:

beth
2018-01-12 00:16
@alexei Always grab the latest version. If that doesn't fix it, can you recreate your issue using the e2e example here: https://github.com/pact-foundation/pact-ruby-standalone-e2e-example and then raise an issue in the pact-support project please?

thadir
2018-01-15 09:58
Just filled your survay on the autantication stuff :slightly_smiling_face: realy jazzed. But maybe also look in to OKTA as a way to intergate it all (we are in the mids of starting to implement that here).

matt
2018-01-15 10:42
On the back of the authentication survey, I am pleased to announce that we will be progressing with multiple streams of work over the coming months and would like to involve you in this journey. Some features will be rolled immediately across the platform, whereas others will be incubated before launch to ensure it is fit for purpose. If you are interested in participating in this program, please DM me and we?ll get you on-boarded. :raised_hands:

alexei
2018-01-15 13:18
I am on it. Just what I?ve noticed so far, in http://Pact.NET 2.0.19 ?core standalone? was update to 1.11.0 (from 1.9.1 in 2.0.18) causing the break in our tests. and now .NET 2.2.1 it is Core: 1.22.1 It just cries out for API changes?:)

alexei
2018-01-15 13:50
And now I probably know the reason: we should have updated the gems in pact-win32, which host the correspondent ?core? code I suppose

matt
2018-01-15 14:46
we're using okta as well for auth

thadir
2018-01-15 23:31
Are you using Okta as internal or for your platform (just curius). We going to start using Okta for our platform systems our clietn use and in the end wanna also migrate our internal systems.

beth
2018-01-16 03:32
I'm not up to date with what is in the core and .net releases at the moment I'm afraid. Is everything working now?

alexei
2018-01-16 08:39
Yes. We separated pact-win32 (ruby-standalone-core) and http://Pact.NET packages because otherwise we?d hit 260-chars-in-the-path problem on windows. And therefore haven?t got pact-win32 updated automatically.

beth
2018-01-16 08:49
Ah, I see.

beth
2018-01-16 08:49
That bites us reasonably often

dennis
2018-01-17 08:27
I?ve got a question regarding the UI of the Pact Broker, is there a reason why the delete option is not implemented in the UI but only via a DELETE with curl for example ?

beth
2018-01-17 08:39
Yes - time @dennis. Most of the Pact Broker is open source, and hence, done in people's free time. The API gets prioritised over the UI I'm afraid, like many open source projects. We'll be focusing on building a much better UI in the Saas version throughout this year.

beth
2018-01-17 08:43
If you'd prefer not to mess with curl, then open the pact in the browser (the HTML version) then click on the "View in API browser" link.

beth
2018-01-17 08:46
This will open the resource in the HAL browser (an embedded HATEOS browser). Click on the NON GET button for the `self` relation, and then enter DELETE in the Method box, and click "Make Request". You can do this for any resource.

dennis
2018-01-17 09:24
Yes I totally understand, but if this is a feature that is allowed I?m willing to create a ticket and make a pull request for this.

beth
2018-01-17 09:25
Oh, absolutely! That would be awesome.


matt
2018-01-18 22:56
it's only used for employees so i guess internal.

mellis
2018-01-19 01:22
has joined #general2

beth
2018-01-19 02:32
Thanks to everyone who has completed the survey on authentication and authorisation that we sent out. This info is going to be really useful for helping us choose what to build first this year. If you didn't receive the email, let me know and I'll send you link so you can have your say.

zac.sims
2018-01-19 02:46
Is there anything public (PR or doco) about these plans? I'd like to share it outside this channel as we're big pact broker users (SEEK)

beth
2018-01-19 02:49
We're using the results of the survey to prioritise our features, so we don't have anything concrete yet. At a high level, authentication/authorisation and an improved UI experience are things we're going to be addressing.

beth
2018-01-19 02:51
We're mulling on what we can do to make it easier to contract test providers with large numbers of consumers, and how to improve the change workflow amongst other things, but auth/auth/ui first.

zac.sims
2018-01-19 03:57
Great! Thanks for the info

matt
2018-01-19 04:01
We?ll publish more details over time, we are in the midst of planning the next phase in the life of this product. Stay tuned, there is a lot going on.

giuseppe.landolfi
2018-01-24 15:32
has joined #general2

giuseppe.landolfi575
2018-01-24 15:35
has joined #general2

benjamin.l.tse
2018-01-25 02:46
has joined #general2

beth
2018-01-25 03:04
Anyone online?

beth
2018-01-25 03:05
@mellis and I are working on an improved dashboard UI and we'd love to do some user research

beth
2018-01-25 03:05
I know @kevin.meiresonne is using tags - who else is?

abubics
2018-01-25 03:06
we are, somewhat

gareth
2018-01-25 03:08
We use tags also

beth
2018-01-25 03:09
We want to add the status of the latest pacts from each tag.

beth
2018-01-25 03:10
Tags can be used to "bookmark" special versions (eg. "prod") or for introducing new interactions without breaking the provider builds (eg. "feat/new-thing")

beth
2018-01-25 03:11
The "feat/new-thing" style feature tags might be used for a few weeks, and once the new interactions are added to the provider, they become just part of the "normal" latest pact. Tags like "prod" and "master" will be ongoing however.

beth
2018-01-25 03:13
We're trying to work out if the "status" for each consumer/provider pair should be determined by the status of *all* the tagged pacts (as well as the overall latest) or just by the latest. Showing that something is failing all the time because some experimental pact failed 3 months ago and hasn't been removed or properly verified since is unhelpful.

beth
2018-01-25 03:14
But similarly, showing just the status of the latest pact may be unhelpful if you're really keen on knowing if your prod pacts are green.

alexei
2018-01-25 09:37
we will be soon

alok.pandey
2018-01-25 14:30
Hi @beth i have pact files which were generated from consumer side written in java in broker i need to verify them using pactjs in mocha.

ken.westdorp
2018-01-25 21:08
has joined #general2

zac.sims
2018-01-27 09:02
We are

matt
2018-01-27 23:54
Hi @alok.pandey, how can I help?

matt
2018-01-27 23:55
There is a full e2e example for both consumer and provider testing available, here is the provider spec: https://github.com/pact-foundation/pact-js/blob/master/examples/e2e/test/provider.spec.js

matt
2018-01-27 23:56
It will fetch pacts from the broker, and validate against the locally running provider

beth
2018-01-29 01:47
Sorry guys, I got interrupted during my train of thought last week. One of the things we're interested in knowing is, what are you trying to find out when you come to the index page of the broker?

abubics
2018-01-29 03:33
Things I usually do are: 1. find the pact for a pair of pacticipants, to implement the provider side 2. see if a pair has been verified 3. find stuff I?ve misconfigured, via the HAL browser 4. see matrix to see which pairs have been verified (not until the PR comes through :wink:) But that doesn?t necessarily answer the question of ?what would be useful on a dashboard/landing page??

alok.pandey
2018-01-30 08:33
hi @matt thanks it was full worth

kevin.meiresonne
2018-01-30 12:09
Thanks a million! Sorry for the late message :wink:

zac.sims
2018-01-31 08:23
Pact (or pact broker...) question, is there any standalone pact json to markdown library? Otherwise it only seems to be in pact-ruby.

beth
2018-01-31 08:31
No, but I could release it in the standalone very easily.

beth
2018-01-31 08:31
Can you raise it in the ruby standalone project?

matt
2018-01-31 08:33
What do you want to do with it @zac.sims?

matt
2018-01-31 08:33
FYI I might be popping out to seek tomorrow afternoon if you're free for a chat?

beth
2018-01-31 08:45
@zac.sims which language are you generating your pacts in btw?

beth
2018-01-31 08:52
If it's one that wraps the ruby standalone, you can find the pact cli and call it directly


zac.sims
2018-01-31 09:41
C#, but PactNet 2 wraps ruby so it's basically invisible

zac.sims
2018-01-31 09:41
Ty for the link

zac.sims
2018-01-31 09:43
Basically we generate the markdown post verification (as it's nice for consumers :)). Moving from PactNet to PactNet 2 has made this somewhat more difficult

beth
2018-01-31 10:18
The standalone executable files will be in the pact net package somewhere. Either way, I'll expose the cli in the standalone for you.

zac.sims
2018-01-31 10:26
Thanks! Much appreciated

kevin.meiresonne
2018-02-02 11:18
Need help on tagging. Can somebody please remind me how to tag the provider version? :slightly_smiling_face:



beth
2018-02-05 01:07
``` Usage: pact-broker create-version-tag -a, --pacticipant=PACTICIPANT -b, --broker-base-url=BROKER_BASE_URL -e, --version=VERSION --tag=TAG ```


kevin.meiresonne
2018-02-05 09:20
I have a question about the badge behaviour when specifying both consumer and provider tags (e.g. https://<broker>/matrix/provider/<provider>/latest/master/consumer/<consumer>/latest/master/badge.svg). I have the impression that when I've pushed a new version of the consumer pact, the badge switches back to "unknown". I would have expected it to indicate either "changed" (in case the pact actually changes) or "verified" (in case the new version's pact is unchanged).

kevin.meiresonne
2018-02-05 09:21
Is this a misconception on my behalf?

beth
2018-02-05 10:54
I'd expect it to be changed too. There might be a bug in the logic.

beth
2018-02-05 10:55
Can you send me the link for one that it's happening to, and I'll see if I can recreate it tomorrow.

kevin.meiresonne
2018-02-05 12:30
(Un)fortunately, our CI is constantly building and updating, so can't really provide a badge that will stay in that state for long :slightly_smiling_face:

kevin.meiresonne
2018-02-05 12:30
should be easy to reproduce though

beth
2018-02-06 04:48
I've fixed the problem @kevin.meiresonne but I have to fix an unrelated long running query before I can push the change.

kevin.meiresonne
2018-02-06 08:06
Thanks Beth! Any idea on the ETA of the fix on the hosted broker?

beth
2018-02-06 08:16
Not yet. I'm still trying to fix the Cartesian Explosion.

kevin.meiresonne
2018-02-06 08:20
sounds like fun :slightly_smiling_face:

kevin.meiresonne
2018-02-06 08:21
it's not super critical, but we're building a dashboard on our CI to have a visual overview of the contract verifications between all our services to know at any given time if we can deploy.

beth
2018-02-06 08:22
You know you can get the same info from the can-i-deploy tool?

kevin.meiresonne
2018-02-06 08:23
yeah, I'm looking into that one as well

kevin.meiresonne
2018-02-06 08:25
if I understand correctly, I can pass all my pacticipants into a single call to can-i-deploy, right?


beth
2018-02-06 08:25
and if you use tags, you don't have to name them explictly.

kevin.meiresonne
2018-02-06 08:25
cool, definitely gonna use that one on the dashboard as well

beth
2018-02-06 08:25
you just say "can I deploy Foo version 2 to prod"

kevin.meiresonne
2018-02-06 08:27
and that command traverses the dependencies?


kevin.meiresonne
2018-02-06 08:27
wow

beth
2018-02-06 08:28
it relies on you having tagged all the applications when you deploy them to an environment, so the broker knows what versions are in that particular environment.

kevin.meiresonne
2018-02-06 08:29
so that would be for instance pact-broker can-i-deploy --pacticipant <myservice> --version latest --to prod


beth
2018-02-06 08:30
pact-broker can-i-deploy --pacticipant <myservice> --latest --to prod

kevin.meiresonne
2018-02-06 08:30
right, indeed

kevin.meiresonne
2018-02-06 08:30
and does it matter where <myservice> sits in the "chain" of services?

beth
2018-02-06 08:30
I'd generally suggest putting in the explicit version of the pacticipant, as we've had times where what the broker thought was the latest wasn't what the CI thought was the latest.

beth
2018-02-06 08:31
it works for consumers and providers, you don't need to specify which one it is.

beth
2018-02-06 08:31
the broker can tell what talks to what.

beth
2018-02-06 08:31
it just looks at all the services that the application talks to, finds the prod version of each of them, and makes sure that there is a verification between those versions, and the one you're about to deploy

kevin.meiresonne
2018-02-06 08:32
just thinking how I can make sure that can-i-deploy doesn't miss a service dependency

beth
2018-02-06 08:32
it comes back with the results.

kevin.meiresonne
2018-02-06 08:33
right

beth
2018-02-06 08:33
it outputs the matrix to stdout

beth
2018-02-06 08:33
if you want, you can name each pacticipant explicitly

beth
2018-02-06 08:34
but you're more likely to forget to update the list when a new service is created, and then it wont' be considered.

kevin.meiresonne
2018-02-06 08:36
what happens when the tool finds no verification for a certain contract? Does it treat it as a failure or success?

beth
2018-02-06 08:36
failure

beth
2018-02-06 08:36
if you know that there is a project that doesn't do verifications, you'll need to list the pacticipant names explicitly

beth
2018-02-06 08:37
though I have been wondering about adding an --ignore PACTICIPANT option

kevin.meiresonne
2018-02-06 08:37
in fairness, an ignore would help us potentially, as we are rolling out pacts gradually as we go along

kevin.meiresonne
2018-02-06 08:38
but like said, explicit calls would get us there as well for now

beth
2018-02-06 10:32
I've had a partial breakthrough on the Explosion. It's enough that I should be able to deploy tomorrow. It take a bit longer than usual to deploy, but given that you're in a different timezone, it shouldn't affect you.

beth
2018-02-06 22:12
@kevin.meiresonne I've deployed the badge fix, let me know how it goes

beth
2018-02-06 22:18
You'll find there is now an icon to view the matrix from the index page, and a way to toggle the "latest tags" view on the index.

beth
2018-02-06 22:19
It does turn *all* the tags on, which can make it slow. I'm still working on optimising that. However, if you care about certain tags, you can just say `?tags[]=master&tags[]=prod` instead of `tags=true`.

kevin.meiresonne
2018-02-07 08:12
@ Badges seem fixed at first sight! Also found the icon to switch to the matrix, nice addition! Love the tags on the matrix. I suppose a blue tag indicates the latest version of that tag? Not quite sure how to interpret the index page with tag filtering. When I filter on tag "develop" for instance, I also get lines with contracts that are not having that tag...

beth
2018-02-07 08:12
Yes, it shows you the overall latest, as well as the latest for the tags.

kevin.meiresonne
2018-02-07 08:13
ah, right

beth
2018-02-07 08:13
Yes, blue indicates the latest of the tag.

beth
2018-02-07 08:14
Mitch will be making the index page much prettier, so I won't put too much work into it now.

kevin.meiresonne
2018-02-07 08:14
found one small issue on the index page: one of the contracts is shown twice (no tag filtering)

kevin.meiresonne
2018-02-07 08:14
a duplicate line

beth
2018-02-07 08:14
Andras found that too.

beth
2018-02-07 08:15
Yes, I think it's because I did a last minute change from "union" to "union all", to speed up a query.

beth
2018-02-07 08:15
I'll need to whack a distinct on it.

kevin.meiresonne
2018-02-07 08:15
ok, no big issue, just wanted to share

beth
2018-02-07 08:16
Thanks. I'll look at it when I get a moment.

kevin.meiresonne
2018-02-07 08:16
Looking forward to Mitch's designs, they look awesome

kevin.meiresonne
2018-02-07 08:16
what's the timeframe we're looking at here, for the first rollout of those?

beth
2018-02-07 09:14
Mitch is on leave now, but we'd like to get the first cut out within a few weeks.

abubics
2018-02-07 23:33
btw, I think it was Tim, not me :slightly_smiling_face:

beth
2018-02-08 01:44
Either way, it's fixed now!

beth
2018-02-08 01:45
@kevin.meiresonne I've fixed that duplicate row in the index. I've slightly improved the way the tags are represented too.

mouser
2018-02-08 03:03
i seem to be having issues with our hosted pact broker? is anyone aware of any problem?

beth
2018-02-08 03:03
I'm just deploying

mouser
2018-02-08 03:03
:thumbsup:

beth
2018-02-08 03:03
Sorry, I forgot you guys were in Melbourne TZ

beth
2018-02-08 03:04
We need to get our zero downtime deploys happening

mouser
2018-02-08 03:06
no problem

beth
2018-02-08 03:06
This is an unusually long migration as it's materializing the query that works out the latest versions of everything.

beth
2018-02-08 03:13
Back up @mouser

beth
2018-02-08 03:15
I've raised an issue to implement zero downtime deployments

mouser
2018-02-08 04:07
thanks @beth!

beth
2018-02-08 07:20
I've rolled out some improvements to a some of the brokers, but I've just done a few so far, and we'll make sure everything is :green_heart: before we go the rest. There is a link to the matrix from the dashboard now, and the tags and latest tags are shown on the matrix page.

beth
2018-02-08 07:20
Check out the "Show latest tags" link on the index page.

beth
2018-02-08 07:21
Mitch has been working on a fancy new UI, and we'll get some feedback from a few of you soon. Ping @mellis if you'd like to be a part of that process.

abubics
2018-02-08 07:21
tags look nice

beth
2018-02-08 07:21
FYI, we've started the ball rolling on message pacts.

beth
2018-02-08 07:21
It's all going on.

beth
2018-02-08 07:22
Like a :frog: in a :sock:

beth
2018-02-08 07:22
Damn, no :sock: emoji.

kevin.meiresonne
2018-02-08 07:59
Not sure what frogs in socks mean, but I'll take it! Love the improvements you're doing on the broker!

matt
2018-02-08 07:59
:smile:

beth
2018-02-08 08:00
Technically, it should be "going off like a frog in a sock". It's probably an Aussie-ism.


matt
2018-02-08 08:00
We?re nuts :wink:

kevin.meiresonne
2018-02-08 08:03
Btw, nice touch on shortening the version when it's representing a git sha!

kevin.meiresonne
2018-02-08 08:03
Much better

beth
2018-02-08 08:04
Thanks! It's much more readable.

kevin.meiresonne
2018-02-08 08:08
True... If I could be nitpicking, git sha's are usually shortened to the first 8 characters, not 7 :wink:

zac.sims
2018-02-08 08:36
Well, shortest non-clash > 4 to be fair, and the default is still 7 on most git installs ;)

kevin.meiresonne
2018-02-08 08:45
hmm, interesting :slightly_smiling_face: Nevermind my comment then :slightly_smiling_face:

kevin.meiresonne
2018-02-08 08:47
I have a question on webhooks. Which variables can I use in my webhook. The only one I find is "${pactbroker.pactUrl}". Is there a way to know get the tags as well?

kevin.meiresonne
2018-02-08 09:25
For instance, when my "production" consumer pact changes, I want to trigger a build for the "production" branch of my provider. I don't want to trigger the "production" branch build for pact changes on other branches (tag) of the consumer.

kevin.meiresonne
2018-02-08 09:56
I think I found an alternative approach on solving my issue by using the pactUrl. Gonna give that a go.

thadir
2018-02-08 10:18
Hmm we been using pact for a while, and I want to auto get the version in trough maven. The consumer has now a 0-snapshot (maven default) but I want to also see what version of provider they expect (I generate some of my pacts trough client construction). How can I make sure that the version paramater is passed correctly to my broker?

beth
2018-02-08 10:49
@kevin.meiresonne I wanted to add the tags in, but because there can be multiple of them, I didn't know how to represent them using variable substitution. Then I came across some info at a conference about "state watch", where a client subscribes to being notified when state changes, and then is given the tools to find out for itself whether or not something should happen. Here's an example of how I imagine a verification callback webhook would go https://github.com/pact-foundation/pact_broker-client/blob/master/example/scripts/deploy-consumer.sh

kevin.meiresonne
2018-02-08 10:49
@beth Did something get reverted on the broker? I have duplicate lines again.

beth
2018-02-08 10:49
The one thing I think may be missing is the version number in the env vars.

beth
2018-02-08 10:51
@kevin.meiresonne let me deploy yours again, I did a few deployments this morning, and yours doesn't have the latest

beth
2018-02-08 10:53
@thadir I'm afraid I don't understand your question, but that may be because I'm not a Java person. @rholshausen might understand better.

kevin.meiresonne
2018-02-08 10:56
@bethgiven I have the pact url of the published pact, is there a way I can know which tags are on it?

kevin.meiresonne
2018-02-08 10:56
I don't spot it in the hal browser

beth
2018-02-08 10:57
existing_tags=$(${PACT_BROKER_CLIENT} describe-version --pacticipant ${application} --version ${version} --output json | jq "[._embedded.tags[].name]" | jq 'join("\n")' --raw-output)

beth
2018-02-08 10:57
Have a look at the example script.

beth
2018-02-08 10:58
``` can_i_deploy_output=$(${PACT_BROKER_CLIENT} can-i-deploy --pacticipant ${application} --version ${version}) can_i_deploy_exit_code=$? set -e echo "${can_i_deploy_output}" if [[ "${can_i_deploy_exit_code}" == "0" ]]; then existing_tags=$(${PACT_BROKER_CLIENT} describe-version --pacticipant ${application} --version ${version} --output json | jq "[._embedded.tags[].name]" | jq 'join("\n")' --raw-output) if [ $(echo "${existing_tags}" | grep "${stage}") ]; then echo "Version ${version} of ${application} has already been deployed to ${stage}" else echo "Deploying version ${version} of ${application} to ${stage}" # do deployment here ${PACT_BROKER_CLIENT} create-version-tag --pacticipant ${application} --version ${version} --tag ${stage} fi else echo "Cannot currently deploy version ${version} of ${application} to ${stage}" fi ```

kevin.meiresonne
2018-02-08 10:58
aah, right, got it now. Testing

beth
2018-02-08 10:58
The one thing that is missing from this is getting the version of the consumer that has been verified.

beth
2018-02-08 10:59
The verification belongs to the *content* not the *version number*.

kevin.meiresonne
2018-02-08 10:59
well, I could extract that from the pacturl

beth
2018-02-08 10:59
The same *content* may be published for many many different consumer versions.

beth
2018-02-08 11:01
Eg. if v1 (tagged prod), v2, and v3 (tagged master) are all the same pact content, and the provider verifies /latest/prod and /latest/master, then there will be two verifications for the same underlying content.

beth
2018-02-08 11:02
Also, the way the verification URLs currently work (which I may need to change) there's no way of knowing whether the provider accessed certain content because it was /latest or /latest/{TAG}

kevin.meiresonne
2018-02-08 11:03
I see

beth
2018-02-08 11:04
It's a challenging problem of many to many to many relationships!

beth
2018-02-08 11:05
In the above scenario when a provider verifies *any* of v1, v2, or v3, because the content is the same, the implication is that *any* of these versions could be safely deployed.

beth
2018-02-08 11:06
Only the consumer team could tell which one they actually want to deploy though. I'm guessing it would generally be the latest version.

beth
2018-02-08 11:09
If a consumer publishes v1, and then the provider verifies v1, but while the verification is running, the consumer publishes v2, which is exactly the same. If the webhook was to have a ${consumerVersion} variable, would it be v1 (which was the latest when the verification started) or v2 (which was the latest when the verification finished and is equivalent to v1 anyway)??

beth
2018-02-08 11:09
These are my challenges! The coding is easy - working out how things should operate is *hard*!

beth
2018-02-08 11:10
Anyway, I need to go to bed. Let me know if you (or anyone!) has any thoughts on this.

beth
2018-02-08 11:10
@kevin.meiresonne I've just kicked off a new deployment to your broker, it should fix the duplicate issue.

kevin.meiresonne
2018-02-08 11:15
see ya tomorrow :slightly_smiling_face:

beth
2018-02-08 11:21
Bother, it hasn't fixed Andras's one, so I'm guessing yours is still the same. Will look again in the morning.

kevin.meiresonne
2018-02-09 08:09
looks fixed now!


kevin.meiresonne
2018-02-09 10:20
and now I have duplicates again... :disappointed:

beth
2018-02-09 10:27
Hm. So, I've created a materialised view to make the index page respond more quickly. It updates asynchronously just after a pact is published. Something must be incorrect there.

beth
2018-02-09 10:28
The strange thing is, to fix the data, I ran the same sql that runs after the pact is published.

beth
2018-02-09 10:28
I must have a misunderstanding about something. Will investigate when I have a chance.

kevin.meiresonne
2018-02-09 10:32
yeah, that could well be triggering it

beth
2018-02-09 10:32
I wonder if it's a timing thing.

beth
2018-02-09 10:32
Perhaps the tagging and the publishing happening so closely collide.

beth
2018-02-09 10:32
I implement it quite simply, so it may need to be more sophisticated.

kevin.meiresonne
2018-02-09 10:32
if it helps: when publishing the pact files, I tag the version after that

kevin.meiresonne
2018-02-09 10:33
maybe I need to do it the other way round?

beth
2018-02-09 10:33
They both trigger a refresh.

beth
2018-02-09 10:33
The order will not matter.

kevin.meiresonne
2018-02-09 10:33
ok

kevin.meiresonne
2018-02-09 10:35
my script is pretty generic. This particular service publishes 3 pacts with 3 other services. So to be fair, my consumer pacticipant is tagging itself 3x with the same tag because it's the same pacticipant in each of the three pacts. Could that cause it?

kevin.meiresonne
2018-02-09 10:36
I admit, it's a bit lame on my behalf :slightly_smiling_face:

beth
2018-02-09 10:36
Even if it's lame, it should still not cause duplicates :-P

beth
2018-02-09 10:38
It helps to know that though, because if I can write a script to recreate the issue, I'll at least know when I've fixed it.

thadir
2018-02-09 12:21
Hmm were going ot use it internal and external :S

abhijeet.daspatnaik
2018-02-12 06:09
has joined #general2

beth
2018-02-12 22:44
If anyone wants to follow along at home (@kevin.meiresonne) I've picked up work on ruby message pact, which will be bundled as part of the ruby-standalone executable to be used for all the other wrapper languages. I've created at gitter channel for it here: https://gitter.im/pact-foundation/pact-message-ruby

abhijeet.daspatnaik
2018-02-13 00:35
I am a Test Lead and we are making a POC for our microservices testing. I need some general information about PACT. Is this the right channel to discuss about PACT concepts or its only the Pact Broker related stuff that needs to be discussed here?

beth
2018-02-13 02:48
Hi @abhijeet.daspatnaik we don't officially support pact here, but of course, pact usage and best practice comes up often. In terms of sharing knowledge, the best place to ask is stack overflow or gitter, so that others can benefit from the conversation.

beth
2018-02-13 02:49
The same people (myself, @matt, @rholshausen and some of our Super Users) will be on all of the forums.

abhijeet.daspatnaik
2018-02-13 02:52
No problem at all. One question related to Broker. I highly appreciate the fact the Pact Broker is free now. But is there a chance that after few months/years this would be priced?

beth
2018-02-13 02:55
We will be using the freemium model of making the open source version available for free, and providing extra features on top of the open source model as a paid subscription.

matt
2018-02-13 04:08
As Beth mentioned, at least for the foreseeable future, the bog standard pact broker (that you get from GitHub) will be available as a service for free. Other features may be added and made available as a monthly subscription.

abhijeet.daspatnaik
2018-02-13 23:36
Thank you @matt and @beth. Really appreciate ur efforts and the work that you guys are doing. Keep up the great work:+1::+1:

matt
2018-02-13 23:42
most welcome!

thadir
2018-02-14 10:17
Talking about freemium :wink: how are things going along with your road map @matt and @beth for the broker?

matt
2018-02-14 10:36
I won't say too much, but we have done a lot of work behind the scenes on approach, roadmap and business model and have been working closely with our directors on bootstrapping a team and creating a structure to be able to make this happen. Can't talk to specific dates but it's happening. :100:%

thadir
2018-02-14 10:45
sweet, and ill dm you some good info

matt
2018-02-14 10:46
Thanks, that'd be great

icapurrofagian
2018-02-15 02:11
has joined #general2

andrew.nicholson
2018-02-15 18:45
I have a question about pact versioning with the broker....it seems like the version of the pact corresponds to a version of the consumer software. Is the intended idea that the consumer creates/publishes new pacts as it develops the client code for a particular endpoint?

andrew.nicholson
2018-02-15 18:47
In our current development workflow, we are often spec'ing out multiple different features simultaneously, so we want to create/publish pacts for several different endpoints at the same time to allow the providers to begin work...but we don't know exactly which features will be delivered in what order, so it becomes difficult to figure out how to version the pacts properly...

kevin.meiresonne
2018-02-15 19:19
The versioning is indeed driven by the consumer (consumer driven contract). If you're working on different features/endpoints at once, you can tag them as well. Your tags could indicate the feature for instance. Then you can have your provider verify against the latest consumer pact for a given tag for example

andrew.nicholson
2018-02-15 19:28
That's sort of what we do right now -- if we are developing feature A B and C, then they are on some future version 1.0.1 with a 'dev' tag -- then when one of them is completed we release 1.0.1 with whichever feature is complete, and then tag 1.0.1 as 'prod'. It's a little wonky though because we have to regenerate the 1.0.1 pact and remember to exclude the features that have not been finished.

andrew.nicholson
2018-02-15 19:29
sometimes we have accidentally put an unreleased feature in the prod-tagged pact b/c we forgot to exclude it -- then we get unnecessary provider verification failures

kevin.meiresonne
2018-02-15 19:30
We do it differently. Every feature has its own tag, so in your use case we would have 1 prod contract and 3 feature contracts. Whenever a feature is ready, it gets merged into the prod contract.

andrew.nicholson
2018-02-15 19:30
what about the version, though -- do they all share a version?

kevin.meiresonne
2018-02-15 19:32
We don't use semantic versioning on the contracts. Every published pact has a new version (git sha)

andrew.nicholson
2018-02-15 19:33
Ah -- is that compatible with the pact-broker 'latest' capabilities? Verifying the 'latest' version of a particular tag, or showing the latest version by default in the index?

andrew.nicholson
2018-02-15 19:33
I thought that 'latest' corresponded to 'highest version number'

kevin.meiresonne
2018-02-15 19:34
It is, but you need to change the configuration of the broker to not base latest on version, but on date published

andrew.nicholson
2018-02-15 19:34
I didn't realize that was an option -- thanks for the info.

andrew.nicholson
2018-02-15 19:34
We might be able to change our workflow to fit that scheme.

kevin.meiresonne
2018-02-15 19:35
I guess it depends on the use case. But for us this was a better fit. We don't really care about semantic versioning

kevin.meiresonne
2018-02-15 19:36
We might revisit that approach but for now it works for us

kevin.meiresonne
2018-02-15 19:36
Are you using the hosted broker, or do you host it yourself?

andrew.nicholson
2018-02-15 19:37
Currently self-hosting

kevin.meiresonne
2018-02-15 19:37
Great, then you should be able to change that config yourself


kevin.meiresonne
2018-02-15 19:39
Check the "ordering by date" topic

andrew.nicholson
2018-02-15 19:39
Neat -- thanks

kevin.meiresonne
2018-02-15 19:40
You're welcome

matt
2018-02-15 20:35
@andrew.nicholson We typically recommend the flow @kevin.meiresonne is talking about, mostly because it is consistent with Git branches which makes it somewhat easier to reason about. It also is well supported by the tooling.

matt
2018-02-15 20:35
Glad to see you got it sorted, and thanks @kevin.meiresonne :slightly_smiling_face:

kevin.meiresonne
2018-02-15 20:36
just spreading the knowledge I've learned from you and @beth :slightly_smiling_face:

beth
2018-02-15 20:38
Thanks @kevin.meiresonne!

andrew.nicholson
2018-02-15 21:05
@matt yes, we've been finding our current workflow somewhat difficult to reason about, and are glad for the alternate suggestion. Thanks!

andrew.nicholson
2018-02-15 21:05
I appreciate that y'all are always friendly and helpful!

matt
2018-02-15 21:08
No worries, don?t be afraid to make suggestions or raise feature requests. We?re always interested in understanding how we can fit or shape our customers? processes to make CD better.

matt.canty
2018-02-16 09:30
has joined #general2

matthewcanty
2018-02-19 09:20
has joined #general2

matthewcanty
2018-02-20 15:49
Hi everyone. I?m unsure what approach to take with micro-services architecture. However you want to define micro-service, there is a single `http://api.example.com` proxying calls to `service-x` or `service-y`. Are client-side developers writing their Pact tests expected to know which service will be serving them, or is there a pattern which allows for multiple providers to satisfy the expectations of consumers? Appreciate I may be a little off the ball here. If anyone has particular experience using Pact in an API Gateway/Serverless/Containerised ecosystem then it?d be great to hear from you. Thanks!

thadir
2018-02-20 17:00
Hey @matt.canty welcome to the wonderful world of contract testing. If I get your question you have a Provider (service-x) and consumers and you have more then one Provider hosted (trough a gateway) The Pact is between the Consumer Provider. So if you have 10 unique different services then you will expet a 1 to 10 relation ship. Is it 10 consumers that reperesens the one service then its a 1 to 1 relation ship. You do not care about how many it is in quantety your interested in uniqueness.

matthewcanty
2018-02-20 17:18
Yeah I think I know where I was going wrong in my thinking. I was thinking that there was a 1:1 between provider and domain. But of course, there isn?t. I think this answers my question. Thanks.

travi
2018-02-20 17:30
to build on that question with one ive been deferring figuring out for a while... we have a hypermedia api where we make requests by following a traversal of links to make a request, rather than making each request individually. the link traversal crosses provider boundaries, potentially hitting several providers in a single "request" from the perspective of our app. since we cant really break out the individual requests, we would need to test the whole traversal together. has anyone had success with a consumer test that makes multiple requests and touches more than one provider? (our consumer is a node app)

matthewcanty
2018-02-20 18:29
Sounds like you have expectations on multiple providers, each are responsible for their part in the chain.

thadir
2018-02-20 21:31
Well this is exactly why you want a consuemr test. The provider contract is somting like this for example:

thadir
2018-02-20 21:32
Provider { contract1: "bla", contract2: "bla", contract3: "bla", }

thadir
2018-02-20 21:32
Then you you consuemrs can use any of those combinations

thadir
2018-02-20 21:33
Same with the parameters

travi
2018-02-20 22:00
yeah, the part i think i was concerned with in the past was hitting multiple providers from the same test. looking at things again now (without time to verify with implementation), i guess i really just need to define each of the separate providers for the test, set up the expectations for each, and then verify each provider's expectations individually. actually seems a lot more doable than i realized the last time i looked into it. now just need to find time to confirm

thadir
2018-02-20 22:03
You dont need realy if its one provider test. Depens on the language.

travi
2018-02-20 22:05
one consumer-driven test would need to involve a single consumer and multiple providers to generate the pact for a single traversal. each provider would verify only the part of the pact that they are involved in

abubics
2018-02-21 00:39
If you?re hitting multiple providers, each of those would be a separate pact (and separate tests). Each external call should be an individual test, that?s explicitly the granularity of pact tests :) Pact doesn?t verify behaviour of consecutive calls between any number of systems, not even 1-1.

alok.pandey
2018-02-21 13:06
Hi

alok.pandey
2018-02-21 13:07
can we give multple provider during the verification?

travi
2018-02-21 15:11
that assumption is part of what has made me hesitate to investigate in the past. it seems to be the suggestion, but is not really possible in our case. our app does not make individual calls. we use traverson to follow traversals, so the individual requests are abstracted away from our code. the closest we can come to them is testing a full traversal, which is multiple calls to multiple providers, in a single consumer test

thadir
2018-02-21 15:27
That does not sound microservice like but a litle monolith with some microservice calls. :slightly_smiling_face: sounds like a challange.

matt
2018-02-21 21:34
What do you mea @alok.pandey?

beth
2018-02-21 22:04
You can verify a list of pacts at the same time and they can be from as many providers as you like.

beth
2018-02-21 22:04
If I understand your question correctly.

abubics
2018-02-21 23:22
Looking at `traverson`?s readme, it doesn?t seem like a good fit for Pact, without some intervention. Because it?s expecting HATEOAS, you can?t know what URLs and URL paths it will give you.

abubics
2018-02-21 23:23
An option (maybe not the best) is to create a test consumer that exercises the endpoints explicitly. It?s less good than a real consumer, because it may use some endpoints that aren?t really used, and miss some that are.

abubics
2018-02-21 23:24
Another option might be to record what endpoints `traverson` invokes, and make sure each one has a Pact test.

abubics
2018-02-21 23:25
Other traversal tools that obviate Pact (such as GraphQL) provide different ways of assuring data shape.

abubics
2018-02-21 23:31
Another take on HATEOAS is that it?s intended to be dynamic, and if the consumer can?t handle the response, the provider can give a fallback response

abubics
2018-02-21 23:31
so, most assurances become unnecesary

beth
2018-02-22 00:34
So, I have been well aware that the way the pact is currently implemented breaks hateos since we wrote it, because the first services we wrote it for used HAL. I would adore making a proper HATEOS compliant pact format where instead of recording the path, you recorded the HAL relation and the arguments to that.


beth
2018-02-22 00:36
I have done a bit of a hack in my pact broker client/pact broker pacts to allow me to not have to know the actual URL I was hitting. I provided a fake URL in my mocked response on the consumer side, and then, I did a find/replace on the pact before verifying it to replace the placeholder URL with the correct URL before provider verification

beth
2018-02-22 00:38
And I've just realised that I haven't actually answered the question that was raised. @travi you'll need to start up two mock servers at the same time, and your mocked data from the first will need to point to a URL on the second.


beth
2018-02-22 00:44
Here's the code (it's a piece of Rack middlware) that does the find and replace on the request to give it the actual URL https://github.com/pact-foundation/pact_broker/blob/master/spec/service_consumers/hal_relation_proxy_app.rb

beth
2018-02-22 00:44
As I said, I'd LOVE to give this first class support, but there are too many other urgent things to do first.

travi
2018-02-22 06:27
understood on priorities and i understand that clients that actually use hateoas fully by traversing links are fairly uncommon. obviously i would love for this to have first class support at some point and would even like to help get pact there because im a big fan of the idea of pact. other priorities keep trumping me diving deeper since i keep tripping on how to get past this fairly fundamental part of getting started in our context

beth
2018-02-22 06:27
How's your ruby? :wink:

beth
2018-02-22 06:28
Did the hacky way make sense?

travi
2018-02-22 06:28
honestly i hardly do ruby at all. im mostly js focued

beth
2018-02-22 06:29
Ruby's not cool these days. It's hard to find devs!

travi
2018-02-22 06:29
we do still follow decent url patterns in our api for developer experience for at least understanding what the link traversal is doing

travi
2018-02-22 06:29
so we can still define urls that will match on the providers w/o much trouble

travi
2018-02-22 06:30
the main sticking point taht ive had that i kind of realized yesterday after asking the question was that it should be possible to define multiple providers in the same test and just verify each independantly

travi
2018-02-22 06:30
and sounds like you confirm that that should work, correct?


beth
2018-02-22 06:31
no problems at all.

travi
2018-02-22 06:31
if thats the case, ill need to find some time to give it a shot now that ive got some better context for how to approach it

beth
2018-02-22 06:32
Cool. Let me know how you go.

travi
2018-02-22 06:32
if i have some success, maybe i an get motivated to find a way to help it move along at a more first class level (when the timing is right on your side)

travi
2018-02-22 06:33
for sure. i have a bunch of other things on my plate, but im also excited to see this work, so hoepfully i can find time soon and report back

travi
2018-02-22 06:33
thanks for the additional info!

abubics
2018-02-22 06:33
This is only for chains of nullipotent traversal calls, right? Otherwise it starts hitting behaviour issues

travi
2018-02-22 06:34
if that question is to me, i need a bit more info. not sure i understand well enough to answer

abubics
2018-02-22 06:36
so, in ReST, GET is nullipotent (no side-effects), while PUT and DELETE are idempotent (side-effect the first time)

abubics
2018-02-22 06:37
Pact (in its current state) isn?t intended to verify behaviour in a sequence of operations that change state.

abubics
2018-02-22 06:37
If your operation needs to perform a traversal in the lead-up to a PUT, POST, or DELETE, that doesn?t violate this constraint.

beth
2018-02-22 06:38
each request/response is tested separately

travi
2018-02-22 06:38
ah, it was the nullipotent piece that tripped me up vs idempotent

abubics
2018-02-22 06:38
But you shouldn?t be trying to verify anything after a PUT, POST, or DELETE, because that?s a behaviour symptom :)

travi
2018-02-22 06:39
right, we would perform GETs for the traversal leading up to a GET, POST, PUT, or DELETE

travi
2018-02-22 06:39
but wouldnt be wanting to verify any state change that resulted from the POST, PUT, or DELETE

travi
2018-02-22 06:39
well, at least not as a follow up request

abubics
2018-02-22 06:40
great ^_^ good to be on the same page :D sorry if my approach was hard to understand

abubics
2018-02-22 06:40
I think that?s what you meant all along ;)

travi
2018-02-22 06:40
we would probably want to verify the response of the POST, PUT, DELETE, which returns the updated state

travi
2018-02-22 06:40
but i can see how that starts to get into a grey area

abubics
2018-02-22 06:42
as long as there are no further operations after a side-effect / state change, then there shouldn?t be any constraint violation :smile:

travi
2018-02-22 06:42
:thumbsup:

abubics
2018-02-22 06:42
but asserting the result of the state change is totally fine, and expected

travi
2018-02-22 06:44
good deal. its late enough here, that im not thinking through it fully, but that makes sense

sdulebskiy
2018-02-22 10:39
has joined #general2

omar10594
2018-02-22 20:44
has joined #general2

travi
2018-02-23 18:06
I ended up taking a look and realized that there is still a problem that I'll need to figure out a solution for. We serve our individual microservices from the same host domain, routed by a context root. Our links are relative to the root domain rather than being full What that means for the local providers is that they need to be accessible on the same port. I don't suppose there is an easier way to accomplish this than configuring and starting some sort of local proxy and routing the tests through that rather than hitting the stubbed providers directly?

james
2018-02-25 12:33
has joined #general2

kevin.meiresonne
2018-02-26 07:51
Hi, is it possible the hosted broker is down?

kevin.meiresonne
2018-02-26 07:52
Getting nasty NoMethodError today on the home page

kevin.meiresonne
2018-02-26 07:54
It appears to only happen on the pact broker home page. The other pages are still accessible

matt
2018-02-26 07:56
Not that I'm aware of @kevin.meiresonne

matt
2018-02-26 07:56
I'll check when I get home, no alerts have triggered

matt
2018-02-26 08:08
Are the APIs etc still working?

kevin.meiresonne
2018-02-26 08:08
yeah, the HAL browser seems fine

matt
2018-02-26 08:10
ok cool, a bigger concern would be if your CI/CD processes stopped because of it.

kevin.meiresonne
2018-02-26 08:13
that would be a lot worse indeed :slightly_smiling_face:

kevin.meiresonne
2018-02-26 08:13
Still checking our systems, but no indications of errors on the CI level

matt
2018-02-26 08:14
ok cool, I can see a few 500's in the logs (not enough to trigger alert)

matt
2018-02-26 08:14
and they?re all yours at the moment

matt
2018-02-26 08:15
I wonder if it relates to the new pact matrix stuff that?s being tested

kevin.meiresonne
2018-02-26 08:16
yeah, I get the 500 each time I refresh the broker home page

matt
2018-02-26 08:16
I?ll have to get Beth to assist on this one. It could be a funny query missing something key piece of info

kevin.meiresonne
2018-02-26 08:16
ok

beth
2018-02-26 08:19
I'll be able to look at it in about 45 mins

kevin.meiresonne
2018-02-26 08:20
thanks Beth. If you need more info, I'm here for the next 9 hours (but I guess you won't :D)

beth
2018-02-26 08:27
Cool, I'll let you know.

beth
2018-02-26 09:43
@kevin.meiresonne all good now.

kevin.meiresonne
2018-02-26 09:44
Cool, it works now indeed!

kevin.meiresonne
2018-02-26 09:44
thanks a lot!

beth
2018-02-26 09:46
np, sorry about the error.

kevin.meiresonne
2018-02-26 09:51
no worries, no harm done :slightly_smiling_face:

matt
2018-02-26 09:56
We?ve found a config issue that we?ll sort out from this, so sorry, but thanks

sinclair.calleja
2018-03-01 01:22
has joined #general2

sinclair.calleja
2018-03-01 01:33
Hello everyone

sinclair.calleja
2018-03-01 01:35
At Domino's we're considering using Hosted PactBroker as a store for our pact definitions of our microservices

sinclair.calleja
2018-03-01 01:36
We've got a few questions though related to IP and any legal issues arising out of storing information about our services outside of our internal environment

sinclair.calleja
2018-03-01 01:37
Typically our legal team would require a questionnaire to be filled out by our partners, which would include things like obligation to notify us in case of a data breach for instance, stuff like that

sinclair.calleja
2018-03-01 01:37
I undertand you guys are offering this service for free, and we are very thankful for this

rholshausen
2018-03-01 01:38
Hi @sinclair.calleja, shoot through your questions

sinclair.calleja
2018-03-01 01:38
However while free is good, am I right to assume that it comes with no liabilities and maybe even no obligations from your end as regards to IP?

rholshausen
2018-03-01 01:39
That's correct, we offer the service for free at the moment, but we can't offer any SLA's

rholshausen
2018-03-01 01:40
We are moving to a freemium model where you can get service level agreements and support for a subscription cost

rholshausen
2018-03-01 01:42
The base version will always be free, but will also come with no guarantees, apart from us generally following accepted industry standards

rholshausen
2018-03-01 01:44
We will protect your IP, take every precaution for secure the data and try to maintain high levels of up-time for the service

rholshausen
2018-03-01 01:45
Does that answer your question?

sinclair.calleja
2018-03-01 01:46
@rholshausen Thanks for that! I'm also going through the Terms & Privacy pages on the website, which would be a good start for our legal people

matt
2018-03-01 07:08
@sinclair.calleja Hi! Thanks for raising this, you're not the first to ask about it. Whilst the service isn't out of beta yet, we can likely cater for most of your needs with a custom contract in the interim, should your legal team require extra assurances. If you'd like to chat more about this, DM me and we can go from there

thomas.heilbronner
2018-03-01 10:32
has joined #general2

thomas.heilbronner
2018-03-01 16:02
Hello everyone, when I?m in the ?The Matrix? view for my pact, I can access the pact information by clicking on the version (2nd column). When I click at the provider verification version (5th column) to so the latest verification details I end up in the HAL Browser with the response header `405 Method Not Allowed`. Is this the intended behaviour? Is there a way to have a look at the verifications an why they for example failed with the details you see on your local pact verification run? Or even better, is there a way to feed the verification response from to provider back into the consumer test? I currently have a setup where consumer and provider tests run green, but the actual integration fails. (I added a json property the consumer can not de-serialize) Feeding back the actual provider response into the consumer test would uncover this problem. Am I missing something?

beth
2018-03-01 21:21
Hi @thomas.heilbronner we haven't implemented the publishing of test results yet, but it's high up on our priority list.

beth
2018-03-01 21:22
I'm not sure why you're getting a 405, let me investigate and get back to you.

beth
2018-03-01 21:24
That is an interesting thought about feeding the actual response back to the consumer. I'm not sure how it would work, as the actual response may differ in content significantly from the example response, making the tests fail in many ways. Tee matchers that allow you to avoid brittle tests would work against you in this case.

beth
2018-03-01 21:25
Seeing the test results would obviously help, and we'll be doing that as soon as possible.

beth
2018-03-01 21:25
I assume you're using a DiUS pact broker? Can you PM me your subdomain please?

mouser
2018-03-03 00:38
Is the hosted pact broker under maintenance at the moment? Currently receiving the following error: ```Sequel::DatabaseDisconnectError at / PG::UnableToSend: SSL connection has been closed unexpectedly``` This is not urgent btw? just thought i?d raise it seeing as i?d noticed it :slightly_smiling_face:

beth
2018-03-03 00:38
I just saw it too.

beth
2018-03-03 00:39
No maintenance

beth
2018-03-03 00:39
Is it repeating? Or does it go away when you retry?

mouser
2018-03-03 00:44
Ok looks ok now

mouser
2018-03-03 00:44
:slightly_smiling_face:

beth
2018-03-03 00:44
It's only started in the last few hours, but there have been no changes to the code for days.


mouser
2018-03-03 00:45
Thanks for taking a look - and sorry to interrupt your weekend!

beth
2018-03-03 00:46
NP #supportlyf

mouser
2018-03-03 00:47
:thumbsup:

beth
2018-03-03 00:47
I know the ruby client has retries built in, but not sure about the Java one.

matt
2018-03-03 01:22
We got the alert, just a couple of blips. Will investigate

krishnaraj.krishnan
2018-03-05 05:50
has joined #general2

dennis
2018-03-06 09:52
I got a question for the ones that are also using versioning + tags

dennis
2018-03-06 09:52
At this moment we have 45 pacts / contract

dennis
2018-03-06 09:53
and during our CI phase we always push a new version ( with the version from maven = semver ) towards the pact broker

dennis
2018-03-06 09:53
this results in 1100 versions allready per pact

dennis
2018-03-06 09:53
Right now this is becoming really slow

dennis
2018-03-06 09:53
I was wondering if this is the correct strategy, or should we build some code that we only push a pact when something actually changed ?

beth
2018-03-06 10:03
A new pact version is only created when the JSON changes. Make sure you don't have any random data in there.

beth
2018-03-06 10:03
Also, we can do a clean up. The only important versions to keep are the latest, and the latest for each tag (unless you're doing anything unusual).

beth
2018-03-06 10:04
The publishing may have slowed down recent because we're calculating the Matrix on publish, rather than on query because it was just taking too long to perform the query.

dennis
2018-03-06 10:05
we don?t have the latest release of the pact broker with the matrix yet

beth
2018-03-06 10:05
You're missing out ;-)

beth
2018-03-06 10:07
So, every time you publish, a new row is added to the pact publications table. However, the content is stored in a different table, and a new content row is only created if you publish a different JSON document. Most of the time, the JSON stays the same unless you're using random data.

beth
2018-03-06 10:07
So don't be afraid of publishing every build. We can clean up unused data.

beth
2018-03-06 10:08
Are you hosting your own broker then?

dennis
2018-03-06 10:09
yes we are

dennis
2018-03-06 10:09
let me check which version we have

beth
2018-03-06 10:09
Are you using tags?

dennis
2018-03-06 10:10
no, just latest

beth
2018-03-06 10:10
Are you using verifications?

dennis
2018-03-06 10:12
we don?t have random data in there, just compared some pacts

dennis
2018-03-06 10:12
verifications ? we have provider tests ( pact-jvm-junit )

dennis
2018-03-06 10:13
they are verifying

beth
2018-03-06 10:14
Do they publish the verifications?

dennis
2018-03-06 10:15
yes they do

dennis
2018-03-06 10:15
we only publish when running the tests on our CI server

beth
2018-03-06 10:15
:ok_hand:

beth
2018-03-06 10:15
Are you using can-i-deploy?

beth
2018-03-06 10:16
there is a reason for these questions - you may just be able to delete the pacticipants and kick off your build to create a new pact.

dennis
2018-03-06 10:18
we are not using can-i-deploy , I think ( or that is our assumption ) that we got this covered with our provider pact unit tests :slightly_smiling_face:


beth
2018-03-06 10:20
But that's a side note.

beth
2018-03-06 10:20
Do you have webhooks?



beth
2018-03-06 10:22
So, send an HTTP delete to the pacticipant, then kick off your consumer build to re create the pact.

beth
2018-03-06 10:23
Deleting the pacticipant will clear all the versions and pacts and verifications. Seeing as you only care about the latest one, republishing it will put you back in the right state.

dennis
2018-03-06 10:23
ok, I will check if that improves our performance

beth
2018-03-06 10:23
It seems stage that a few thousand slows it down so much.

beth
2018-03-06 10:24
Maybe I've got a really dumb query in there somewhere.

dennis
2018-03-06 10:24
we noticed we had high cpu on our DB server

beth
2018-03-06 10:24
What exactly is slow?

dennis
2018-03-06 10:24
oh yes, it is alway with the same query

dennis
2018-03-06 10:24
let me check in AWS, it is in there

dennis
2018-03-06 10:24
I spoke with the devops guys, and our db is a 30Gb memory with 4 cores, so that should be sufficient :slightly_smiling_face:

beth
2018-03-06 10:24
Gosh. Yes.

beth
2018-03-06 10:25
I've improved the queries in the latest hosted version but I haven't released it in the oss version yet.

dennis
2018-03-06 10:26
I?m going to send you a screenshot of the performance insights

beth
2018-03-06 10:26
Thanks.

dennis
2018-03-06 10:26
just a sec



dennis
2018-03-06 10:34
and pactbroker, the one with high cpu usage , is the writer replica

dennis
2018-03-06 10:34
the eu-west-1a , is the reader

beth
2018-03-06 10:36
Hm. That wasn't the query I was expecting.

beth
2018-03-06 10:36
I wonder if there's a missing index.

beth
2018-03-06 10:36
That query doesn't seem to justify that amount of CPU.

beth
2018-03-06 10:37
@matt will be able to tell you what we're using for our entire customer base.

beth
2018-03-06 10:38
Let me try and get the latest code into the oss version. I

dennis
2018-03-06 10:38
I assume that this is the source for our performance issues :slightly_smiling_face:

dennis
2018-03-06 10:39
but I?ll check anyway first by removing the participnts/consumers

beth
2018-03-06 10:39
It would actually be really useful if you could hold off cleaning the data up until you could update, to see if that fixed it.

dennis
2018-03-06 10:39
oh ok

dennis
2018-03-06 10:39
no problem

beth
2018-03-06 10:40
I'd you don't mind. I'll try and get it out on Thursday (Australian time).

beth
2018-03-06 10:40
If that doesn't help, then clearing the data definitely will.

dennis
2018-03-06 10:40
perfect, thanks for all the help

beth
2018-03-06 10:42
That second query, dennis, looks like you are using tags.

dennis
2018-03-06 10:42
oh and we are using version 2.12.0

matt
2018-03-06 12:03
@dennis how did you arrive at an `db.r4.xlarge` instance type for your DB? That is a _lot_ of memory to allocate, we don?t come anywhere near that need for hundreds of customers. It would be worth looking at other metrics to see if you can right scale this.

matt
2018-03-06 12:04
As per @beth?s note, it would seem there is either a) an issue with the query/index or b) a constraint on the DB

dennis
2018-03-06 12:06
Hi @matt, our devops guys created the postrgress db on AWS

matt
2018-03-06 12:06
if it?s b), one place to look is your allocated IOPS. You get 3GB of IOPS per 1GB provisioned storage. So even though you have a beefy _instance type_, you could still be throttled by IOPS. We note that on our workload, write to read ratio is generally 10:1 or higher. I would go and take a look at disk IOPS usage and compare to your provisioned IOPS - that could be something to consider

dennis
2018-03-06 12:06
I indeed see it?s only using I think 5Gb of memory, and we have 30 gigs

matt
2018-03-06 12:06
Are you using the DB for other purposes or just the broker?

dennis
2018-03-06 12:06
nope, it?s dedicated to the pact broker

dennis
2018-03-06 12:07
it?s a postgress cluster with a writer and a reader replica

matt
2018-03-06 12:07
Look, there _could_ be some esoteric issue with Aurora as we don?t run our workloads on it (yet, as it wasn?t available in ap-southeast-2 at the time) but I doubt it.

matt
2018-03-06 12:08
You could look to isolate that problem by re-running that query? Another option is that that query is really just unlucky, and there may have been other activities happening on the cluster impacting performance during that time (e.g. something maintaining a table lock).

dennis
2018-03-06 12:12
I noticed we have about 5 connections to the database, because we have 25 bamboo CI agents

dennis
2018-03-06 12:12
so somethings are going on in parrallel

dennis
2018-03-06 12:18
I overlooked your message regarding the iops


dennis
2018-03-06 12:18
but here are the stats

matt
2018-03-06 12:28
Thanks, how many GB do you have allocated? Signs are pointing elsewhere but good to clarify and rule out

matt
2018-03-06 12:30
Good call on multiple connections though, whilst it should be able to handle hundred of concurrent connections, some actions will lock tables. As alluded to earlier, it could be the complex view that gets created for the deployments feature

beth
2018-03-07 02:46
@matt they're on an earlier version that doesn't have the matrix queries

beth
2018-03-07 02:48
I'll spend some time tomorrow working out exactly what query it is that is taking up the bulk of the processing.

matt
2018-03-07 02:49
Thanks Beth. Would be good to know if an update fixes it though

beth
2018-03-07 02:49
It'll be either part of writing or reading the latest pact, but it's not immediately obvious to me from that line.

beth
2018-03-07 02:49
yes. I'll prioritise getting the new version out.

matt
2018-03-07 02:50
Sorry, I meant if they updated their instance

matt
2018-03-07 02:50
but that too :slightly_smiling_face:

beth
2018-03-07 02:50
oh right, I see.

dennis
2018-03-07 07:11
Hi, I don?t see the allowed IOPS anywhere, if we just create a postgress RDS database it is in there. But now we just see that it is a cluster, no sign of the allowed IOPS ...

dennis
2018-03-07 07:11
I will have a look in the documentation

dennis
2018-03-07 07:11
and keep you posted

matt
2018-03-07 07:12
As noted above, I just need to know how much storage you allocated

matt
2018-03-07 07:12
Then multiple by 3 gets you IOPS

dennis
2018-03-07 08:00
aurora postgress seems to do autoscalling on storage and increases per 10Gb

dennis
2018-03-07 08:00
we have 60gb allocated right now

matt
2018-03-07 08:01
cool, that should be heaps

matt
2018-03-07 08:01
worth checking, I forget about the scaling of Aurora

matt
2018-03-07 08:01
the 1500 write IOPS spike is the concern. Beth I think was going to look/think about that

dennis
2018-03-07 08:02
I?ll just wait for the new release tomorrow. If that does not improve I?ll remove the cluster and use a regular postgress

dennis
2018-03-07 08:02
no clue why our devops guys did something ?special? :slightly_smiling_face:

beth
2018-03-07 08:07
@dennis are you using date sorted versions or semanticly sorted versions?

beth
2018-03-07 08:08
The only thing I can think of that would cause that many writes would be publishing a new semanticly sorted versions, and then publishing a version that was "before" a heap of the others.

beth
2018-03-07 08:09
That would cause all the order numbers of the existing versions to be incremented.

beth
2018-03-07 08:09
I can't imagine what could cause the latest version query to cause that much effort.

dennis
2018-03-07 08:30
we are using semantic versions for our pact versions

dennis
2018-03-07 08:30
I?ll have a look at the config how sorting is configured

dennis
2018-03-07 08:34
app = PactBroker::App.new do | config | config.logger = $logger config.database_connection = create_database_connection(config.logger) config.database_connection.timezone = :utc end

dennis
2018-03-07 08:35
so we didn?t configure anything here

beth
2018-03-07 08:42
Yup, semantic.

beth
2018-03-07 22:02
I'm about to Upgrade All The Things, so if you notice slow behaviour in the next few minutes, that's why.

beth
2018-03-07 22:52
All done.

beth
2018-03-08 02:44
@dennis grab the latest docker image (2.16.1-1) and let me know how you go

dennis
2018-03-08 07:06
Hi Beth, just arrived at the office

dennis
2018-03-08 07:06
I will give it a try today


matthewcanty
2018-03-08 10:29
How are people handling API Gateways which sits across multiple microservices? Consumer has Pact with microservice provider, but API Gateway also contains a definition.

matt
2018-03-08 10:43
It depends on what you do with the gateway. If it's over reaching and changing payloads or orchestrating calls , then you have no choice but to contract test that layer and have a separate contact test between the gateway and backend services. If it's basically acting as a proxy, then I would treat it as a networking component and exclude from contract testing

matthewcanty
2018-03-08 11:25
:thinking_face: will think

matthewcanty
2018-03-08 11:25
Thanks


dennis
2018-03-08 13:25
@beth database migration is going on

alexei
2018-03-08 13:30
I wonder if there is a way to untag the version over API. For example: 1.3 DEV 1.2 STAGE, DEV 1.1 PROD, STAGE, DEV If I accidentally tagged 1.3 PROD, how can I untag it back. Using v 2.13.1 at the moment

kevin.meiresonne
2018-03-08 15:20
Looks like the hosted broker is down... Could someone have a look?

kevin.meiresonne
2018-03-08 15:44
and it's back

beth
2018-03-08 21:02
@alexei delete the tag using an http delete to the resource /pacticipants/P/versions/V/tags/T

beth
2018-03-08 21:02
You can browse to it in the HAL browser, and then send the delete request.

beth
2018-03-08 21:03
Sorry @kevin.meiresonne, we were asleep. We'll have a look at the logs to see if we can identify the issue.

mouser
2018-03-09 05:39
We?re getting `504 Gateway Timeout` when trying to publish pacts? not urgent but could someone have a look at it after the long weekend :smile:

matt
2018-03-09 05:51
hmm I can see a few `499`s and an equal number of `401`s to `200`s (which is normal for clients to navigate the auth challenge)

matt
2018-03-09 05:51
are you still getting it?

mouser
2018-03-09 05:54
I'll try again in a few mins... Just getting on a train :grinning:

matt
2018-03-09 05:55
Nothing else going off on our radars, but that doesn?t mean there aren?t gaps we don?t yet know about

beth
2018-03-09 05:55
The UI healthcheck is responding ok

dennis
2018-03-09 06:33
hi @beth , we did the upgrade yesterday like promised but for some reason it gave an error after some database migrations I think

dennis
2018-03-09 06:33
so we had to use a new database

dennis
2018-03-09 06:33
so I cannot say if the performance improved after upgrading with the old data

dennis
2018-03-09 06:34
It is fast now with a clean database now :slightly_smiling_face:

dennis
2018-03-09 06:34
But with the new UI I did notice that we have a version and a tag for each pact

dennis
2018-03-09 06:34
so that is something we will look into

beth
2018-03-09 06:47
You have a special db! I'm sorry you had migration errors. I've upgraded all the hosted versions with no problems.

dennis
2018-03-09 06:47
we now switched from the aurora postgress to a regular one now as well

dennis
2018-03-09 06:47
so everything is back to ?standard? :slightly_smiling_face:

beth
2018-03-09 06:47
If you have a copy of the database that you can anonymise, I can have a look at it.

beth
2018-03-09 08:02
Hey , the latest version of the broker is taking some time to publish for databases with large numbers of pacts. I'm working on optimising the matrix calculation logic that is making it slow. In the meantime, I can delete old unneeded pacts if you have one of the affected databases. PM me with the name of your broker if you'd like this.


dennis
2018-03-12 08:24
@beth a little bit of delay with the database backup but I?m working on it

dennis
2018-03-12 08:24
the new feature with the version matrix does give us a bit more knowledge what is going on


beth
2018-03-12 08:25
yeah, it's the killer feature I reckon.

dennis
2018-03-12 08:25
looks like we have a tag for each version

beth
2018-03-12 08:25
From that image, you only have one tag.

dennis
2018-03-12 08:25
I do notice each version is the same ...

beth
2018-03-12 08:25
It's just that the pact content that that version and tag belong to has been verified multiple times (as you would expect).

beth
2018-03-12 08:26
The fact that your provider verison is 0.0.0 so many times tells me that you're using an early version of the jvm pact verifier that published the verifications from the developers machine.

beth
2018-03-12 08:26
What you want to do is upgrade that to the latest version, and look up the docs that you can turn on conditional publishing, and only publish the verifications from your CI.

dennis
2018-03-12 08:27
we don?t have the latest version, but we are only publishing from our CI build because we have a special maven profile to do so

beth
2018-03-12 08:28
is it deliberate that you have your version set to 0.0.0?

beth
2018-03-12 08:28
I'm talking about verification publishing, not pact publishing here.

dennis
2018-03-12 08:48
we don?t have version 0.0.0 anywhere

dennis
2018-03-12 08:49
the version we have from the jvm-provider-junit is 3.5.12

dennis
2018-03-12 08:49
the latest one is 3.5.13

beth
2018-03-12 08:49
I didn't think so. It's being automatically set by your pact jvm config.



dennis
2018-03-12 09:42
I will send you some prive messages, so I don?t spam this channel with the output from the database :slightly_smiling_face:

thadir
2018-03-12 15:40
@beth could we make the provider test push the reason it rejected a pact test to the broker so we can see trough the pact broker what and why somting is broken?

beth
2018-03-12 21:20
Yes, the code is very close to being done for that.

beth
2018-03-12 21:20
We just had to work out the right format, and then other things got priority.

thadir
2018-03-13 09:44
If you need testers were willing to help :wink:.

beth
2018-03-13 09:47
If you subscribe to this issue, you'll get notified when something happens https://github.com/pact-foundation/pact_broker/issues/154

alexei
2018-03-14 18:00
I am still not quite comfortable with the version notion in pact-broker. Example

alexei
2018-03-14 18:03
Let?s say I have 2 participants Consumer v.1.0 and Provider v.2.0. Pact has automatically Consumer Version (1.0), hasn?t it? (/pact/provider/P/consumer/C/version/V -> I can only set it as Consumer version, I guess).

alexei
2018-03-14 18:04
So far, so good. Imagine, I change Consumer so that the Pact changes. I version Consumer as 1.1 and Pact becomes 1.1. Nice.

alexei
2018-03-14 18:06
Now let?s get tricky. Imagine I am changing Consumer, but Pact itself stays the same. Should I update Consumer to 1.2? But the pact will not even get uploaded (because it is the same).

alexei
2018-03-14 18:07
Now the Provider. Provider never changes Pacts, but has his own versioning. When do I change it? At every change in Provider? Or at every Pact change? Or never?


ecoan
2018-03-15 02:17
has joined #general2

berisberis
2018-03-16 18:17
has joined #general2

berisberis
2018-03-16 18:21
Hello! Anyone had any luck configuring the pact_broker with http://drone.io ?

rholshausen
2018-03-16 21:32
@berisberis are you asking about publishing pact files or pact verification results from a build running in http://drone.io?

berisberis
2018-03-16 23:11
I was asking about webhooks and triggers, but I think we have figured out how it works. Apparently CI systems have trigger rest api url calls that get configured as webhooks in the pact_broker to re-run builds. We are making some experiments running a pact_broker in our lan.

kevin.meiresonne
2018-03-19 14:52
Did something change on the verification badge logic? It no longer shows the consumer and provider name...

kevin.meiresonne
2018-03-19 14:57
It also takes a while for a badge to render, so I'm guessing something might be going wrong in the processing

rholshausen
2018-03-19 22:24
@beth :point_up:

beth
2018-03-20 01:34
The connection to the badge server might have problems

beth
2018-03-20 01:35
It should short circuit however.

beth
2018-03-20 01:35
I think it might be the PR that added the cert store to the http request

beth
2018-03-20 01:35
I'll back that out and see if it fixes that

beth
2018-03-20 03:21
@kevin.meiresonne is it working now?

beth
2018-03-20 04:13
The logs show there were timeouts retrieving the badge svg from http://img.shields.io

beth
2018-03-20 04:13
It seems to have fixed it.

beth
2018-03-20 04:16
How slow was slow? These are the timeout setting I'm using to retrieve a badge with a dynamic name from http://shields.io. `options = {read_timeout: 3, open_timeout: 1, ssl_timeout: 1, continue_timeout: 1}` If it timesout, it returns a badge with hardcoded text.

beth
2018-03-20 04:16
Was it more than 3 seconds?

kevin.meiresonne
2018-03-20 06:58
@beth badges are working correctly now, thank you!

matt
2018-03-20 07:15
We currently rely on a third party (http://shields.io) but will deploy our own hosted one in the next few months. This should make things more reliable and hopefully faster too

kevin.meiresonne
2018-03-20 09:38
@beth, it was more than 3 seconds indeed

kevin.meiresonne
2018-03-20 09:40
Issue is back... Takes about 6 seconds, then returns the default badge

kevin.meiresonne
2018-03-20 09:42
So, indeed, occasionally it seems to timeout (not always)

beth
2018-03-20 09:57
I wonder if we're being rate limited.

beth
2018-03-20 09:58
Either way, using the local shields server is the way forward.

beth
2018-03-20 09:59
I'm curious as to why it's not timing out at 3 seconds. There must be a time out setting I've missed.

beth
2018-03-20 09:59
Or, it's responding, but very slowly.

kevin.meiresonne
2018-03-20 09:59
well, it's not a major issue, I'll just have to add labels in front of my badges on our CI dashboard to make sure it shows enough detail

kevin.meiresonne
2018-03-20 10:00
it would be more of an issue if I got no badge at all :slightly_smiling_face:

kevin.meiresonne
2018-03-20 10:00
at least the colors are right :slightly_smiling_face:

matt
2018-03-20 10:09
I'll aim to get that local shields server sorted in the next week

beth
2018-03-21 02:33
due to an issue with the parsing for semantic versions, I have switched the version ordering to be _by date_. The only scenario under which this will give you different results is if you are using semantic versions and you publish a pact or a verification for a previous version of your application and that version resource did not already exist in the broker. Under date ordering, it would be considered the latest version, however, under semantic versioning, it would not. I can only think of one corner cases in which this would occur, and I think it's unlikely that any of you would be doing that (testing the matrix for a version of the provider that did not use pacts when it was deployed). Let me know if you notice any problems though, and I can switch your broker back.

kevin.meiresonne
2018-03-21 08:23
We were already using the ordering by date. But thank you for the heads up!

kevin.meiresonne
2018-03-23 09:27
Hi, I've noticed a small change on the broker verification status. It now shows a "number". What does this number indicate?

beth
2018-03-23 09:44
The id of the verification. It's actual value is irrelevant.

beth
2018-03-23 09:45
It is auto generated and just helps you work out which rows in the matrix actually have the same verification in them.

beth
2018-03-23 09:46
The date becomes vague when it's more than a few minutes ago.

beth
2018-03-23 09:47
Think of it asa build number for the verification.

divs.kanna
2018-03-23 18:39
has joined #general2

beth
2018-03-26 01:16
the Pact Foundation has set up a slack community for general pacty goodness. Many of you in this group are pact experts now, and we'd love to have you join, for your own support, and for the support you could give others. We're working on a public signup page, but in the meantime, ping me if you'd like an invitation sent to you.

fitzoh
2018-03-26 01:53
@beth is that gonna be in addition to gitter or a replacement?

beth
2018-03-26 02:29
@fitzoh if we can get a critical mass, I'd personally like to remove gitter. I find the cross talk due to the lack of threads very frustrating. Development on gitter has shut down now too, so it will never improve.

beth
2018-03-26 02:30
The one thing gitter has going for it imo is the social login from github. I'm surprised slack doesn't offer this as an option like it does for Google.

matt
2018-03-26 02:47
Gitter is just so flakey. I don?t always get notifications, when I do I often get blank pages and have to restart the app and then go to mobile (which is also really bad).

matt
2018-03-26 02:47
The only thing going for it is that it has a low barrier to entry

alexei
2018-03-26 03:43
?there is a Slack for that? :rolling_on_the_floor_laughing:

matt
2018-03-26 03:43
:smile:

tom.vanasch
2018-03-26 06:50
has joined #general2


beth
2018-03-26 08:15
I think that link should work to join the Pact Foundation group.

dennis
2018-03-26 08:39
it says : This invite link is no longer active.

beth
2018-03-26 08:39
Bother! Ah well, I can invite you directly.

dennis
2018-03-26 08:45
@beth or @matt, if I remember correctly I saw a message passing by in the past that you could do a cleanup on the hosted pact broker

dennis
2018-03-26 08:45
Is that also possible on our own pact broker

dennis
2018-03-26 08:45
on one week time we have 100gb of data in the db

beth
2018-03-26 08:45
I was going to write the code when someone asked for it :wink:

beth
2018-03-26 08:45
It shouldn't be too hard though.

dennis
2018-03-26 08:46
causing to reach our limit on IOPS, thus throttling and becoming slow again :disappointed:

beth
2018-03-26 08:46
The very latest version has a massive improvement in the speed. Unfortunately, I need to make the sql compatbile with mysql before I can do the public release however.


dennis
2018-03-26 08:47
yes indeed, speed is very good now beth

matt
2018-03-26 08:47
How big are your contracts?

beth
2018-03-26 08:47
are you using random data in your contracts? or something that changes regularly?

dennis
2018-03-26 08:47
nothing special in there, we have about 50 contracts in total

matt
2018-03-26 08:47
We have a number of high volume clients on the broker and we aren't anywhere near that after more than a year in operation

matt
2018-03-26 08:48
That's less than half of our biggest acct


beth
2018-03-26 08:49
gtg, but can chat more later



matt
2018-03-26 08:49
Same, but let's get to the bottom of it

dennis
2018-03-26 08:49
(y) let me know if I can help


dennis
2018-03-26 08:50
I also invited Tom Van Asch , he?s one of my collegeaugs

beth
2018-03-26 23:30
@dennis could you do a query for me and tell me how many rows there are in pact_publication, and how many rows there are in pact_version? One pact_publication row gets created every time you publish a new or changed pact resource. A new pact_version row only gets created when the actual _content_ changes, and typically, this doesn't happen that often compared to the number of builds that run.

beth
2018-03-26 23:30
If you have a high number of pact_version rows compared to your pact_publication rows, I'd suspect you're using some random data in there.

beth
2018-03-26 23:31
Or something that is time based.

beth
2018-03-26 23:32
I suspect the high disk usage could be due to the fact the matrix is being pre calculated and stored in the database.

abubics
2018-03-26 23:40
the plot thickens

dennis
2018-03-27 06:11
Hi @abubics, yes graph is in MB

dennis
2018-03-27 06:11
and I added another 100Gb on 22/3

beth
2018-03-27 06:11
That seems cray cray

dennis
2018-03-27 06:11
@beth, I?m gonna look at the database now


dennis
2018-03-27 06:24
we have 510 rows in pact_versions

beth
2018-03-27 06:25
That's not outrageous

dennis
2018-03-27 06:25
17059 publications

beth
2018-03-27 06:26
You guys do a lot of builds! But from that, I don't think there is random data, because the ratio of versions to publications is so low.

beth
2018-03-27 06:26
How many verifications?

dennis
2018-03-27 06:27
15680 verifications

beth
2018-03-27 06:28
I think you just genuinely have a lot of builds then! Best approach is to clean up the ones you don't need. I'll write you a script.

beth
2018-03-27 06:28
Do you use tags?

dennis
2018-03-27 06:28
we probably have about a 100 builds per day

dennis
2018-03-27 06:28
yes we are using tags

dennis
2018-03-27 06:28
and use the branch name for that

dennis
2018-03-27 06:29
so I guess we could delete everything except ?development?

beth
2018-03-27 06:29
Like a boss!

beth
2018-03-27 06:30
Are you using can I deploy? That is, are you using tags for managing your backwards compatibility in prod, or just features?

dennis
2018-03-27 06:31
we?re not using can I deploy, just doing the verification towards the latest tag

beth
2018-03-27 06:31
Latest development tag? Cool

dennis
2018-03-27 06:51
we have @PactBroker(tags = ?latest?)

beth
2018-03-27 06:51
You have a tag called latest?

dennis
2018-03-27 06:55
https://github.com/DiUS/pact-jvm/tree/master/pact-jvm-provider-junit : The default value for tags is latest which is not actually a tag but instead corresponds to the latest version ignoring the tags. If there are multiple consumers matching the name specified in the provider annotation then the latest pact for each of the consumers is loaded.


beth
2018-03-27 06:56
Obviously, I'm not a Pact JVM person!

thadir
2018-03-29 13:27
Is there a way to use pact also to set a standard rules for this is how our providers should look like . Or should I just make a generic unitest with pact as a consumer to imply the minimum what a provider looks like

tom.vanasch
2018-03-30 07:03
Hello Beth Do you already have an update on https://github.com/pact-foundation/pact_broker/issues/203?

matt
2018-03-30 07:28
@thadir that?s an interesting idea. My initial reaction is that it seems wrong to force that using Pact (as opposed to standardisation through code templates/libraries etc.) but I?d love to hear more about it. Good discussion point

thadir
2018-03-30 08:13
I agree i prefere the later 2 but i can imagine in some big company's and many languages to make your providers the broker as a soort minimum default validation is a interesitng tool for it. It should not tbh break the release but give a sort of hey your not fitting the template/standard we want in this organisation do are you sure kinda route

matt
2018-03-30 08:22
I think it?s an interesting idea. Perhaps there is a roadmap item for the broker: consistency/standardisation checks?

matt
2018-03-30 08:23
It feels like it might be a bit nasty to be in all of the clients, but perhaps this could be another ?insight? we can surface in the broker?

thadir
2018-03-30 08:24
Absoluutly i think this kind of features are prefect for that. And if you can create a webhook on that error to do somting :slightly_smiling_face: that its even better.

matt
2018-03-30 08:25
:slightly_smiling_face:

matt
2018-03-30 08:25
I?ll add it as an item on our backlog to discuss

thadir
2018-03-30 08:25
Perfect :slightly_smiling_face:

thadir
2018-03-30 08:29
@matt talking about your roadmap and backlog any lights you can shed on the roadmap of the broker?

matt
2018-03-30 08:32
I can probably say the following: 1. We are getting closer to formalising the business structure and operating model (which sounds boring, but unfortunately is critical!). This is things like where money will go, accounts, tax, timesheeting, incorporation etc. etc. There is a bit of lead time on some of these things 2. The feature roadmap will always be flexible, but we are still prioritising based on before - better authentication and integration with common identity provider, improved UX and some other integrations 3. We hope to have a full time team on it in the next couple of months

beth
2018-03-30 08:58
@tom.vanasch I've got a rake task that is passing my tests, but when I run it on some real databases, it's deleting more of the verifications than I was expecting. This may not actually bother you however, if you're not using can-i-deploy. It will just make some pacts look like they haven't been verified. If you're running so many builds in a day, the verification will just be replaced soon anyway.

thadir
2018-03-30 08:59
Nice, please let me know for the pricing model I reserved money for tooling this year with my clients manager but I do need to hear pricing soon or it will be taken by other tools were going are using :wink:

matt
2018-03-30 08:59
thanks @thadir - we want to charge you, but we also want to give you new features - funnily enough, both take time to implement :slightly_smiling_face:

matt
2018-03-30 09:00
In the meanwhile, your feedback is our :moneybag:

thadir
2018-03-30 09:00
I know :wink: and thats why im wining. and helping as mutch as I can

matt
2018-03-30 09:00
:smile:

beth
2018-03-30 09:18
If you want to have a look and see if it's going to be good enough for you, export a copy of your database, and then checkout the latest pact_broker code and modify the connection in the `CleanTask` in `tasks/test_db.rake` to point to your own database.

beth
2018-03-30 09:20
The line for creating the connection will be `Sequel.connect(adapter: "postgres", database: "pact_broker", username: 'pact_broker', password: 'pact_broker', :encoding => 'utf8', :logger => Logger.new('clean.log'))` (replace the relevant fields with your details)

beth
2018-03-30 09:20
The way I'm currently testing the functionality of the script is to run this ``` curl http://localhost:9292/dashboard -H "Accept: application/hal+json" > before jq . before > before-sorted bundle exec rake pact_broker:db:clean curl http://localhost:9292/dashboard -H "Accept: application/hal+json" > after jq . after > after-sorted ```

beth
2018-03-30 09:21
Theoretically, because I'm deleting everything except the latest data, the before and after should be the same, however, there are some verifications that are not there.

beth
2018-03-30 09:21
As I said, this may be ok for you if you are running your verifications often anyway and not using can-i-deploy - the data will just be replaced as soon as the next build runs.

beth
2018-03-30 09:22
gtg now, let me know if you decide to give it a go, or if you'd prefer to wait until I've nutted out the missing verifications.

beth
2018-03-30 09:22
@dennis just letting you know about the above conversation

dennis
2018-03-30 09:43
Hi @beth thanks for following this up

dennis
2018-03-30 09:44
@tom.vanasch will be contacting you in the future, since today is my last day at the company ( Bose )

dennis
2018-03-30 09:45
Hopefully I will have the chance to work again api testing related in the future, then I will definitly reach out to Pact again !

beth
2018-03-30 09:53
Good luck with your new position @dennis

beth
2018-03-30 09:54
Welcome @tom.vanasch

tom.vanasch
2018-03-30 09:54
Hi @beth :slightly_smiling_face:

tom.vanasch
2018-03-30 09:55
I'll try your suggestion above on monday ok?

beth
2018-03-30 09:57
Cool. Let me know if you have questions.

tom.vanasch
2018-03-30 10:02
:ok_hand:

kevin.meiresonne
2018-03-30 18:42
How much upfront will we be notified of the ending of the beta program of the hosted broker?

kevin.meiresonne
2018-03-30 18:42
So we can prepare next steps.

matt
2018-03-30 21:43
We'll be as transparent as we can, which is to say we'll give you lots notice and tell you as soon as we know.

matt
2018-03-30 21:43
Is there something in particular you're worried or concerned about?

matt
2018-03-30 21:44
Even when we introduce paid plans, the beta equivalent will remain free forever

kevin.meiresonne
2018-04-01 09:30
Well, if we decide to switch to the paid plan, I'll need to create a case to get some budget for it. But if the beta remains as is it's indeed less time critical.

matt
2018-04-01 11:56
You guys have been great to us, we wouldn?t do that to you anyway :slightly_smiling_face:

sumit080
2018-04-01 20:29
has joined #general2

beth
2018-04-03 05:26
Welcome @sumit080

tom.vanasch
2018-04-05 09:47
Hello Beth We had some issues trying the above solution, we're running pactbroker in a docker container and wanted to do the changes in the test_db.rake file via the latest released pact docker container but the CleanTask is not yet present there, this task is only present in the master branch. How would you suggest doing this test? Is it possible to create a custom docker container for this which takes the environment variables into account for the DB connection?

beth
2018-04-05 10:49
Are you using the official docker image? I'll just do a release of that.

beth
2018-04-05 11:08
I've just kicked off a build for 2.18.0-1 of the docker image.

beth
2018-04-05 11:10
`docker exec -it $CONTAINER bash`

beth
2018-04-05 11:10
`cd /home/app/pact_broker`

beth
2018-04-05 11:10
`bundle exec rake pact_broker:db:clean`

beth
2018-04-05 11:10
I recommend backing up the DB first, just in case!

beth
2018-04-05 11:11
But like I said, as everything that's in there is a build artifact, just running the builds will repopulate everything anyway.

tom.vanasch
2018-04-05 12:31
great thanks! let me test that

beth
2018-04-05 22:06
How did you go @tom.vanasch?

tom.vanasch
2018-04-06 11:53
Hello Beth The new docker images isn't starting up with our existing database, I get the following error during startup: App 49 stdout: D, [2018-04-06T11:44:12.676554 #49] DEBUG -- : (0.358894s) SELECT pg_attribute.attname AS pk FROM pg_class, pg_attribute, pg_index, pg_namespace WHERE pg_class.oid = pg_attribute.attrelid AND pg_class.relnamespace = pg_namespace.oid AND pg_class.oid = pg_index.indrelid AND pg_index.indkey[0] = pg_attribute.attnum AND pg_index.indisprimary = 't' AND pg_class.oid = CAST(CAST('"materialized_matrix"' AS regclass) AS oid) [ E 2018-04-06 11:45:01.0743 29/Te age/Cor/App/Implementation.cpp:304 ]: Could not spawn process for application /home/app/pact_broker: An error occurred while starting up the preloader: it did not write a startup response in time. If your app needs more time to start you can increase the Passenger start timeout config option. Error ID: 69f7bf24

tom.vanasch
2018-04-06 11:56
Not sure where I can change this start timeout config, I found that the config property should be passenger_start_timeout for the passenger web app

tom.vanasch
2018-04-06 12:23
We decided to create another DB to already continue with the pact testing but still wanted to keep the old DB so we can hopefully solve the issue of getting a DB over 100 GB :slightly_smiling_face:

tom.vanasch
2018-04-06 12:23
To summarize:

tom.vanasch
2018-04-06 12:24
We have a "production" pact broker on version 2.18.0-1 with a fresh DB which is currently working smoothly Next to that, we have a "staging" pact broker, also on version 2.18.0-1 with the old database but this instance isn't starting up due to the error above, once this instance gets started, I get launch the cleanup task

tom.vanasch
2018-04-06 13:38
get = can :wink:

sdulebskiy
2018-04-10 10:11
Hello. Please help I'm using Pact Broker for sharing pacts. My provider has multiple consumers. When i publish some changes in contract with Consumer1 - Provider i want to run contract tests only for this contract. But following configuration gives an ability to run contract test for ALL existing contracts/consumers @PactBroker(host = "test, port = "8088") Is there any possibility to fetch only updated contract ?

beth
2018-04-10 10:40
@sdulebskiy no there isn't. Typically, the verification tests don't take that long to run, so running all of them isn't a problem. Can you explain why you'd like to just run one?

sdulebskiy
2018-04-10 12:57
@beth Just to satisfy my perfectionism :slightly_smiling_face:

rholshausen
2018-04-10 23:04
@sdulebskiy If you're using Pact-JVM, you can filter the contracts that are verified

beth
2018-04-11 00:18
But I don't know how it would tell which one had just changed?

rholshausen
2018-04-11 00:19
Ah, yeah, good point

rholshausen
2018-04-11 00:20
Feature request?

matt
2018-04-12 16:04
are there any plans to publish machine readable API descriptions for the Pact server? For example https://github.com/fotinakis/swagger-blocks

matt
2018-04-13 00:08
Is https://github.com/pact-foundation/pact-specification not what you mean? The pact files are machine readable

beth
2018-04-13 00:14
I think @matt may mean swagger docs for the Pact Broker.

beth
2018-04-13 00:14
The answer to that is, there are pacts, but I haven't had time to do swagger docs.


matt
2018-04-13 00:37
yeah open API docs

matt
2018-04-13 00:37
that would enable generating clients in any language

beth
2018-04-13 00:39
Time is the only blocker!

beth
2018-04-13 00:44
I tried looking for something which would generate the body definition from an example JSON document, but couldn't find anything

matt
2018-04-13 01:25
swagger-blocks is what we're using on a project at work

matt
2018-04-13 01:25
prism can generate some basic swagger based on network traffic


matt
2018-04-13 01:26
api descriptions are a lot of work to document, lint, test and maintain.

beth
2018-04-13 01:37
tell me about it :wink:

beth
2018-04-13 01:37
Then you have to do testing to confirm they're correct. And that generally means using dredd, which I have a bit of dread for.

matt
2018-04-13 01:40
There must be something in the work the Atlassian team did that checks compatibility between Pact and OAS. Perhaps I can look at that.

oswald.quek
2018-04-13 13:41
has joined #general2


matt
2018-04-14 05:26
That being said, generating clients from specs never works out well IMO. I've never seen it work, we had xfire back in the day for Java - and we realised it was shit and moved forward with flexible APIs built on RESTful principles.

matt
2018-04-14 05:27
@matt that's the one

matt
2018-04-14 15:34
Google, Amazon, Microsoft have made generated clients work well



matt
2018-04-14 15:36
:slightly_smiling_face:

matt
2018-04-14 15:37
I'm using gRPC at work with generated Java and Swift clients.

matt
2018-04-15 06:17
it?s a bit different, albeit I?ll concede it?s one of the few widely used _things_ in that space :wink:

matt
2018-04-15 06:17
gRPC gateway is pretty cool though, which I suppose is maybe what you?re getting at?

matt
2018-04-15 06:19
IMO the generated clients for Swagger always need some changes eventually (e.g. want to wrap a circuit breaker around it? Want to plug your own logger in etc.). When you use generated code, this is almost always a massive pain in the arse to do, because there are so many layers of abstraction built in to the tooling

beth
2018-04-15 23:38
This library has nothing to do with the Pact Broker API. It validates a pact against a provider swagger document.

oswald.quek
2018-04-16 13:57
hello. it seems the PactBrokerClient (https://github.com/DiUS/pact-jvm/blob/master/pact-jvm-pact-broker/src/main/kotlin/au/com/dius/pact/pactbroker/PactBrokerClient.kt) fails to publish the verification back to the pact broker when it's an HTTPS POST call to the pact broker. i see the following in my test logs ``` [a.c.d.p.p.ProviderVerifier] - Failed to publish verification results - Connect to localhost:1234 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused (Connection refused) ``` i currently think it's a problem with the underlying apache httpclient as it somehow tries to route the request to localhost:1234. i'll do some further investigation but thought i'd mention it here in case anyone has any quick workarounds. thanks.

oswald.quek
2018-04-16 13:58
FYI i've tested with a unit test publishing the verification to a locally running pact broker on http and it works

oswald.quek
2018-04-16 13:59
and the annotations on my unit test looks like ``` @RunWith(PactRunner.class) @Provider("adminusers") @PactBroker(protocol = "https", host = "pact-broker-test.cloudapps.digital", port = "443", tags = {"latest"}, authentication = @PactBrokerAuth(username = "blahblahblah", password = "blahblahblah")) public class UsersApiTest { ```

oswald.quek
2018-04-16 14:23
it's very weird because the pact can be got from `pact-broker-test.cloudapps.digital` alright but the pact broker client can't publish the verification back to it

oswald.quek
2018-04-16 16:32
by the way the `pb:publish-verification-results` in the pact got from the broker is `https://pact-broker-test.cloudapps.digital/pacts/provider/adminusers/consumer/selfservice/pact-version/acb779f7a02394f7dad1db0da3b344f8a17d67de/verification-results` :slightly_smiling_face:

aserafim
2018-04-16 18:43
has joined #general2

matt
2018-04-16 20:54
there is currently an issue with a number of running containers. The majority of customers aren?t impacted, however a select few of you will be experiencing intermittent timeouts. Unfortunately automated actions didn?t catch this one and will be taking manual action shortly

aserafim
2018-04-16 20:57
@matt thanks for the update!

aserafim
2018-04-16 22:05
@matt thanks for fixing the issue!

matt
2018-04-16 22:06
No worries. Is everything ok now?

matt
2018-04-16 22:17
@oswald.quek sounds like maybe a bug. @rholshausen any ideas?

aserafim
2018-04-16 22:17
I am seeing it work on my side!


beth
2018-04-17 03:40
Sorry Tom, I didn't get notifications for this. Will read now.

beth
2018-04-17 03:42
I assume it eventually started? The clean up task doesn't need a running app, just the database.

richard.jones
2018-04-18 01:19
has joined #general2

thadir
2018-04-18 12:51
were walking against the problem that we wanna delete consumers that we removed out the build process bc we stoped using them. But the delete step is a bit user unfrendly when whats the best way to this.


beth
2018-04-18 21:32
@thadir Sorry, deleting is just not currently implemented in the UI. It's on the list for the 'paid for' UI! The easiest way is to open the pacticipant resource in the HAL browser and send a DELETE request to the `self` relation.


beth
2018-04-18 21:35
Open the pact URL in a browser, click "View in API browser", then click the `NON-GET` button for the `pb:consumer` or `pb:provider`, and send a `DELETE` request straight to it.

thadir
2018-04-18 22:50
k ill try that, but we did that the contracts were still in the broker

matt
2018-04-18 22:51
You?ll probably need to perform a `DELETE` on the contract

thadir
2018-04-18 22:51
there a lot of contracts hence the question >.>

thadir
2018-04-18 22:51
thing been in produciotn for as logn were using the broker atm :stuck_out_tongue:

thadir
2018-04-18 22:51
thats why I asked :slightly_smiling_face:

beth
2018-04-18 23:06
No, you can delete the pacticipant and all the pacts will be deleted. You may have the version with the bug. I think I responded to an issue you raised.

beth
2018-04-18 23:06
Upgrade to the latest version.

beth
2018-04-18 23:07
The resource has been deleted, but the matrix wasn't being updated for deletes.

matt
2018-04-18 23:51
ah,ok that makes sense

oswald.quek
2018-04-20 15:27
In a consumer pact, how do I specify a state with values? Looking at https://github.com/DiUS/pact-jvm/tree/master/pact-jvm-provider-junit#example-of-http-test, there is a suggestion I can do this ``` @State("a user with id 1 exists") // Method will be run before testing interactions that require "with-data" state public void toStateWithData(Map<String, String data) { data.get("user"); //value is "1" ``` so in my consumer test, I should be able to do something like (for pact-js) ``` provider.setup() // (3) add interactions to the Mock Server, as many as required .then(() => { return provider.addInteraction({ // The 'state' field specifies a "Provider State" state: { description: 'a user with id 1 exists', data: [ { 'user': '1'} ] } ``` for example. (Note the *data* fields) Yet in the documentation (https://github.com/pact-foundation/pact-js#verification-options) I see something about `providerStatesSetupUrl` which is just confusing.... I don't want to have to be setting up new URLs for provider states. Can I actually pass state data into the pact provider test the way I want it to? It feels more intuitive.

rholshausen
2018-04-21 02:37
@oswald.quek the key-value data that is associated with the provider states is from the V3 spec, which only the JVM and Rust implementations support

rholshausen
2018-04-21 02:37
Pact-JS wraps the Pact-Ruby mock server, which only supports the V2 spec.

oswald.quek
2018-04-23 08:42
@rholshausen thanks for the info

beth
2018-04-23 22:37
@oswald.quek the provider state set up URL doesn't have to be in the app itself, it just needs to have access to the same underlying data store to set up the right data. You do need this so you can set up the right data for each request.

asfan.siddiqui
2018-04-24 09:29
has joined #general2

asfan.siddiqui
2018-04-24 09:43
No such property: statusLine for class: java.io.StringReader...getting error while publishing pact file to broker ..need help on this .!!

beth
2018-04-24 10:11
I'm afraid that's not much to go on @asfan.siddiqui. We'll need a bit more context. Generally, when raising an issue, you'll need to provide the versions of the relevant software, the expected behaviour, the actual behaviour, the steps to reproduce, and a (preferably executable) code sample demonstrating the issue.

raul.garcia
2018-04-26 09:43
has joined #general2

richard.jones
2018-04-27 02:52
@beth (because we're gumming up a github bug report with a bordering-on-irrelevant discussion :smile: ) hi, I would very much like to release the verifier I've been working on but we have some hurdles to get past here before I can.

richard.jones
2018-04-27 02:54
Soon, I hope!

beth
2018-04-27 03:00
Cool! What is its usecase?

richard.jones
2018-04-27 03:09
We desired a tighter integration with our (python) tooling than was possible with the pact-python/ruby process model. We've now got tight integration with pytest (one "test" per pact interaction), including junit output, and the ability to perform tighter provider server management in line with our existing test suite.

richard.jones
2018-04-27 03:09
Apparently the word of the day is "tight" :smile:

richard.jones
2018-04-27 03:10
We're also going to be looking at generating the contracts differently (we still use pact-python to do that, which spawns the ruby server, when we could be using something far more light-weight and direct.)

beth
2018-04-27 03:10
So, you can get junit output from the ruby impl.

richard.jones
2018-04-27 03:11
That was just a nice side-effect of the implementation :slightly_smiling_face:

beth
2018-04-27 03:11
I'll be interested to see it.

oswald.quek
2018-04-27 11:13
it appears this page doesn't work: https://docs.pact.io/best_practices/

rholshausen
2018-04-27 11:51
@oswald.quek where did you get that link from?

oswald.quek
2018-04-27 12:22
my tech lead was mentioning something about "pact best practices" and that's what I got when I entered that into google

oswald.quek
2018-04-27 15:15
hi again, i have a question about tagging consumer versions. I understand I want to tag a provider with "prod" for example, so before I deploy a consumer I can run `pact-broker can-i-deploy --pacticipant documentmanager --version 1.2.7 --to prod`, where the `--to` flag indicates the prod version of the provider in this case. but why would I want to tag the consumer version with "production"? My question comes from seeing this in the pact file: ``` "pb:tag-prod-version": { "title": "PUT to this resource to tag this consumer version as 'production'", "href": "https://some-url/pacticipants/selfservice/versions/some-version/tags/prod" } ```

oswald.quek
2018-04-27 15:25
oh, is it because before deploying the provider to prod it needs to know what's prod version on the consumer side?

matt
2018-04-28 01:28
You got it

rholshausen
2018-04-28 01:29
ok, thanks


oswald.quek
2018-04-30 09:02
Great, thanks :slightly_smiling_face:

oswald.quek
2018-05-02 14:20
hello. i have a question regarding the image above :arrow_up: . I actually tagged the consumer version `bf2703e` with `test` but presumably the `test` tag didn't appear with the `bf2703e` version because the pact between both consumer versions and the provider are exactly the same. so that's ok. let's say the consumer `bf2703e` gets deployed, because it is on master branch after all. so now when I want to deploy the provider I can do `./pact-broker can-i-deploy --pacticipant <provider> --version <version> --to test` to verify it doesn't break the contract with the consumer. all good, because the pact between both consumer versions and provider are the same. let's say though, if before I deployed the provider, someone else updated the pact on the `a254945` consumer? because it is not master branch anyway. what happens if I do `./pact-broker can-i-deploy --pacticipant <provider> --version <version> --to test` now? is the pact-broker smart enough to know the pact i'm interested in belongs to the `bf2703e` consumer version?

rholshausen
2018-05-03 08:16
@beth :point_up:

rholshausen
2018-05-03 08:18
Even maybe @tjones could answer this?

beth
2018-05-03 09:16
@oswald.quek > I actually tagged the consumer version `bf2703e` with `test` but presumably the `test` tag didn't appear with the `bf2703e` version because the pact between both consumer versions and the provider are exactly the same. so that's ok. The index page only shows the _latest_ tags. If you go into the matrix page, you'll see the tags for all the versions - the ones that are not the latest will be grey, and the latest ones will be coloured. You're only seeing the test tag against a254945 because it is the latest version with the test tag. > let's say though, if before I deployed the provider, someone else updated the pact on the `a254945` consumer? Can you clarify this? Do you mean, someone published different pact content with the same consumer version, so that the resource that was at `/pacts/provider/X/consumer/Y/version/a254945` now has different content? Or, do you mean, someone published a new resource `/pacts/provider/X/consumer/Y/version/xxxxxxx` and tagged it with `test`?

beth
2018-05-03 09:24
Something that may help you understand how the can-i-deploy works is to look at the matrix page, by clicking on the little icon with the squares that is next to the pact icon. When you say "can i deploy to test" it finds the latest version of the other app with the `test` tag, and makes sure there is a row that also has the provider version you're about to deploy. The critical part is that the verification belongs to the _content_, not the version number, so if you publish a pact with the same content, it's "pre verified" in effect.

oswald.quek
2018-05-03 11:34
I meant if someone published different pact content with the same consumer version, so that the resource that was at `/pacts/provider/X/consumer/Y/version/a254945`. but actually, i think it might have been my mistake... I must have somehow tagged version a254945 with "test" which I wasn't supposed to as it's a branch.

oswald.quek
2018-05-03 11:35
@beth thanks for all of that. looking at the matrix clarified my understanding.

matt
2018-05-03 11:44
Once I got the idea that the pact is independent of the consumer/provider version, stuff started to make sense to me

matt
2018-05-03 11:44
When you think there are consumer, provider and pact versions your head wants to explode when you combine it with tags etc.

acooper106
2018-05-03 12:42
Hello anyone here?

acooper106
2018-05-03 12:42
I need some help with the webhook

acooper106
2018-05-03 12:45
a couple things don't seem to be working correctly. I'm wondering if anyone has successfully gotten a webhook to kick off a build?

abubics
2018-05-03 13:30
I definitely have, but you are unlikely to get an answer for another 10 hours :) everyone is asleep here (or close)

abubics
2018-05-03 13:31
Can you describe your situation?

acooper106
2018-05-03 16:59
sure

acooper106
2018-05-03 17:01
I created the webhook incorrectly on the broker, but I can see them listed. When I got the correct config for my bamboo server, I created a new webhook. When I tested the webhook it said 200 ok

acooper106
2018-05-03 17:01
however when I uploaded a new pact the build did not kick off

acooper106
2018-05-03 17:02
then I noticed that my new webhook setting were not listed only the 2 previous ones that I created

acooper106
2018-05-03 17:02
so I tried the steps to delete the webhook

acooper106
2018-05-03 17:03
the webhook is still listen but when I click into it the details are gone

acooper106
2018-05-03 17:03
however when I tried to create the webhook again the new one with the correct details still doesn't show

tmcknight
2018-05-03 19:00
has joined #general2

matt
2018-05-03 20:56
@acooper106 just checking, did you upload a _new_ pact (with different contents), or just publish a new version of a pact? The broker is smart enough to know a pact hasn?t changed and may not trigger a webhook

beth
2018-05-03 23:30
Yes, this is exactly what I was thinking. @acooper106 you can see the webhooks listed if you to to `/webhooks`

asfan.siddiqui
2018-05-04 09:03
can we delete the pacts uploaded on pact broker.I dont find an option to delete the pacts dere.

beth
2018-05-04 09:04
You'll need to delete or through the API browser.

beth
2018-05-04 09:05
Open the pact in the browser, click on the "View in API browser" link. Then, click on the "non get" request button for the "self" relation, and send it a DELETE.

beth
2018-05-04 09:06
If you do the same to the pacticipant resource, you'll delete all versions of the pact.

acooper106
2018-05-04 18:58
I tried changing the file and the version but still not luck.

acooper106
2018-05-04 18:59
Doesn't look like I have any webhooks

acooper106
2018-05-04 18:59
{"_links":{"self":{"title":"Webhooks","href":"https://pactbroker-dev.opst.c1.vanguard.com/webhooks"},"pb:create":{"title":"POST to create a webhook","href":"https://pactbroker-dev.opst.c1.vanguard.com/webhooks"},"pb:webhooks":[],"curies":[{"name":"pb","href":"https://pactbroker-dev.opst.c1.vanguard.com/doc/webhooks-{rel}","templated":true}]}}

acooper106
2018-05-04 19:00
but I test the webhook as the doc says I get a 200 ok


beth
2018-05-05 03:12
If you click on it, you'll get the webhook status page. If there has been an error, you'll find an `error-logs` relation for the error logs in the Links section. Click on the "GET" button to see them.



beth
2018-05-05 03:13
If you see no evidence of any attempted executions, look in the application logs.

beth
2018-05-05 03:19
If you see no logs related to a webhook, it means that the json content was the same as the previous version, so the webhook will not be triggered. If you see "No webhook found for consumer ..." then the json had changed, but there are no webhooks found. If you see "Scheduling job for ..." then the content has changed, a webhook has been found, and a background job has been created to execute it.

beth
2018-05-05 03:28
@acooper106 can you check that the webhook is for pact publication, and not for verification publication? A verification webhook won't fire if you publish a pact.

beth
2018-05-07 09:41
One of my colleagues wrote a blog post on using the pact broker with git workflow. They've come up with a really nice workflow. https://dius.com.au/2018/05/04/pact-testing-git-workflow-and-continuous-integration/

abubics
2018-05-07 09:59
Nice :) maybe this isn't the best place for feedback? But I waa confused by this: > Our build pipeline, in such instances will again first search for pacts tagged with the provider branch name only, but it will not find any pacts tagged with this branch name in the Pact Broker. It will then fetch the latest pacts for all the consumers against the master branch (tag == master). The provider branch name is `master`, so the first sentence means the second sentence... Unless I misinterpret?

beth
2018-05-07 10:43
Talk to Rashdi on DiUS slack. Maybe you can help her find a clearer wording.

acooper106
2018-05-07 10:55
this is what I'm using for the weebhook

acooper106
2018-05-07 10:55
Creating To create a webhook, in the HAL Browser, navigate to the pact you want to create the webhook for (Click "Go to Entry Point", then select "latest-pacts", then select the pact you want to create the webhook for.) Click the "NON-GET" button for the "pact-webhooks" relation. Paste in the webhook JSON (example shown below) in the body section and click "Make Request". An example webhook to trigger a Bamboo job when a contract has changed. { "events": [{ "name": "contract_content_changed" }], "request": { "method": "POST", "url": "http://master.ci.my.domain:8085/rest/api/latest/queue/SOME-PROJECT?os_authType=basic", "username": "username", "password": "password", "headers": { "Accept": "application/json" } } }


acooper106
2018-05-07 10:58
here you can see that the file changed

acooper106
2018-05-07 10:58
before when I setup the webhook it said not run instead of create

beth
2018-05-07 11:05
The date is when it was published. The actual content needs to be different to the previous version before the webhook gets triggered. Make sure you're publishing with a new version number each time as per the documentation about "Pacticipant version numbers" on the Pact Broker wiki.

acooper106
2018-05-07 13:54
Yes, its new content and a new version number. I was saying I can tell the pact was changed because its yellow and the status of the pact says changed.

matt
2018-05-07 14:04
What do the logs say? Perhaps there is an issue getting out of proxy/firewall? There should be a webhook logs page there (off top of my head I can?t recall its name)

acooper106
2018-05-07 20:55
I got the webhook working as expected, I think. So the broker showed green but the actual provider build failed. Is this expected.

acooper106
2018-05-07 20:56
And thanks for sharing the blog i'll be sure to review it

beth
2018-05-08 03:49
@acooper106 have you got ordering by date turned on? I recommend turning it on if you don't already. https://github.com/pact-foundation/pact_broker/wiki/Configuration#ordering-versions-by-date

beth
2018-05-08 03:50
You're having so many problems it feels like there's some fundamental thing that's not right. What version number scheme are you using?

beth
2018-05-08 03:51
Did the provider build fail because of the pact verification, or for another reason? The broker only knows about the verification results, not the status of the overall build.

richard.jones
2018-05-08 23:10
Question for the specification: currently all aspects of a request can be specified with matcher types *except* the URL. That is, allowing something like with_request('GET', "/service/product/1234/details/") and a request matchingRules like {"path": {"matchers": [{"regex": "/service/product/\d+/details/"}]}}... Basically to allow the mock to respond to variations on the URL, not just the params. Is that something that's on the radar?

richard.jones
2018-05-08 23:11
Wait, I just re-read the spec. It is catered for :smile:

richard.jones
2018-05-08 23:11
Sorry for the noise!

matt
2018-05-08 23:11
haha I was about to say :slightly_smiling_face:

richard.jones
2018-05-08 23:12
Not sure how I missed it :smile:

richard.jones
2018-05-08 23:16
and indeed there's test cases for that behaviour that I satisfy in my verifier :stuck_out_tongue:

matt
2018-05-08 23:16
sometimes you just need to ask, and then you dig deeper - glad you found it :slightly_smiling_face:

richard.jones
2018-05-08 23:17
yup!

matt
2018-05-09 07:44
OK, I bring you the (new) definitive guide to versioning in the Pact Broker: https://docs.pact.io/getting_started/versioning_in_the_pact_broker.html

matt
2018-05-09 07:44
@matt pinned a message to this channel.

matt
2018-05-09 07:44
Thanks to @tjones for his hard work on this, and lessons from the trenches :slightly_smiling_face:

beth
2018-05-09 07:46
Awesome work Tim.

beth
2018-05-09 09:23
The new gitbook pages look much better too.

oswald.quek
2018-05-09 12:51
FYI the numbering and bullet points looks a bit off at https://docs.pact.io/getting-started/versioning-in-the-pact-broker#rules

kabagchi87
2018-05-09 13:51
has joined #general2

kabagchi87
2018-05-09 13:52
Hello All

kabagchi87
2018-05-09 13:52
I have obtained a new pactbroker which is https

kabagchi87
2018-05-09 13:52
how do I use it in pact provider test

kabagchi87
2018-05-09 13:53
I have used @PactBroker to pass ip,port and protocol and @PactBrokerAuth with userid and pass

kabagchi87
2018-05-09 13:53
But it fails for the SSL handshake

kabagchi87
2018-05-09 14:16
No worries found the ssl port

acooper106
2018-05-09 18:52
The provider verification failed because the tag changed. Maybe the successful status of the webhook is correct because the webhook did execute successfully even tho it couldn't find the pact file.

acooper106
2018-05-09 18:53
The pact version is using the project version unless the team feels a need to override it. One team choose to do that, but all other teams are using the project version by default.

acooper106
2018-05-09 19:07
we ran into a problem not sure if you can help

acooper106
2018-05-09 19:07
```Add the following constructor to the open source project: https://bitbucket.org/atlassian/swagger-request-validator/src/267f1c2342a93a5bc236a74094bb4d73404a29b3/swagger-request-validator-pact/?at=master public ValidatedPactProviderRule(final String swaggerJsonUrl, final String basePathOverride, final String providerId, final Object target, String host, int port) { this.delegate = new PactProviderRule(providerId, host, port, target); this.providerId = providerId; this.target = target; this.validator = SwaggerRequestResponseValidator .createFor(swaggerJsonUrl) .withLevelResolver(PactLevelResolverFactory.create()) .withBasePathOverride(basePathOverride) .build(); }```

matt
2018-05-09 20:46
That's right, but the verification status should definitely not be great, if you're publishing those results


matt
2018-05-09 20:47
When you say project version, do you mean Maven project version? So the default Java jar versioning scheme?

matt
2018-05-09 20:48
Is the broker setup with the date based versioning setting or semantic versioning?

abubics
2018-05-09 22:27
Yeah the <li/> markers are bottom-aligned, instead of top.

beth
2018-05-10 23:57
Sorry @acooper106 we have no experience with the swagger validator. You'll have to ask the atlassian team.

beth
2018-05-11 00:00
@acooper106 can you make sure that all the teams have read this? https://github.com/pact-foundation/pact_broker/wiki/Pacticipant-version-numbers

beth
2018-05-11 00:01
The pacticipant numbers need to reflect the _commit_ of each codebase for the matrix to work.

beth
2018-05-11 00:01
If the pacts are being published with the same version number multiple times, it won't work.

acooper106
2018-05-14 12:11
the verification status stayed yellow because the build failed and couldn't find the file nothing was updated to the broker

acooper106
2018-05-14 12:18
CashflowEngine version: 1.0.0.RETCFE-WEBSERVICEDOMAIN-71 (cashflow-engine.webservice-domain.1.0.0.RETCFE-WEBSERVICEDOMAIN-71)

acooper106
2018-05-14 12:18
this is an example of a project version and tag


beth
2018-05-14 22:08
@acooper106 does that last number increment every time?

beth
2018-05-14 22:09
Can you explain why the tag is the same as the version?

acooper106
2018-05-15 19:20
the last number is a build number. it will only change if the project version changes and the pact changes

acooper106
2018-05-15 19:25
the tag is the GAV of the project. I mentioned how we are using tagging before: Tagging ? we are not using master/prod instead we are using the project artifact_name.version_id because if a consumer merges to master and the pact tag changes to master then the provider would be verifying that pact without consent. By using the unique id the provider can update when ready.


acooper106
2018-05-15 19:31
I had some general questions or difference about whats in this doc and wanted to see how other were using developing pact into their CD process.

acooper106
2018-05-15 19:36
1. Tagging ? we are not using master/prod instead we are using the project artifact_name.version_id because if a consumer merges to master and the pact tag changes to master then the provider would be verifying that pact without consent. By using the unique id the provider can update when ready.

acooper106
2018-05-15 19:36
2. The Pact sequence diagram ? can you point out where the can I deploy tool is triggered in the flow. On the webhooks page it say they can be used together but I?m not understanding that flow. I wasn't sure if the webhook was meant to kicks off the deployment plan which kicks off the can I deploy. We have implemented can I deploy as a new stage in our deployment and the webhook can kick off a bamboo build (recommended master, but we are leaving it up to teams to create their own webhook).

acooper106
2018-05-15 19:36
3. Example use case ? The network diagram and pact broker made me think there were 2 different consumer teams, however there is one team creating 2 pacts. I was under the impression that if it?s the same Consumer team then they would put all the tests in one pact since its to same provider. Seems like this example use case would make more sense if you had 2 consumers. Or is the best practice for consumer to make multiple pacts to the same provider?

acooper106
2018-05-15 19:36
4. ?Note that tests could be written that identify a new pact? ? do you have doc on how to do this? What do you think about alerts/emails for new pacts and changes to a pact, or should the provider just check the broker which would indicate the change?

richard.jones
2018-05-15 22:27
Hi @acooper106 just wondering where you got that doc from? I can't find the source in google.

beth
2018-05-15 23:23
Hey @richard.jones it's a document that I've been working on that I just haven't had the time to finish yet. I sent a draft to Allegra. I'll see if I can get what I've done out on a public page tomorrow.

richard.jones
2018-05-15 23:24
Cool, thanks!

beth
2018-05-15 23:25
Why don't you just link directly to the version then? There's no need to use a tag. I say this because too many tags will slow down some resources.


beth
2018-05-15 23:30
The "fetch results" is can-i-deploy

beth
2018-05-15 23:31
One consumer has one pact with one provider.

beth
2018-05-15 23:31
Or to put it another way, each consumer has one pact with each provider.

beth
2018-05-15 23:32
One consumer would not have multiple pacts with the same provider. They will have multiple versions of the same pact though.

beth
2018-05-15 23:33
A consumer or provider should be thought of as the unit that gets deployed.

acooper106
2018-05-16 12:27
When we didn't use tags provider builds were failing when a new contract was added or changed. Your doc says that branches should use a unique feature tag, but we are using the GAV which is also unique. What is the difference? And for master you recommend a generic tag (master/prod), but in this case any consumer could merge to master and break a provider build. If providers find the tag maintenance to much then they can always override the default to master/prod,

acooper106
2018-05-16 14:07
Ok then I believe that we have implemented it correctly. Consumer adds a new pact which kicks off the webhook which kicks off the provider build. If the consumer build passes then they merge to master which will kick off the can I deploy.

acooper106
2018-05-16 14:13
I think what could be missing is what happens on branch verse master builds. Or is this doc only for the consumer and provider's master build. In the scenario I mentioned above, we don't have the provider kick of the consumer's deployment task "can I deploy" because the pact hasn't been merged to master yet.

acooper106
2018-05-16 14:15
So in your example should you have 2 different consumer teams using the same provider?

beth
2018-05-16 21:52
> The network diagram and pact broker made me think there were 2 different consumer teams, however there is one team creating 2 pacts. Sorry Allegra, I don't know which example you're talking about.

beth
2018-05-16 21:55
Is it the one with PactPhpExampleClient, PactNetExampleClient and PactExampleApi?

beth
2018-05-17 07:09
Hi I've just done a google docs publish of the "Steps to reaching Pact Nirvana" document that I've been working on slowly for far too long! I'll be formatting it nicely and putting it on the DiUS website, but rather than waiting for that to happen, I thought I'd just get the content out there so you can have a look at it. Feedback would be appreciated! https://docs.google.com/document/d/e/2PACX-1vRf1kSDccImNipOOm1G-bjcSs-ifbZjf1v54K-dIcq8BLKeFPAAm_bf_p71UKqkRMIx30QWWL-kN8TI/pub

kevin.meiresonne
2018-05-17 07:18
very nice

kevin.meiresonne
2018-05-17 07:19
Step 5 was the hardest step to figure out

kevin.meiresonne
2018-05-17 07:20
so nice to see to have some pointers and tips here

kevin.meiresonne
2018-05-17 07:21
Something we leverage as well are the verification badges. We put them on a "release dashboard" so at any point in time we can see if our suite is in a releaseable state

beth
2018-05-17 07:23
I'd love to see an (appropriately redacted) screen shot!

beth
2018-05-17 07:25
I'd love to get some use cases from some of our advanced pact broker users like you @kevin.meiresonne

beth
2018-05-17 07:25
Everyone's release process is different, so it's hard to describe "the" way of doing it. There will be heaps of different ways of integrating pact+broker into a release pipeline.

kevin.meiresonne
2018-05-17 07:26
of the entire dashboard? or just the pact bits (which in fairness isn't much more than a list of badges which redirect to the contract in question) and links to the broker and relationship graph.

kevin.meiresonne
2018-05-17 07:26
very true

kevin.meiresonne
2018-05-17 07:27
ours is pretty close to the strategy you describe though, but when time permits, I'll happily write our process down (need it anyway for our teams :))

beth
2018-05-17 07:27
just the pact bit. but I guess I'm interested in the underlying config of the badges too. I know you guys are using the matrix badges, so you must have a consumer tag and a provider tag that must be green for you to deploy. what do you use?

beth
2018-05-17 07:28
:thumbsup:

kevin.meiresonne
2018-05-17 07:30
Indeed, we use the tagged badges: <BROKER>/matrix/provider/<MYPROVIDER>/latest/master/consumer/<MYCONSUMER>/latest/master/badge.svg

beth
2018-05-17 07:31
you don't check for prod compatibility before you deploy?

kevin.meiresonne
2018-05-17 07:32
using can-i-deploy?

beth
2018-05-17 07:33
that or checking the badge for /latest/prod.../latest/master

beth
2018-05-17 07:33
or do you deploy so often that backwards compatibility isn't such an issue?

beth
2018-05-17 07:34
It's more of a problem when one service is under rapid development, and another one hasn't been deployed for months.

kevin.meiresonne
2018-05-17 07:37
we deploy daily

beth
2018-05-17 07:37
right. backwards compatibility problems are unlikely then.

kevin.meiresonne
2018-05-17 07:37
so all changes pushed to master are deployed within a day

beth
2018-05-17 07:38
living the dream :wink:

kevin.meiresonne
2018-05-17 07:39
hehe

kevin.meiresonne
2018-05-17 07:40
also, the deploy always consists of all services, so there's no chance of contracts breaking because of backward compatibility (if the badges are all green)


richard.jones
2018-05-18 04:52
Hi Pact folks, some advice please: when unit testing and generating contracts for a PATCH interface, how do best handle the myriad combination of attributes that the unit tests might generate (including null vs. non-null values)?


beth
2018-05-18 04:54
Is it using proper JSON patch, or put with a partial resource?

beth
2018-05-18 04:55
I think I'd do one interaction with every possible value filled

beth
2018-05-18 04:55
And one with a single change.

beth
2018-05-18 04:57
Trying to exhaustively test each field individually wouldn't be helpful or feasible I think.

beth
2018-05-18 04:58
You'd want to make sure that the resource returned the updated state in its response.

beth
2018-05-18 04:58
Otherwise, you could be sending in junk, and you'd never know.

richard.jones
2018-05-18 04:59
It's an actual JSON patch, yeah. I'll work with the folks here to try to get the single request approach happening, it'll require a bit of a rethink of their unit testing (which may be beneficial anyway)

richard.jones
2018-05-18 05:00
Thanks for the response!


richard.jones
2018-05-18 06:10
That is actually relevant. A team I was talking to was effectively trying to code provider behaviour (and test the provider behaviour) though the consumer pact, and twisting themselves in knots trying to figure out how to do it :smile:

beth
2018-05-18 07:21
A common trap.


beth
2018-05-18 07:22
Especially the link that goes into an example in depth

liam.fisher
2018-05-21 08:16
has joined #general2

paul.davidson
2018-05-21 08:16
has joined #general2

paul.davidson
2018-05-21 08:18
Hey folks. I am looking at the hosted pact broker to see if it would suit my use. Is there any way to order pacts by date created, rather than by build number through the hosted solution?

kevin.meiresonne
2018-05-21 08:19
Yes, it's possible. The people hosting the broker can change the configuration to do so

paul.davidson
2018-05-21 08:20
on a per customer basis? I wasn't sure if it was just one large multi-tenant deployment or not

kevin.meiresonne
2018-05-21 08:21
Per customer yes. We're using the hosted broker like that

abubics
2018-05-21 08:21
Every broker instance is separately virtualised

paul.davidson
2018-05-21 08:21
excellent, thanks. I'll send them an email

kevin.meiresonne
2018-05-21 08:21
:+1:

claire.thomson
2018-05-21 09:01
has joined #general2

beth
2018-05-21 09:04
@paul.davidson I've set all the hosted brokers to order by date by default.

beth
2018-05-21 09:05
It's now the recommended configuration, and I'll set it to that in the next major release.

paul.davidson
2018-05-21 09:05
ah excellent, thanks @beth perfect.

liam.fisher
2018-05-21 09:19
Perfect @beth! Will that change be included in the docker image?

oswald.quek
2018-05-21 10:02
Just looking at the pact jvm consumer junit test https://github.com/DiUS/pact-jvm/tree/master/pact-jvm-consumer-junit#using-the-base-consumerpacttest. Instead of configuring the pact test like so ``` @Override protected RequestResponsePact createFragment(PactDslWithProvider builder) { Map<String, String> headers = new HashMap<String, String>(); headers.put("testreqheader", "testreqheadervalue"); return builder .given("test state") // NOTE: Using provider states are optional, you can leave it out .uponReceiving("ExampleJavaConsumerPactTest test interaction") .path("/") .method("GET") .headers(headers) .willRespondWith() .status(200) .headers(headers) .body("{\"responsetest\": true, \"name\": \"harry\"}") ``` is it possible to define the pact as a json file directly? e.g. ``` @Test @PactFile("consumer-provider.json") public void someTest() {} ``` where `consumer-provider.json` looks exactly like the pact generated, e.g. ``` { "consumer": { "name": "a-consumer" }, "provider": { "name": "a-provider" }, "interactions": [ { "description": "a valid get user request", "providerState": "a user exists", "request": { "method": "GET", "path": "/v1/api/users/ABC", "headers": { "Accept": "application/json" } }, "response": { "status": 200, "headers": { "Content-Type": "application/json" }, "body": { "external_id": "7d19aff33f8948deb97ed16b2912dcd3", "username": "", "email": "" } } ] } ```

oswald.quek
2018-05-21 10:03
a benefit I see is that multiple unit tests can just use the same pact file

oswald.quek
2018-05-21 10:06
also looking at the pact java8 dsl it become more complicated to write nested objects. Taking https://github.com/DiUS/pact-jvm/tree/master/pact-jvm-consumer-java8#lambda-dsl-1 as an example the `a.object((o) -> o.stringValue("foo", "Foo"))` become much more complicated when there are more nested values/objects in the json structure and it looks like i have to manually set every value using the dsl when it would just be easier if I could define the response of the provider in the pact json file.

beth
2018-05-21 11:24
Sigh. Java. Way to make things complicated.

oswald.quek
2018-05-21 11:56
actually i may have a workaround :slightly_smiling_face:

oswald.quek
2018-05-21 11:56
will post the solution at some point

matt
2018-05-21 12:01
@oswald.quek what about an option where the DTO objects are tagged with annotations, similar to what you see with your JPA / SQL annotations?

matt
2018-05-21 12:02
...as a potential enhancement, that is. Then you could potentially specify the object to match, and the framework will automatically generate the matchers based on the annotations

oswald.quek
2018-05-21 12:07
well currently i'm trying to define my pact like https://github.com/pact-foundation/pact-specification/tree/version-3#example, then using a custom annotation to read in that file and use the PactReader (https://github.com/DiUS/pact-jvm/blob/master/pact-jvm-model/src/main/groovy/au/com/dius/pact/model/PactReader.groovy) to get the Interaction

nic
2018-05-21 12:59
hey all, I'm trying to get js based pact consumer tests running inside a docker container but when pact-node starts up the mock provider it fails to connect to localhost:8989

nic
2018-05-21 13:00
is this a known thing? - I can see there is some work going on with docker examples but nothing complete yet

nic
2018-05-21 13:03
hmm actually just changed my base image to node:8 and it seems to be working, as you were :smile:

matt
2018-05-21 13:04
if it was an alpine container, it just needs some musl libs. See the docker container for pact-mock-service and the verifier.

nic
2018-05-21 13:05
@matt :thumbsup: thanks


nic
2018-05-21 13:20
@matt where can I see that (the docker container for pact-mock-service)?


nic
2018-05-21 13:32
hey @matt so if I base my image off node:8.11.2 it works fine, off 8.11.2-alpine I get an error connecting to localhost on running the consumer tests

nic
2018-05-21 13:33
I looked at the dockerfile above which temporarily adds build-dependencies build-base to the alpine image. I added those to my dockerfile too but no dice

nic
2018-05-21 13:33
even with musl-dev

oswald.quek
2018-05-21 17:03
hmm.... so the BaseProviderRule only sets up the mock server just before a test is run: https://github.com/DiUS/pact-jvm/blob/master/pact-jvm-consumer-junit/src/main/java/au/com/dius/pact/consumer/BaseProviderRule.java#L80. shouldn't the mock server be set up the moment the BaseProviderRule is instantiated? that's because during an integration test I want to spin up my server, which depends on some pact provider; but when i spin up my server it needs to know its downstream dependencies, which is a pretty standard thing. it means if i define a unit test class like ``` public class SomeTest { @Rule public PactProviderRule provider = new PactProviderRule("publicauth", this); @Rule public DropwizardAppRule<PublicApiConfig> myAppServer = new DropwizardAppRule<>( PublicApi.class, resourceFilePath("config/test-config.yaml"), config("connectorUrl", provider.getUrl())); ``` it's not gonna work because when provider.getUrl is called the mock server hasn't been started up yet. any workarounds (apart from me making a PR)?

rcheeniyil
2018-05-21 19:23
has joined #general2

rcheeniyil
2018-05-21 21:59
Hey there, I'm working on a public API and consumers want to see contract testing. Right now I'm trying to figure out a way for consumers to submit provider states without giving consumers direct access to the production database. The first thought was to use API calls to setup the provider state, however that seems clunky for state setup and teardown for each test. Another thought was to develop a supporting service to batch requests for setup and teardown of tests. Are there any other known solutions for provider state setup for public API's currently implemented? Would also appreciate any thoughts on the problem of provider state setup. Note: I have read https://github.com/pact-foundation/pact-ruby/wiki/Why-Pact-may-not-be-the-best-tool-for-testing-public-APIs and the plan (so far) is to keep moving forward with pact

beth
2018-05-21 22:03
Hi @rcheeniyil, welcome to the group.

beth
2018-05-21 22:03
Firstly, can I ask about your verification process. Why would it be the _production_ database that the verification is running against? Can you use a non prod one?

rcheeniyil
2018-05-21 22:04
I misspoke should have said _test_ database

beth
2018-05-21 22:06
You mentioned "giving consumers direct access to the database". Generally, it's the provider team that implements the verification side. Are you doing it differently?

beth
2018-05-21 22:07
The consumer team (in consultation with the provider team of course) generally comes up with the labels for the provider states, but the provide team is responsible for writing the code that takes that label and sets up the right state in the underlying datasource (or, alternatively, sets up a mock in the right state).

rcheeniyil
2018-05-21 22:08
The customer wants to submit contract tests to us so we'd also like to support the submission of provider states. It would be hard for us to maintain all the provider states customers would be writing tests against.

beth
2018-05-21 22:09
A well written pact test should be as flexible as possible with it's expectations of the response, so the exact values of particular data should not really matter.

beth
2018-05-21 22:09
One option is to set up a "base state" of agreed data, that is loaded before the pact tests are run.

beth
2018-05-21 22:10
You might have an agreed resource that has "an alligator with name mary and 3 children" and agreed resource that is always going to be empty.

rcheeniyil
2018-05-21 22:11
I don't think there's a base state that will satisfy all our customers which is why we're trying to avoid that solution at the moment.

beth
2018-05-21 22:12
Ah, I see. How many customers do you have? (If that's not confidential)

beth
2018-05-21 22:12
I have an alternative suggestion for you. Have you used swagger on this project?


rcheeniyil
2018-05-21 22:13
I'm working with Instructure "canvas" I don't know the exact number of schools.

rcheeniyil
2018-05-21 22:14
It's come up but we aren't using it right now.

beth
2018-05-21 22:14
There is an alternative workflow, whereby the consumers write pact tests, and the provider writes a swagger document. The provider tests that the swagger document is correct by using a tool like dredd, and the pact is validated against the swagger document, instead of a running service.

beth
2018-05-21 22:15
You lose a little bit of confidence in the verification results because there is an extra layer of abstraction, but what you gain is the fact that you don't have to maintain any provider states for the pacts - only for the dredd tests, which you have complete control over.

beth
2018-05-21 22:15
I think it is a much better workflow for your situation.

rcheeniyil
2018-05-21 22:17
Thanks I'll take a look at that. Thanks for the quick insight

beth
2018-05-21 22:18
The workflow is not documented well - I was just thinking I'd put something up on http://docs.pact.io about it.

beth
2018-05-21 22:18
But I'm happy to talk you through it if you need.

beth
2018-05-21 22:19
Here's a brief description with a diagram https://www.youtube.com/watch?v=79GKBYSqMIo#t=39m10s

abubics
2018-05-21 22:26
Pact is more intended to be run with unit tests. Your consumer should be modularly layered, so the API client is the only thing you're testing with Pact :)

abubics
2018-05-21 22:27
If you want to use a standalone mock or stub Pact server, if should be started in a separate before you start your integrated suite. But I'd be wary of that approach.

richard.jones
2018-05-22 04:34
Hi folks, I'm looking to implement webhook integration from our broker to fire off a Bamboo verification job. What I'm unclear on is how to get the results back to the broker. I believe the docs at https://github.com/pact-foundation/pact_broker/wiki/Provider-verification-results assume the use of the official ruby or java verifier programs - is that correct?

beth
2018-05-22 04:37
> branches should use a unique feature tag The tag should be the name of the branch. It looks like your tags include a sha in them?

beth
2018-05-22 04:38
Yup. You'll have to implement your own verification publishing with your custom verifier.

beth
2018-05-22 04:39
It's reasonably simple.

richard.jones
2018-05-22 04:39
I'm happy to write the code to do the publishing, but I just need the clues about what/where to publish :smile:

richard.jones
2018-05-22 04:40
I'm poking around the ruby verifier but I don't ready ruby so well :disappointed:


beth
2018-05-22 04:41
In the pact itself, there is a `pb:publish-verification-results` relation.

beth
2018-05-22 04:42
`POST` to this relation with a document in the format `{"success": true, "providerApplicationVersion": "4.5.6"}`

richard.jones
2018-05-22 04:42
oh my. I hadn't really looked at those pb entries. there's a lot of goodies in there!

richard.jones
2018-05-22 04:42
Thanks!!

beth
2018-05-22 04:43
The entire API can be navigated by those relations.

beth
2018-05-22 04:43
If you want to use tags with your verification publications, you'll see the code in there to do that too.

richard.jones
2018-05-22 04:43
I see stuff in there about tagging - which is great because I had questions about tagging but now I suspect I know the answers!

richard.jones
2018-05-22 04:43
SNAP :smile:

beth
2018-05-22 04:43
I think you'll need to grab the latest broker, because I only added one of the relations recently to make it easier.

beth
2018-05-22 04:44
I was naughtily handcoding one of the links for a while (bad beth)

beth
2018-05-22 04:45
If you have a hypermedia client in python, I'd recommend using one of those. Or, even better, a HAL client.

richard.jones
2018-05-22 04:45
I will look into that, thanks!

beth
2018-05-22 04:45
I actually wrote my own little one because I didn't want to bring in a dependency that might clash with the actual code under test - it didn't take long.

richard.jones
2018-05-22 04:46
Yep, looks easy enough

beth
2018-05-22 04:50
One thing to note is that you don't want to publish verification results from a local machine - just from the CI. So you'll want a flag that gets switched on only when you're on the CI.

oswald.quek
2018-05-22 08:29
Interesting. I kind of disagree - I've been on a few teams who don't really do unit tests if there are already integration tests. I can see the reasoning for that - I often find things are double tested with a unit and integration test. And for my integration tests I want to avoid using mock servers as much as possible.

oswald.quek
2018-05-22 08:30
But whether we agree or disagree, I think Pact as a tool should provide the option to start its server as soon as a @Rule is called. The job of a tool is to provide options so teams can choose what to do based on their philosophy.

abubics
2018-05-22 08:33
On the consumer side, Pact only provides a mock server . . . I?m not sure how you could avoid that for the use case you?re describing?

abubics
2018-05-22 08:33
but regardless of that

abubics
2018-05-22 08:34
I think you could elaborate on the workflow you?re trying to achieve

abubics
2018-05-22 08:34
you?re running an integration suite, so your service needs to know the URL (or similar) before it even starts, right?

abubics
2018-05-22 08:35
so you would need to pass it in as a startup parameter (somehow, maybe a command-line arg, or env var)

abubics
2018-05-22 08:35
the only way you could do that is by starting the independent service beforehand, or it might not be available by the time your test runs

abubics
2018-05-22 08:37
On the philosophy point, a tool could be opinionated or not. That will help you decide whether it?s appropriate for your use case :D

rholshausen
2018-05-22 08:40
@oswald.quek this is by design. Each test defines the interactions that are required, and a mock server is spun up just for that test.

oswald.quek
2018-05-22 09:35
@rholshausen ah ok I guess that makes sense

oswald.quek
2018-05-22 09:38
@abubics my workflow is pretty standard - i'm doing standard integration tests to call an API. The API depends on a downstream service, e.g. authentication-service. rather than mocking the authentication-service, i'm thinking why not use the pact server. i could go down the unit test route as you say, and for the integration test i'd use a standard mock (i dunno, wiremock or something) for the authentication-service but that's just double the effort of writing mocks.

oswald.quek
2018-05-22 09:38
i think my workarounds are - start my service per unit test as well, or just specify a port number for the pact servers

abubics
2018-05-22 10:05
Your standard integration tests sound like integrated tests, if you need to run your application to run the tests :) If that's the case, then you're testing multiple layers of your app, rather than just the API clients. You can use Pact in that way, but you might quickly find issues where you expect to verify behaviour, and Pact doesn't support that. It really depends on your tests, but Pact's sweet spot is mocking and verifying individual network calls. Good luck :D let us know how you go!

richard.jones
2018-05-23 05:32
@beth I?m really new to HAL so I apologise if I?m wrong here but in the ?pb:tag-version? link in a pact I believe it should declare templated: true (less important) and also action: put?

richard.jones
2018-05-23 05:39
Hmm. I think maybe I might be making up the ?action? thing. Still learning, sorry. Pretty sure the ?templated? thing is correct tho.

beth
2018-05-23 05:39
The action thing isn't a HAL thing, but you're probably right about templated

beth
2018-05-23 05:40
It's the one thing I'm not keen on about hal - it doens't tell you what http methods are available

richard.jones
2018-05-23 05:40
I?m just stumbling my way thru the Python HAL/coreapi code to try to make sense of it all. The Link representation in Python has an action, which is used as the HTTP method when calling the link, but that doesn?t seem to come from HAL. I think it belongs to *other* coreapi standards, not HAL.

beth
2018-05-23 05:40
``` link :'pb:version-tag' do | options | { title: "Get, create or delete a tag for a version of #{represented.name}", href: templated_tag_url_for_pacticipant(represented.name, options[:base_url]), templated: true } end ```

richard.jones
2018-05-23 05:40
I just have to figure out how to make it work in the absence of that information from HAL now?

beth
2018-05-23 05:40
Oh, you're looking at the one in the pact?

beth
2018-05-23 05:41
You can't use that one. It's the consumer version.

richard.jones
2018-05-23 05:41
oh!

beth
2018-05-23 05:41
You need to get the provider using the provider relation, and then use the `pb:version-tag` relation in there.

beth
2018-05-23 05:42
I should deprecate that relation and rename it to make it more clear.

richard.jones
2018-05-23 05:42
ah, that?s not in our version (?a few weeks old?, apparently)

beth
2018-05-23 05:42
the title says `"PUT to this resource to tag this consumer version",`

beth
2018-05-23 05:43
You'll need the very latest broker. I just released that recently.

richard.jones
2018-05-23 05:43
nono, I meant the provider relation having pb:version-tag - yeah, I?m going to ask for an upgrade

beth
2018-05-23 05:44
Yes, that's new. Let's move this to a thread if you need to discuss it any more.

beth
2018-05-23 05:44
There's a release at least once a month, sometimes more.

richard.jones
2018-05-23 05:45
yep. as an organisation we?re only just starting to look at tags :slightly_smiling_face:

beth
2018-05-23 05:45
You can use the test broker if you want a live instance in the meantime.

richard.jones
2018-05-23 05:45
(I?m only just putting the result publication stuff in the verifier, hence the stumbling around in HAL and related code)

richard.jones
2018-05-23 05:45
cool, thanks!

beth
2018-05-23 05:49
``` Broker user: dXfltyFMgNOFZAxr8io9wJ37iUpY42M Broker password: O5AIZWxelWbLvqMd8PkAVycBJh2Psyg1 https://test.pact.dius.com.au ```

oswald.quek
2018-05-23 07:03
It works I guess! https://github.com/alphagov/pay-publicapi/pull/177. Admittedly there's only one test in my DirectDebitPaymentTest.java so the effect on multiple tests has still yet to be seen. If you spot any potential issues, do let me know.

abubics
2018-05-23 07:20
So, you run your app, hit its public API with the interactions described in one pact file, and expect more interactions from another pact file coming out the other end?

abubics
2018-05-23 07:20
Do you have your upstream dependencies verify your private pact file too?

abubics
2018-05-23 07:21
I?m glad you got it working :) I wouldn?t call it a unit test, though :P

oswald.quek
2018-05-23 08:28
no it's not a unit test :slightly_smiling_face:

oswald.quek
2018-05-23 08:29
yes am moving on to upstream dependencies to verify the pact. we already have them for other pacts (where the consumer is a nodejs app). but this is the first time we're doing jvm consumer pact.

abubics
2018-05-23 08:30
fantastic

abubics
2018-05-23 08:31
right now your back-end pacts are coupled to your front-end pacts in a way . . . it?ll be interesting to see if that has problems later (or not)

oswald.quek
2018-05-23 08:32
yeah will keep you updated if there are problems!

richard.jones
2018-05-23 22:48
Is the broker supposed to be detecting duplicate verification results? I was testing yesterday against our dev broker and I can see multiple results in the Matrix for the same pact and provider version. The only thing that differs is the verificationDate.

beth
2018-05-23 23:11
It ignores duplicate pact publications, but I haven't built in logic to ignore duplicate verification results. It's not a bad idea though.

richard.jones
2018-05-23 23:38
I?ve looked, but I can?t see anything that will tell me whether a verification result has been posted.

beth
2018-05-23 23:41
I wouldn't check. Post it anyway.

beth
2018-05-23 23:41
It's not a problem to have duplicates.

beth
2018-05-23 23:41
It's expected.

richard.jones
2018-05-23 23:58
Okie dokie! :slightly_smiling_face:

niek
2018-05-24 07:10
has joined #general2

niek
2018-05-24 07:22
Hi, I found a tweet stating 'and you can integrate [swagger] with the broker too' but i found no way to feed the broker swagger files. https://twitter.com/pact_up/status/936395546083827712

niek
2018-05-24 07:23
Is there an other meaning to that or did i miss it in the docs?

beth
2018-05-24 07:24
Unfortunately we haven't added that part, so you'll need to put the swagger document in another place. Perhaps swagger hub?

beth
2018-05-24 07:24
It's on the to do list though!

niek
2018-05-24 07:24
I see, Thanks

beth
2018-05-24 07:25
You've found the pact swagger validator though?

niek
2018-05-24 07:25
Yes, trying it now

niek
2018-05-24 07:25
looks good

beth
2018-05-24 07:26
I'm not actually sure what @matt was talking about in that tweet?

beth
2018-05-24 07:27
It's something we see a lot of value in doing, but just haven't had the time yet

niek
2018-05-24 07:29
I see, for now i will store the contracts an other way

niek
2018-05-24 07:29
Its only a proof of concept

beth
2018-05-24 07:29
S3 would be ideal if you have aws.

niek
2018-05-24 07:33
I'll check it out, thanks!

richard.jones
2018-05-30 00:10
Is there a way to register a webhook by provider (not pact) so that we even get notifications when new consumers register and we don?t need to then discover the new consumer and add a new webhook to that consumer?

beth
2018-05-30 01:07
I've got the code almost done for that

beth
2018-05-30 01:08
I agree, it's very annoying at the moment.

richard.jones
2018-05-30 01:19
\o/ thanks


beth
2018-05-30 08:27
@beth pinned a message to this channel.

sharding
2018-05-30 20:44
I have a pretty beginner question. So I have read a few articles that have examples that include the consumer and provider tests in the same place, it seems that the examples that I have seen generally do all the testing within the provider. Is a pact broker a way of splitting up the tests so I do not have to have them in the same place, kind of like a db that the consumer and provider can pull from?

matt
2018-05-30 22:28
Pretty much. The broker is really just the best way to share the contract and verification results to multiple consumers and providers, and provides a number of advanced features that you?ll inevitably want to implement.

abubics
2018-05-30 22:32
Also, you don't really write tests for the provider; the pact is the tests :) you just write a bit of known before-state

matt
2018-05-30 22:33
yep. And the examples with both consumer and provider in the same place are more for the sake of convenience - in reality they are almost always in separate repositories and in many cases, managed by separate teams

beth
2018-05-31 01:02
@sharding I've just added the following to the FAQ, inspired by your question > The consumer team is responsible for implementing the Pact tests in the consumer codebase that will generate the contract, and for publishing it to a shared location (usually a [Pact Broker][pact-broker]). The provider team is responsible for setting up the Pact verification task in the provider codebase, and for writing the code that sets up the correct data for each `provider state` described in the contract. Both teams are responsible for collaborating and communicating about the API and its usage! Remember that contracts are not a substitute for good communication between teams.

abubics
2018-05-31 01:26
Maybe we can make that clearer? My coffee API repos are mostly tiny and separate :)

seb
2018-05-31 08:15
has joined #general2

sharding
2018-05-31 16:46
Cool. Thanks for the clarification.

thadir
2018-06-01 08:33
@beth at what version is our hosted pact running (I cant see the version on the UI, maybe a cool feature if you send us mail like that).

beth
2018-06-01 09:07
It's in the headers of the API browser

beth
2018-06-01 09:08
It's all up to date, as mentioned in the email.

beth
2018-06-01 09:09
The only action you need to take is if you're hosting your own.

beth
2018-06-01 09:10
We know some of our customers run their own brokers.

thadir
2018-06-01 09:11
we do 2 but there auto udpating here there more for testing new flows

beth
2018-06-01 09:12
If you've got the latest docker image, you'll be fine.

thadir
2018-06-01 09:12
exactly. thx then its all good

matt
2018-06-01 10:54
We could find a way. The examples in the repo are built and tested with each change (to ensure both backwards compatibility and also to ensure we have working examples), which is a bit harder to do when they are separated

abubics
2018-06-01 23:54
I guess there?s a difference between ?test examples for making sure pact works? and ?ideal example project samples? :3


beth
2018-06-02 08:47
We have been alerted to a vulnerability in the Pact Broker webhooks and have released a fix in version 2.19.2. The latest Docker image has been upgraded to this version. If you're unsure of the version of your current installation, you'll find the version number in the X-Pact-Broker-Version header in the API Browser. Please upgrade your instance as soon as possible.

matt
2018-06-02 08:56
If you're using the hosted broker, it is already up to date

beth
2018-06-02 08:57
Thanks for clarifying! Yes, only self managed instances need updating.

beth
2018-06-03 09:49
one of the new improvements in the latest broker release is that interaction order within the pact is now ignored when determining equality. Many test frameworks run tests in random order, so often a pact would appear changed, when really, it was just a reordering of an existing pact. This new change means that more pacts will be "pre-verified" now, and won't kick off provider builds unnecessarily.

beth
2018-06-03 09:50
@kevin.meiresonne this should fix the problem you had - you can revert those changes you made to make the tests deterministic in order.

richard.jones
2018-06-03 22:26
On a related note I was looking at randomising the run order in my verifier (we have run into one provider with leaky state already)

matt
2018-06-04 04:00
That?s a great idea, in fact, perhaps so great it should go into the main code!

beth
2018-06-04 04:09
I think it's just a setting in the rspec config. Should be easy.

kevin.meiresonne
2018-06-04 06:55
Excellent! Cheers!

beth
2018-06-04 07:39
Actually, it already has this feature @matt but it's off by default

beth
2018-06-04 07:39
interactions-replay-order

rlamb
2018-06-04 17:09
has joined #general2

areddy
2018-06-04 18:23
has joined #general2

matthew.ceroni
2018-06-04 22:36
has joined #general2

matthew.ceroni
2018-06-04 22:38
Trying to understand ?version? in pact broker. The documentation has me a little confused. First, there is an internal pact version that the broker maintains itself. The version I specify in the URL when uploading a pact is the consumer version against which a provider will be verified

matthew.ceroni
2018-06-04 22:40
How is the latest version determined? In reading the documentation I settled on setting an version of semver+gitsha (example: 1.2.0+f9d5325)

matthew.ceroni
2018-06-04 22:41
But if I upload a new version (1.2.1+?.) and I call (http://pact.services.internal/pacts/provider/node-helloworld/consumer/angular-helloworld/latest) it returns the 1.2.0 version



beth
2018-06-04 23:00
Also, there is an excellent document on versioning written by @tjones. Tim, can you post the link to it?

beth
2018-06-04 23:05
You'll need to change the version ordering to date based.


matthew.ceroni
2018-06-04 23:09
beth, I did read the first link around versioning and that left me a little confused :slightly_smiling_face: but I will read the last link you sent. Thanks.

matthew.ceroni
2018-06-04 23:10
Just trying to determine how my workflow will go ?

matthew.ceroni
2018-06-04 23:30
@tjones if, when online, you could post that link that would be great


beth
2018-06-04 23:34
Have a look at the pinned link in this channel titled "The Steps to Reaching Pact Nirvana".

matthew.ceroni
2018-06-05 16:00
will do

lkingsley
2018-06-06 14:49
has joined #general2

gbeckmann
2018-06-06 19:08
has joined #general2

biaofu
2018-06-07 06:44
Hi guys, I know this channel is for Pact Broker, is there any slack channel I can ask some questions about general practice of Pact or Contract Test? :slightly_smiling_face:

matt
2018-06-07 07:06
you can chat here

matt
2018-06-07 07:06
but http://slack.pact.io is probably a better community to discuss

richard.jones
2018-06-07 22:59
Oh, there?s a separate slack for pact? I didn?t realise (I?m not sure how I got the invite to this slack, but I assumed it was ?the? slack for pact. I think maybe all the questions I?ve been asking here should have been there, sorry!

beth
2018-06-07 23:01
This one was created to support the DiUS hosted Pact Broker customers, but we do often just discuss general pact questions anyway. It's better to discuss them in the other channel though, because then other people get the benefit of the discussion.

abubics
2018-06-07 23:02
Plus this team's been here a lot longer :) the general Pact Slack team only opened a few weeks ago

matthew.ceroni
2018-06-07 23:29
Updated config on pact broker to order versions by date. Restarted pact, but still not ordering based on date.

matthew.ceroni
2018-06-07 23:30
I have uploaded a new pact with a different consumer version (1.0.0+SHA) but the tags show latest on the old version, not the new

beth
2018-06-07 23:33
Are you using the hosted version @matthew.ceroni or your own?

matthew.ceroni
2018-06-07 23:33
own .. using the dius pact broker container

beth
2018-06-07 23:34
Sounds like you haven't set your ordering to date.

matthew.ceroni
2018-06-07 23:34
think I might know what I did wrong .. hold on


beth
2018-06-07 23:35
Note that the versions get ordered when you create a new version resource (usually when you publish a pact).

matthew.ceroni
2018-06-07 23:35
I did that. What I did was then just re-run my same build which uploaded with the same consumer version

matthew.ceroni
2018-06-07 23:35
since it wasn?t new, it didn?t get ordered

beth
2018-06-07 23:35
So you'll need to create a pact with an entirely new version for it to re-trigger.

matthew.ceroni
2018-06-07 23:35
yep..did that

matthew.ceroni
2018-06-07 23:35
works. Thanks

beth
2018-06-07 23:35
:thumbsup:

matthew.ceroni
2018-06-07 23:35
ty ..

matt
2018-06-08 02:16
It may be worth consolidating the two slacks. I expect many pact users to also have an interest in the broker. What do you think about the pact broker slack becoming a channel on the pact slack? Then this slack could be archived.

abubics
2018-06-08 02:20
It already is :3

matt
2018-06-08 02:44
I?ve been having this thought for a while now too

matt
2018-06-08 02:44
I might do a poll

abubics
2018-06-08 02:46
I actually don?t mind the duality :upside_down_face: but it?s probably not necessary :P

matt
2018-06-08 03:12
/poll ?We have two Pact Slack accounts - http://slack.pact.io and this one. Should we? ?Keep both? ?Migrate to http://slack.pact.io? ?Meh?

matt
2018-06-08 03:13
:point_up: we?d love your input on this

matt
2018-06-08 03:13
@matt pinned a message to this channel.

beth
2018-06-08 03:15
I've got so many accounts, another one doesn't bother me :-P

matt
2018-06-08 03:16
Agree. Although I?m not a massive fan of having to scroll to different accouns!

matt
2018-06-08 03:17
But it?s less about that, and more about ensuring information is effectively shared to our community. Having two Slack accounts means that some people who aren?t in both miss out

richard.jones
2018-06-08 06:07
I'm not sure I should have a say, but I'm going to leave this slack server regardless as I think all my questions should be on the other server anyway :smile:

matt
2018-06-08 12:37
I'm counting that as a vote for migrate

travi
2018-06-08 14:50
the one downside might be less history because of more conversations unless it is a paid account

gbeckmann
2018-06-08 15:44
I vote for consolidating, we had confusion here at Instructure as different groups of people all though they were in the ?pact? channel - not realizing there were two. :slightly_smiling_face:

matt
2018-06-09 01:24
@travi I?ll make sure we export whatever we can (it?s not a paid account): https://get.slack.help/hc/en-us/articles/217872578-Merge-Slack-workspaces

travi
2018-06-09 01:25
Not something I'm personally too concerned about. Just mentioning as something to consider

matt
2018-06-09 01:25
No, it?s a valid point

beth
2018-06-09 01:52
I'd suggest we have a channel for the hosted broker users, because there are announcements and discussions that are only relevant to that group.

asfan.siddiqui
2018-06-13 08:53
thanks for the help

asfan.siddiqui
2018-06-13 09:06
I want to use the pact broker webhook with gitlab but apparently there is no plugin for configuring pact webhook with gitlab that i can use to trigger the provider api build in gitlab once pact changes.I am trying to setup the build pipeline on gitlab.Need help on this .

beth
2018-06-13 09:38
I just googled "gitlab trigger build API" and found this: https://docs.gitlab.com/ee/ci/triggers/

beth
2018-06-13 09:38
Is there any reason that wouldn't work?


oswald.quek
2018-06-13 12:48
so... we have a situation. a consumer (e.g. service A) has pacts with service B and C. these are in the pact broker, and service B and C have provider tests to provide verification. now service A write a new pact with service D and publishes to pact broker. no provider tests have been written for service D yet. when i want to deploy service A, i ask the pact broker "can-i-deploy"? The answer is no because there's no verification between A and D yet. it does seem like "can-i-deploy" (https://github.com/pact-foundation/pact_broker-client#can-i-deploy) doesn't allow to ignore a pact between A and D. are there any workarounds around this?

kevin.meiresonne
2018-06-13 12:53
Well, it makes sense that can-i-deploy returns "no", as there's indeed no way to guarantee your consumer will work without having service D's verification. What I would suggest is that you should implement your new pact changes in for instance feature branches. Your "can-i-deploy" can then be run against your master pacts. Once your new pact is ready (consumer + provider) you can push it to master, and can-i-deploy will start taking it into account.


kevin.meiresonne
2018-06-13 12:54
Combined with "Step 8"

oswald.quek
2018-06-13 13:33
yeah we have step 8 in one of our projects. i guess some devs were too eager and published a load of tests without there being a provider test!

oswald.quek
2018-06-13 13:34
we don't have continuous deployment, so there were a few versions of consumer waiting to be deployed. during that time someone published a new pact

kevin.meiresonne
2018-06-13 13:36
I guess perhaps you can remove the pact from the broker for now, or tag it differently so that can-i-deploy doesn't look at it?

oswald.quek
2018-06-13 13:49
yeah we've removed it :slightly_smiling_face:

matt
2018-06-13 14:06
As an aside, you can run can-i-deploy and specify the pacticipants to include in the check. By default it includes all. You can see all options with the help command

oswald.quek
2018-06-13 14:46
so `pact-broker can-i-deploy --pacticipant serviceA --latest TAG --pacticipant serviceB --latest TAG` for example

beth
2018-06-13 20:08
Yes. I have considered adding an `--ignore-missing` but you're the first person to actually ask for it. It seems you have a work around though.

mhargiss
2018-06-14 00:16
has joined #general2

rholshausen
2018-06-15 02:25
has joined #general2

trenthornibrook
2018-06-15 02:25
has joined #general2

matt
2018-06-15 02:25
has joined #general2

lardcanoe
2018-06-15 02:25
has joined #general2

fitzoh
2018-06-15 02:25
has joined #general2

sudhapatil3
2018-06-15 02:25
has joined #general2

abubics
2018-06-15 02:25
has joined #general2

vijaynag
2018-06-15 02:25
has joined #general2

theresa
2018-06-15 02:25
has joined #general2

travi
2018-06-15 02:25
has joined #general2

andycampbell92
2018-06-15 02:25
has joined #general2

joel_a
2018-06-15 02:25
has joined #general2

sai.dileepjana
2018-06-15 02:25
has joined #general2

tmok01
2018-06-15 02:25
has joined #general2

mngau
2018-06-15 02:25
has joined #general2

kanchana
2018-06-15 02:25
has joined #general2

cass
2018-06-15 02:25
has joined #general2

stuparty
2018-06-15 02:25
has joined #general2

matt
2018-06-15 02:25
@matt pinned a message to this channel.

tigris
2018-06-15 02:25
has joined #general2

rob-manger
2018-06-15 02:25
has joined #general2

shahzadahmad
2018-06-15 02:25
has joined #general2

timothy.clifford
2018-06-15 02:25
has joined #general2

kevinkraus
2018-06-15 02:25
has joined #general2

jeanmarclai
2018-06-15 02:25
has joined #general2

timbailey
2018-06-15 02:25
has joined #general2

thadir
2018-06-15 02:25
has joined #general2

willmadison
2018-06-15 02:25
has joined #general2

vinny
2018-06-15 02:25
has joined #general2

abe
2018-06-15 02:25
has joined #general2

harryw
2018-06-15 02:25
has joined #general2

beth
2018-06-15 02:25
has joined #general2

matt
2018-06-15 02:25
@matt pinned a message to this channel.

patrick
2018-06-15 02:25
has joined #general2

marcevers
2018-06-15 02:25
has joined #general2

m.pleijte
2018-06-15 02:25
has joined #general2

gtondi
2018-06-15 02:25
has joined #general2

lukvermeulen
2018-06-15 02:25
has joined #general2

mouser
2018-06-15 02:26
has joined #general2

eskimoquinn
2018-06-15 02:26
has joined #general2

rob.lugton
2018-06-15 02:26
has joined #general2

jfeng
2018-06-15 02:26
has joined #general2

shashidesai
2018-06-15 02:26
has joined #general2

coco
2018-06-15 02:26
has joined #general2

stein
2018-06-15 02:26
has joined #general2

jdbann
2018-06-15 02:26
has joined #general2

phil
2018-06-15 02:26
has joined #general2

j03w
2018-06-15 02:26
has joined #general2

fpelletier
2018-06-15 02:26
has joined #general2

acooper106
2018-06-15 02:26
has joined #general2

mlk
2018-06-15 02:26
has joined #general2

finkingma
2018-06-15 02:26
has joined #general2

mattcoder
2018-06-15 02:26
has joined #general2

matt
2018-06-15 02:26
@matt pinned a message to this channel.

matt
2018-06-15 02:26
@matt pinned a message to this channel.

mattfaries
2018-06-15 02:26
has joined #general2

ngbrown
2018-06-15 02:26
has joined #general2

kunwardeep
2018-06-15 02:26
has joined #general2

sheetal
2018-06-15 02:26
has joined #general2

shenahas
2018-06-15 02:26
has joined #general2

king-smith
2018-06-15 02:26
has joined #general2

prudhvi
2018-06-15 02:26
has joined #general2

kale.mcnaney
2018-06-15 02:26
has joined #general2

gareth
2018-06-15 02:26
has joined #general2

fergusstrange
2018-06-15 02:26
has joined #general2

bangn
2018-06-15 02:26
has joined #general2

cormac
2018-06-15 02:26
has joined #general2

v.lukoyanov
2018-06-15 02:26
has joined #general2

neil
2018-06-15 02:26
has joined #general2

shamilton
2018-06-15 02:26
has joined #general2

jeffutter
2018-06-15 02:26
has joined #general2

tjones
2018-06-15 02:26
has joined #general2

d.van.dijk
2018-06-15 02:26
has joined #general2

tom
2018-06-15 02:26
has joined #general2

kong
2018-06-15 02:26
has joined #general2

alexei
2018-06-15 02:26
has joined #general2

w.everse
2018-06-15 02:26
has joined #general2

alok.pandey
2018-06-15 02:26
has joined #general2

veganjenny
2018-06-15 02:26
has joined #general2

jsilver
2018-06-15 02:26
has joined #general2

zerocooljs
2018-06-15 02:26
has joined #general2

mzacharska
2018-06-15 02:26
has joined #general2

nic
2018-06-15 02:26
has joined #general2

cornelia.zintl
2018-06-15 02:26
has joined #general2

mende
2018-06-15 02:26
has joined #general2

kevin.meiresonne
2018-06-15 02:26
has joined #general2

matt
2018-06-15 02:26
@matt pinned a message to this channel.

pivison
2018-06-15 02:26
has joined #general2

andrew.nicholson
2018-06-15 02:26
has joined #general2

rolyat.wilson
2018-06-15 02:26
has joined #general2

fkoner
2018-06-15 02:26
has joined #general2

raghunandanjahagirdar
2018-06-15 02:26
has joined #general2

zac.sims
2018-06-15 02:26
has joined #general2

dniles
2018-06-15 02:26
has joined #general2

siaynoqmage
2018-06-15 02:26
has joined #general2

pfajardo
2018-06-15 02:26
has joined #general2

sharding
2018-06-15 02:26
has joined #general2

dennis
2018-06-15 02:26
has joined #general2

lihongmei
2018-06-15 02:26
has joined #general2

biaofu
2018-06-15 02:26
has joined #general2

m.groeneweg
2018-06-15 02:26
has joined #general2

mellis
2018-06-15 02:26
has joined #general2

giuseppe.landolfi
2018-06-15 02:26
has joined #general2

giuseppe.landolfi575
2018-06-15 02:26
has joined #general2

benjamin.l.tse
2018-06-15 02:26
has joined #general2

ken.westdorp
2018-06-15 02:26
has joined #general2

abhijeet.daspatnaik
2018-06-15 02:26
has joined #general2

icapurrofagian
2018-06-15 02:27
has joined #general2

matt.canty
2018-06-15 02:27
has joined #general2

matthewcanty
2018-06-15 02:27
has joined #general2

sdulebskiy
2018-06-15 02:27
has joined #general2

omar10594
2018-06-15 02:27
has joined #general2

james
2018-06-15 02:27
has joined #general2

sinclair.calleja
2018-06-15 02:27
has joined #general2

thomas.heilbronner
2018-06-15 02:27
has joined #general2

krishnaraj.krishnan
2018-06-15 02:27
has joined #general2

ecoan
2018-06-15 02:27
has joined #general2

berisberis
2018-06-15 02:27
has joined #general2

divs.kanna
2018-06-15 02:27
has joined #general2

tom.vanasch
2018-06-15 02:27
has joined #general2

sumit080
2018-06-15 02:27
has joined #general2

oswald.quek
2018-06-15 02:27
has joined #general2

aserafim
2018-06-15 02:27
has joined #general2

richard.jones
2018-06-15 02:27
has joined #general2

asfan.siddiqui
2018-06-15 02:27
has joined #general2

raul.garcia
2018-06-15 02:27
has joined #general2

tmcknight
2018-06-15 02:27
has joined #general2

matt
2018-06-15 02:27
@matt pinned a message to this channel.

kabagchi87
2018-06-15 02:27
has joined #general2

liam.fisher
2018-06-15 02:27
has joined #general2

paul.davidson
2018-06-15 02:27
has joined #general2

claire.thomson
2018-06-15 02:27
has joined #general2

rcheeniyil
2018-06-15 02:27
has joined #general2

niek
2018-06-15 02:27
has joined #general2

beth
2018-06-15 02:27
@beth pinned a message to this channel.

seb
2018-06-15 02:28
has joined #general2

rlamb
2018-06-15 02:28
has joined #general2

areddy
2018-06-15 02:28
has joined #general2

matthew.ceroni
2018-06-15 02:28
has joined #general2

lkingsley
2018-06-15 02:28
has joined #general2

gbeckmann
2018-06-15 02:28
has joined #general2

matt
2018-06-15 02:28
@matt pinned a message to this channel.

mhargiss
2018-06-15 02:28
has joined #general2

oswald.quek
2018-06-15 11:17
it might be good to add it anyway i think, while specifying the pacts to ignore, e.g. `--ignore-missing serviceD`.

matt
2018-06-16 13:47
why do we have two generals?

mngau
2018-06-17 01:40
Probably because the pactbroker slack team was imported into this one.

dsbenghe
2018-06-17 17:53
has joined #general2


rlamb
2018-06-19 19:22
Where do I find the doc on how to add users with basic auth to the pact-broker-docker?

yamad
2018-07-07 09:48
has joined #general2

mr.matt.r.long
2018-07-16 12:38
has joined #general2

niedra91
2018-07-26 07:46
has joined #general2

niedra91
2018-07-26 07:47
Hi everybody! I?m trying to integrate Pact with a SCIM connector for the needs of a project. The development environment is Java + Maven. I checked out the Workshop project which helped me to understand the integration steps. Using this project and the pact-jvm project, I could successfully write a UT for the connector using Pact Mock Server. I described the Pact using Java 8 Lambda. At this point, I wanna go further and: 1/ Incorporate matchers for the Pact 2/ ?Build? the Pact as json data, as it?s done within the workshop project, but from the Java-8 DSL. I don?t need at the moment to automatically export the generated Pact to the provider through the pact broker. 3/ Test the generated pact against the real provider. I?m kind of stucked here. 1/ I looked in the matchers sub-project of pact-jvm, but could find only Scala or Kotlin classes. Are there any matchers for the Java DSL? Where could I find revelant documentation? 2/ I didn?t see any way to build the Pact in java. Is there a sample maven plugin available? Thanks in advance for your support :slightly_smiling_face:

slack1
2018-07-27 01:32
has joined #general2

sgarvey
2018-08-06 11:23
has joined #general2

mr.matt.r.long
2018-08-07 11:04
Hi guys, anyone know why I'm getting 405 responses when POSTing webhooks to the broker? I don't have basic auth configured right now, so little miffed!?

mr.matt.r.long
2018-08-07 12:56
Sorry, sorted.

tcanascimento
2018-08-07 14:28
has joined #general2

antonios.klimis
2018-08-08 09:44
has joined #general2

kurst03
2018-08-09 00:29
has joined #general2

joshua.haney
2018-08-09 13:54
has joined #general2

lindblad.n
2018-08-13 07:31
has joined #general2

mattgilbert90
2018-09-10 12:48
has joined #general2

zackary.mccolgan
2018-09-20 17:13
has joined #general2

holden.mcginnis
2018-10-03 15:50
has joined #general2

dennis
2018-10-29 21:43
@dennis has left the channel

anothonyvong
2018-11-01 21:38
has joined #general2

hansrd_98
2018-11-02 01:42
has joined #general2

xcq1.defy
2018-11-06 09:28
has joined #general2

nic
2018-11-06 13:08
@nic has left the channel

nigel.hannam
2018-11-06 15:36
has joined #general2

nihei.dev
2018-11-12 09:44
has joined #general2

borsuk.artem034
2018-11-21 15:35
has joined #general2

stein
2018-12-19 17:41
@stein has left the channel

bitsapien
2018-12-31 06:11
has joined #general2

biercoff
2019-02-08 16:24
has joined #general2

biercoff
2019-02-08 16:25
Hi guys. Small question. I have a provider that provides a big json payload. And i also have bunch of consumers - each of them is interested in part of this payload. Does every consumer has to specify full provider payload in the contract, or they can specify only structure they are interested ?

petro.turovskyy
2019-02-09 18:52
has joined #general2

tjones
2019-02-11 03:50
Each consumer test describes only the parts of the contract (and therefore the payload) that they need for that test

tjones
2019-02-11 03:50
In this way, a Pact doesn't describe the API, it describes the parts of the contract that the consumer relies on.

rickard.andersson
2019-02-20 07:05
has joined #general2

joseiglesias
2019-03-25 16:01
has joined #general2

david.edwards
2019-04-12 12:32
has joined #general2

detert
2019-05-06 07:01
has joined #general2

nick.karamaniolas
2019-05-08 10:32
has joined #general2

james.hattersley-dyke
2019-05-10 08:01
has joined #general2

sankalan13
2019-05-22 17:18
has joined #general2

monch1962
2019-05-27 21:27
has joined #general2

diandra
2019-05-28 00:21
has joined #general2

pact.io
2019-05-28 16:42
has joined #general2

thakkarjinal29
2019-06-03 04:01
has joined #general2

rob.clarken
2019-06-04 22:46
has joined #general2

steveland
2019-06-06 15:12
has joined #general2

hboddupalli
2019-06-07 21:33
has joined #general2

n.chachampis
2019-06-11 06:48
has joined #general2

agarwalatrisha1212
2019-06-18 03:18
has joined #general2

shefeeque85
2019-06-22 18:56
has joined #general2

shefeeque85
2019-06-22 18:57
Hello guys...where can I find some examples of .minArrayLike for lambda Dsl


shefeeque85
2019-06-22 18:58
this is my issue

pact.io
2019-06-22 19:15
Do you mean the `.stringType("id", "1")`?

pact.io
2019-06-22 19:15
Did you try `decimalType` instead?

matt.fellows
2019-06-24 02:23
has joined #general2

matt.fellows
2019-06-24 02:24
Guys this is an old channel from migrating another slack group. I'm going to close this, sorry you will have to move your chat elsewhere (possibly #pact-jvm )

matt.fellows
2019-06-24 02:24
archived the channel