Skip to content

Error messages as warning in signer #2381

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

Merged
merged 6 commits into from
Mar 24, 2025

Conversation

sfauvel
Copy link
Collaborator

@sfauvel sfauvel commented Mar 21, 2025

Content

This PR includes:

  • a new 550 error code in the aggregator when signer registration is not opened yet
  • increment following metrics on errors considered as a warning:
    • signer_registration_success_since_startup_counter
    • get_signer_registration_total_since_startup_counter metric
  • Create ADR to specify the reserved ranges of 4XX and 5XX codes that we can use in the Mithril nodes (see https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml)

Pre-submit checklist

  • Branch
    • Tests are provided (if possible)
    • Crates versions are updated (if relevant)
    • CHANGELOG file is updated (if relevant)
    • Commit sequence broadly makes sense
    • Key commits have useful messages
  • PR
    • All check jobs of the CI have succeeded
    • Self-reviewed the diff
    • Useful pull request description
    • Reviewer requested
  • Documentation
    • Update README file (if relevant)
    • Update documentation website (if relevant)
    • Add dev blog post (if relevant)
    • Add ADR blog post or Dev ADR entry (if relevant)
    • No new TODOs introduced

Comments

Issue(s)

Closes #2363

Copy link

github-actions bot commented Mar 21, 2025

Test Results

    3 files  ±0     57 suites  ±0   11m 35s ⏱️ +5s
1 774 tests +2  1 774 ✅ +2  0 💤 ±0  0 ❌ ±0 
2 172 runs  +2  2 172 ✅ +2  0 💤 ±0  0 ❌ ±0 

Results for commit 0697709. ± Comparison against base commit 773e911.

This pull request removes 2 and adds 4 tests. Note that renamed tests count towards both.
mithril-aggregator ‑ http_server::routes::reply::tests::test_server_error_convert_signer_registration_round_not_yet_opened_to_503
mithril-aggregator ‑ http_server::routes::signer_routes::tests::test_register_signer_post_ko_503
mithril-aggregator ‑ http_server::routes::reply::tests::test_server_error_convert_signer_registration_round_not_yet_opened_to_550
mithril-aggregator ‑ http_server::routes::signer_routes::tests::test_register_signer_post_ko_550
mithril-signer ‑ runtime::state_machine::tests::unregistered_to_ready_to_sign_counter
mithril-signer ‑ services::aggregator_client::tests::test_550_error_is_handled_as_registration_round_not_yet_opened

♻️ This comment has been updated with latest results.

@sfauvel sfauvel temporarily deployed to testing-preview March 21, 2025 11:06 — with GitHub Actions Inactive
@sfauvel sfauvel temporarily deployed to testing-preview March 21, 2025 11:28 — with GitHub Actions Inactive
@sfauvel sfauvel force-pushed the sfa/2363/error_messages_as_warning_in_signer branch from d2769c6 to e92288f Compare March 21, 2025 13:31
@sfauvel sfauvel temporarily deployed to testing-preview March 21, 2025 13:40 — with GitHub Actions Inactive
@sfauvel sfauvel force-pushed the sfa/2363/error_messages_as_warning_in_signer branch from e92288f to c94b15f Compare March 21, 2025 13:45
@sfauvel sfauvel temporarily deployed to testing-preview March 21, 2025 13:54 — with GitHub Actions Inactive
@sfauvel sfauvel force-pushed the sfa/2363/error_messages_as_warning_in_signer branch from c94b15f to fd4e35e Compare March 21, 2025 14:06
@sfauvel sfauvel temporarily deployed to testing-preview March 21, 2025 14:14 — with GitHub Actions Inactive
@sfauvel sfauvel force-pushed the sfa/2363/error_messages_as_warning_in_signer branch from fd4e35e to 9cddcf6 Compare March 21, 2025 14:33
@sfauvel sfauvel marked this pull request as ready for review March 21, 2025 14:38
@sfauvel sfauvel temporarily deployed to testing-preview March 21, 2025 14:42 — with GitHub Actions Inactive
Copy link
Member

@jpraynaud jpraynaud left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Copy link
Member

Choose a reason for hiding this comment

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

IMO this should be a standard ADR (published on the website)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

DEV-ADR.md Outdated
Comment on lines 39 to 43
We therefore decided to return specific server error codes starting at 550.

Status codes introduced:

- 550: registration round not yet opened
Copy link
Member

Choose a reason for hiding this comment

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

Maybe we want to specify only the ranges we allocate for errors 4XX and 5XX and not list them all here as they will be explained in the OpenAPI?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

Copy link
Collaborator

@dlachaume dlachaume left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@Alenar Alenar left a comment

Choose a reason for hiding this comment

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

LGTM

@sfauvel sfauvel force-pushed the sfa/2363/error_messages_as_warning_in_signer branch from 9cddcf6 to 0697709 Compare March 24, 2025 08:25
@sfauvel sfauvel temporarily deployed to testing-preview March 24, 2025 08:33 — with GitHub Actions Inactive
@sfauvel sfauvel merged commit d618080 into main Mar 24, 2025
37 checks passed
@sfauvel sfauvel deleted the sfa/2363/error_messages_as_warning_in_signer branch March 24, 2025 08:44
@sfauvel sfauvel mentioned this pull request Apr 16, 2025
14 tasks
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.

Some error messages should be considered as warning in signer registration to aggregator
4 participants