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

[feature] #3964: application/x-parity-scale response for /status #3983

Merged
merged 10 commits into from
Oct 31, 2023

Conversation

0x009922
Copy link
Contributor

@0x009922 0x009922 commented Oct 12, 2023

Description

New features:

  • GET /status accepts application/x-parity-scale content type and responds accordingly
  • GET /status/<field> now accepts nested paths, e.g. /status/uptime/secs

Breaking changes:

  • GET /status/<field> used to be forgiving for path-not-found and serialization errors. Now it returns 404 and 500 errors accordingly.
  • Endpoints which reply using SCALE now set Content-Type: application/x-parity-scale

Linked issue

Closes #3964

Benefits

JavaScript SDK can use /status endpoint without hacks around JSON parsing.

Checklist

@github-actions github-actions bot added the iroha2-dev The re-implementation of a BFT hyperledger in RUST label Oct 12, 2023
@coveralls
Copy link

coveralls commented Oct 12, 2023

Pull Request Test Coverage Report for Build 6703625156

  • 52 of 92 (56.52%) changed or added relevant lines in 4 files are covered.
  • 6903 unchanged lines in 129 files lost coverage.
  • Overall coverage decreased (-3.5%) to 55.92%

Changes Missing Coverage Covered Lines Changed/Added Lines %
cli/src/torii/mod.rs 0 2 0.0%
cli/src/torii/utils.rs 0 6 0.0%
cli/src/torii/routing.rs 0 32 0.0%
Files with Coverage Reduction New Missed Lines %
client/src/lib.rs 1 0.0%
config/base/derive/src/view.rs 1 99.37%
config/src/block_sync.rs 1 95.0%
config/src/network.rs 1 93.75%
config/src/torii.rs 1 96.0%
config/src/wasm.rs 1 87.5%
core/src/smartcontracts/isi/block.rs 1 87.5%
config/src/kura.rs 2 79.41%
config/src/lib.rs 2 0.0%
ffi/src/option.rs 2 71.43%
Totals Coverage Status
Change from base Build 5423219773: -3.5%
Covered Lines: 22133
Relevant Lines: 39580

💛 - Coveralls

@6r1d 6r1d force-pushed the iroha2-dev branch 2 times, most recently from 66fec94 to bf90a7d Compare October 17, 2023 11:50
@0x009922 0x009922 force-pushed the 3964-status-scale branch 2 times, most recently from 228e94f to e941a3c Compare October 20, 2023 02:26
@0x009922 0x009922 requested a review from DCNick3 October 20, 2023 07:21
DCNick3
DCNick3 previously approved these changes Oct 20, 2023
@0x009922 0x009922 added Enhancement New feature or request api-changes Changes in the API for client libraries labels Oct 23, 2023
DCNick3
DCNick3 previously approved these changes Oct 23, 2023
Copy link
Contributor

@pesterev pesterev left a comment

Choose a reason for hiding this comment

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

LGMT, but one thing needs to be corrected.

cli/Cargo.toml Outdated Show resolved Hide resolved
…se for `/status` endpoint

Signed-off-by: Dmitry Balashov <a.marcius26@gmail.com>
Signed-off-by: Dmitry Balashov <a.marcius26@gmail.com>
Signed-off-by: Dmitry Balashov <a.marcius26@gmail.com>
Signed-off-by: Dmitry Balashov <a.marcius26@gmail.com>
Signed-off-by: Dmitry Balashov <a.marcius26@gmail.com>
Signed-off-by: Dmitry Balashov <a.marcius26@gmail.com>
Signed-off-by: Dmitry Balashov <a.marcius26@gmail.com>
Signed-off-by: Dmitry Balashov <a.marcius26@gmail.com>
Signed-off-by: Dmitry Balashov <a.marcius26@gmail.com>
Signed-off-by: Dmitry Balashov <a.marcius26@gmail.com>
@0x009922 0x009922 merged commit 054ce63 into hyperledger-iroha:iroha2-dev Oct 31, 2023
9 checks passed
@0x009922 0x009922 deleted the 3964-status-scale branch October 31, 2023 08:14
6r1d pushed a commit that referenced this pull request Oct 31, 2023
#3983)

Signed-off-by: Dmitry Balashov <a.marcius26@gmail.com>
Signed-off-by: 6r1d <vic.6r1d@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-changes Changes in the API for client libraries Enhancement New feature or request iroha2-dev The re-implementation of a BFT hyperledger in RUST
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants