Home / Reports / Jun 6, 2023
Tuesday, June 6, 2023
68 commits had been pushed across 19 repos by 28 authors. There were 6,656,420 additions and 531,959 deletions. Official weekly status updates can be found on essentialcardano.io.
Authors
Repos Updated
- catalyst-core16
- uptime11
- cardano-ledger6
- cardano-wallet5
- formal-ledger-specifications4
- CIPs3
- atms-sidechains3
- cardano-js-sdk3
- support-faq2
- yoroi-mobile2
- bech322
- catalyst-ci2
- haskell.nix2
- hydra-poc2
- cardano-token-registry1
- developer-portal1
- cardano-ledger-specs1
- cardano-node-tests1
- mithril1
Commit Log
07:19:14
[29f82f9b]
docs: Merge #3862 3862: Make API error expectations compiler-checkable. r=jonathanknowles a=jonathanknowles Follow-on from https://github.com/input-output-hk/cardano-wallet/pull/3824 ([ADP-2269](https://input-output.atlassian.net/browse/ADP-2269)).
## Summary
This PR replaces `expectErrorCode`, which creates expectations based on string comparisons, with `expectErrorInfo`, which creates expectations based on `ApiErrorInfo` objects.
This has two advantages:
- expectation expressions can be checked statically by the compiler.
- it's possible to express richer expectations based on internal fields of errors (not all errors are just simple values -- some have nested records), using combinators provided by `hspec`.
## Context
In our test suite we test at least two kinds of mapping:
- The mapping between API types and their serialised JSON representations: for all API types, the JSON encoding should be consistent with the OpenAPI specification, and the round trip property `(decode . encode == id)` should hold for all values.
- The mapping from (API call, inputs, state) to API response values: i.e, that API calls return the responses we expect, given appropriate inputs and the current (implicit) wallet state.
Up until now, the approach we've used in `cardano-wallet` is to separate the above two concerns into **different test suites**, i.e., to:
- test expectations about our JSON serialisation logic in specialised tests for just that purpose (JSON golden round trip tests and the test suite for the OpenAPI spec).
- within other test suites (such as the integration test suite), **assume** the correctness of our JSON serialisation logic, and express expectations in terms of ordinary (decoded) Haskell values.
API errors have, up until now, been a sort of exception to this separation of concerns, because until recently we didn't have a good way to create structured errors.
But since merging #3557, which provides support for structured errors and the accompanying [decodeErrorInfo](https://github.com/input-output-hk/cardano-wallet/blob/504774f0f08f4ec74fa91106bc004d8e7b97f875/lib/wallet/integration/src/Test/Integration/Framework/DSL.hs#L559) function, we've gradually been converting expectations about API errors to use the same style as we use for ordinary values returned by the API, which is to express expectations in terms of ordinary Haskell expressions, and to avoid writing expectations in terms of hard-coded strings.
For example, for ordinary (non-error) API responses, we typically write expectations like this:
https://github.com/input-output-hk/cardano-wallet/blob/7af6d54d21443146320eab04452eefb75b3d553e/lib/wallet/integration/src/Test/Integration/Scenario/API/Shelley/Transactions.hs#L297-L299 Co-authored-by: Jonathan Knowles <[email protected]> Source commit: f8ade6feb588cff83a28c840b998d4772b752ec5
(cardano-wallet)
12:37:56
[8b1e7553]
Merge pull request #752 from input-output-hk/feat/track-own-handles
(cardano-js-sdk)
13:02:27
[10f17606]
Merge pull request #1864 from input-output-hk/addr_types_in_topology
(cardano-node-tests)
13:27:33
[15bc25c1]
Only return proposal deposits to registered reward accounts (#122)
(formal-ledger-specifications)
13:41:35
[83acb073]
Merge pull request #743 from input-output-hk/feat/LW-6704-add-greedy-input-selector
(cardano-js-sdk)
14:34:52
[95605833]
Update open source status for lace and bump rank higher amomgst those with equal score due to one of the few open source light wallets (#105)
(support-faq)
14:35:28
[4c3a31ae]
add Haskell Benchmark (customSmallerIsBetter) benchmark result for 67a636a25f9977da0b51e2fb31a2417031e73cd7
(cardano-ledger)
15:35:21
[4d34989b]
docs: Merge #3985 3985: [ADP-3058] Integrate new migrations into the db layer on disk operations. r=paolino a=paolino This is just a patch to #3977, where I just remembered that I needed to unstash the final commit.
ADP-3058
Co-authored-by: paolino <[email protected]> Source commit: cd5a76376090f99a0fd169c1bc09744dbcf30e27
(cardano-wallet)
20:15:48
[16c7a5c1]
add Haskell Benchmark (customSmallerIsBetter) benchmark result for 8ed16f4b203ec5a79bd53ba54bd25b2c6c0e30ed
(cardano-ledger)
21:43:52
[459c1130]
Merge pull request #3471 from input-output-hk/erikd/byron-version
(cardano-ledger)
21:48:11
[5744f8c8]
add Haskell Benchmark (customSmallerIsBetter) benchmark result for 459c11301a294fc76e3e5d6d33586c044be99852
(cardano-ledger)
23:05:24
[4d06a4e9]
🟩 C1 Devnet Sidechain Explorer is up (200 in 212 ms) [skip ci] [upptime]
(uptime)
23:05:25
[54d17716]
🟩 C1 Mainnet Sidechain Explorer is up (200 in 268 ms) [skip ci] [upptime]
(uptime)