hi! something new just popped up ( for 1 pact out ...
# pact-broker
d
hi! something new just popped up ( for 1 pact out of ±30 )
Copy code
●   messages provider tests › all messages
    Verfication failed
      at ../../.yarn/unplugged/@pact-foundation-pact-core-npm-13.13.4-9646a3303c/node_modules/@pact-foundation/pact-core/src/verifier/nativeVerifier.ts:52:20

2023-02-21T13:47:45.029070Z ERROR ThreadId(09) pact_verifier: Failed to load pact - Could not load pacts from the pact broker '<https://pact.xxx.yyy>'
any ideas ? where to search for logs ?
t
This error is coming from the Rust core. Try turning on debug logs with
logLevel: 'debug'
d
Copy code
PACT_BROKER_LOG_LEVEL: "DEBUG"
this one ?
it was on, and nothing like “error” in logs
what is strange
/pacts/provider/ccc/for-verification
Copy code
{
  "_embedded": {
    "pacts": []
  },
  "_links": {
    "self": {
      "href": "https:// /pacts/provider/ccc/for-verification",
      "title": "Pacts to be verified"
    }
  }
}
is empty ( apart from the rest )
found something -
Copy code
DEBUG tokio-runtime-worker Connection{peer=Client}: h2::proto::connection: Connection::poll; connection error error=GoAway(b"", NO_ERROR, Library)
Copy code
"@pact-foundation/pact": "10.4.1",
broker 2.105.0.1
bump to 2.106.0.1 and reboot didnt helped 😞
so, probably its a bug/feature in broker
1. run tests - ( bunch of ) jsons are created 2. jsons uploaded to broker marked with versions and tags a. one of pacticipants is not there anymore ( dont ask why :D) 3. next stages are marking list of pacts with env tags and recorded deployments ( missing pacticipant is there ) - no errors were triggered, that marking something notexistent 🙀 (kinda 4 ) after some time cleaner comes, and sees - (empty) pacticipant must have only 90 day old pacts (
{\"max_age\": 90, \"tag\": \"live1\"}
and deletes non-empty pacticipants so at the end one has “nothing” with recorded and deployed version and when trying
/pacts/provider/ccc/for-verification
gets
go away
:D
m
Copy code
DEBUG tokio-runtime-worker Connection{peer=Client}: h2::proto::connection: Connection::poll; connection error error=GoAway(b"", NO_ERROR, Library)
This isn’t a problem, i’ve noticed the h2 client does this a lot for perfectly normal http requests
(kinda 4 ) after some time cleaner comes, and sees - (empty) pacticipant must have only 90 day old pacts (
{\"max_age\": 90, \"tag\": \"live1\"}
and deletes non-empty pacticipants
the clean should never remove the latest version for each tag though, so unless they’ve been removed by other means it should always have at least 1
what’s your provider configuration used to fetch the pacts?
d
Thing is , there is “last”, which is empty
Like I managed to release/deploy “nothing”
Provider gets deployedorreleased
m
what do you mean by
last
sorry?
u
GoAway(b"", NO_ERROR, Library)
is the standard HTTP2 way of saying done
😆 2
m
Ah!
u
It allows the client to know to close the connection
b
@Dmitry Munda the clean up task docs tell you what to do so that you don’t lose old versions.
• If an application is not under active development, a selector that keeps versions by age limit might not actually select any versions. To ensure that we don’t loose those critical “latest” versions for our main line of development or our deployed environments, add a selector with
{"tag": true, "latest": true}
.
If you move over to using branches and environments, it is much clearer how to configure this, as you can explicitly say “don’t delete deployed or released things”
🙌 1
👍 1
d
clean task is ok
thing is you can tag/release not uploaded version of contract
we had pacticipants A, B, C, D ( and we had versions …`10.2022`,
11.2022
) then C was not uploaded to broker ( yes, guilty 😄 ) when new release came, ABD were uploaded, but AB*C*D were tagged
12.2022
then cleaner came and sees there is C
12.2022
, so previous could be deleted then only not-uploaded, but tagged C exists C is still in can-i-deploy, but when it was requested -
connection error error=GoAway
b
Sorry @Dmitry Munda i’ve lost track of this thread. Can you raise an issue in the pact broker repo with reproducible steps if possible.
d
@Beth (pactflow.io/Pact Broker/pact-ruby) i have many things in parallel those weeks, but as simple as is - one must not able to tag something not uploaded/existing ( some error must appear )
will try to create repro
🙏🏼 1
b
@Dmitry Munda there’s a handy tool for recreating scenarios here https://github.com/pact-foundation/pact_broker/blob/master/ISSUES.md