Page MenuHomePhabricator

[herald] Use the new chronik client with the automated backup
AbandonedPublic

Authored by Fabien on Nov 28 2023, 09:22.

Details

Reviewers
bytesofman
Group Reviewers
Restricted Project
Summary

And fill up the valid urls so it can recover from an outtage automatically.

Test Plan
./contrib/teamcity/build-configurations.py ecash-herald-tests

Diff Detail

Repository
rABC Bitcoin ABC
Branch
herald_backup
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 25750
Build 51080: Build Diffecash-herald-tests
Build 51079: arc lint + arc unit

Event Timeline

Fabien requested review of this revision.Nov 28 2023, 09:22
bytesofman added a subscriber: bytesofman.

Since, previously, ecash-herald did not have built in websocket redundancy -- it was designed to bail out on app startup if the websocket connection failed (this design is also an artifact of when the app was manually deployed).

The unit tests pass here although starting the app with node index.js fails, because the app checks chronik-client-websocket-specific syntax for subscriptions to confirm a successful connection. This syntax changed when subscriptions went from private _subs to public subs.

apps/mock-chronik-client does not mock this level of specifity for chronik-client

See D14869

apps/ecash-herald/package-lock.json
8

I'm not sure why this name field dropped but did not in D14869. What is your output for node -v ?

This revision now requires changes to proceed.Nov 28 2023, 23:56

apps/mock-chronik-client does not mock this level of specifity for chronik-client

never mind this is false -- mock-chronik-client does do this and this unit test happens in alias-server. looking into why it still passed in D14860

looking into why it still passed in D14860

This is because mock-chronik-client is using the old ._subs syntax in its method, so even though the prod app is updating to 0.9.0 which uses .subs -- the mock still says everything is ok.

So, 0.9.0 should have been 1.0.0 as this was an overlooked breaking change. That said, it was private before, so it was a weird and kind of hacky usage where I was checking on it to confirm an active websocket subscription.

Either way, will update mock-chronik-client