Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ADP-2523] fix json encoding of StakePool to drop Null's #3675

Merged
merged 2 commits into from
Dec 30, 2022

Conversation

paolino
Copy link
Collaborator

@paolino paolino commented Dec 30, 2022

A patch to recover the old behavior.
This was a breaking change that broke Daedalus client. Maybe encoding is always a problem.

  • reencode Nothing as missing fields in StakePool instance
  • bring back old golden tests with missing fields to verify the encoding. They were probably abandoned by mistake by renaming the ApiStakePool type to ApiTStakePool type in the code. A new ApiTStakePool.json instead was placed there that had no missing fields, so roundtrip tests missed the breaking change.
  • add e2e test verifying there are no null values in the GET /stake-pools response

Issue Number

ADP-2523

@paolino paolino force-pushed the paolino/ADP-2523/fix-stake-pool-json-encoding branch from b225d1e to 9823fd7 Compare December 30, 2022 09:23
@paolino paolino force-pushed the paolino/ADP-2523/fix-stake-pool-json-encoding branch from 9823fd7 to ca6296e Compare December 30, 2022 10:22
@paolino paolino force-pushed the paolino/ADP-2523/fix-stake-pool-json-encoding branch from ca6296e to 637f2be Compare December 30, 2022 10:27
Copy link
Contributor

@piotr-iohk piotr-iohk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@piotr-iohk
Copy link
Contributor

bors try

iohk-bors bot added a commit that referenced this pull request Dec 30, 2022
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Dec 30, 2022

@piotr-iohk
Copy link
Contributor

bors r+

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Dec 30, 2022

@iohk-bors iohk-bors bot merged commit c104a9f into master Dec 30, 2022
@iohk-bors iohk-bors bot deleted the paolino/ADP-2523/fix-stake-pool-json-encoding branch December 30, 2022 12:24
WilliamKingNoel-Bot pushed a commit that referenced this pull request Dec 30, 2022
…drop Null's r=piotr-iohk a=paolino A patch to recover the old behavior. This was a breaking change that broke `Daedalus` client. `Maybe` encoding is always a problem. - [x] reencode Nothing as missing fields in `StakePool` instance - [x] bring back old golden tests with missing fields to verify the encoding. They were probably abandoned by mistake by renaming the ApiStakePool type to `ApiTStakePool` type in the code. A new ApiTStakePool.json instead was placed there that had no missing fields, so roundtrip tests missed the breaking change. - [x] add e2e test verifying there are no null values in the GET /stake-pools response ### Issue Number [ADP-2523] Co-authored-by: paolo veronelli <paolo.veronelli@gmail.com> Co-authored-by: Piotr Stachyra <piotr.stachyra@iohk.io> Source commit: c104a9f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants