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

chore: create a state signer component #10411

Merged
merged 17 commits into from
Dec 13, 2023

Conversation

lpetrovic05
Copy link
Member

closes #10319

@lpetrovic05 lpetrovic05 added this to the v0.46 milestone Dec 11, 2023
@lpetrovic05 lpetrovic05 self-assigned this Dec 11, 2023
@lpetrovic05 lpetrovic05 marked this pull request as ready for review December 11, 2023 12:46
@lpetrovic05 lpetrovic05 requested review from a team as code owners December 11, 2023 12:46
Copy link

github-actions bot commented Dec 11, 2023

Node: HAPI Test (Crypto) Results

211 tests   201 ✔️  18m 41s ⏱️
  22 suites    10 💤
  22 files        0

Results for commit f8904cf.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Dec 11, 2023

Node: Unit Test Results

    2 291 files  ±0      2 291 suites  ±0   50m 3s ⏱️ + 3m 32s
118 426 tests ±0  118 392 ✔️ ±0  34 💤 ±0  0 ±0 
126 847 runs  ±0  126 813 ✔️ ±0  34 💤 ±0  0 ±0 

Results for commit f8904cf. ± Comparison against base commit 6f00b68.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Dec 11, 2023

Node: HAPI Test (Token) Results

189 tests   189 ✔️  18m 1s ⏱️
  13 suites      0 💤
  13 files        0

Results for commit f8904cf.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Dec 11, 2023

Node: E2E Test Results

    1 files      1 suites   26m 2s ⏱️
311 tests 311 ✔️ 0 💤 0
333 runs  333 ✔️ 0 💤 0

Results for commit f8904cf.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Dec 11, 2023

Node: HAPI Test (Misc) Results

420 tests   320 ✔️  24m 30s ⏱️
  74 suites  100 💤
  74 files        0

Results for commit f8904cf.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Dec 11, 2023

Node: HAPI Test (Time Consuming) Results

21 tests     9 ✔️  25m 17s ⏱️
  2 suites  12 💤
  2 files      0

Results for commit f8904cf.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Dec 11, 2023

Node: Integration Test Results

279 tests  ±0   279 ✔️ ±0   28m 27s ⏱️ +2s
    5 suites ±0       0 💤 ±0 
    5 files   ±0       0 ±0 

Results for commit f8904cf. ± Comparison against base commit 6f00b68.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Dec 11, 2023

Node: HAPI Test (Smart Contract) Results

397 tests   356 ✔️  43m 36s ⏱️
  55 suites    41 💤
  55 files        0

Results for commit f8904cf.

♻️ This comment has been updated with latest results.

cody-littley
cody-littley previously approved these changes Dec 11, 2023
Copy link

codecov bot commented Dec 12, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

❗ No coverage uploaded for pull request base (develop@6f00b68). Click here to learn what that means.

Additional details and impacted files
@@            Coverage Diff             @@
##             develop   #10411   +/-   ##
==========================================
  Coverage           ?   63.02%           
  Complexity         ?    30802           
==========================================
  Files              ?     3360           
  Lines              ?   135283           
  Branches           ?    14075           
==========================================
  Hits               ?    85258           
  Misses             ?    46680           
  Partials           ?     3345           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Lazar Petrovic <lpetrovic05@gmail.com>
Signed-off-by: Lazar Petrovic <lpetrovic05@gmail.com>
Signed-off-by: Lazar Petrovic <lpetrovic05@gmail.com>
Signed-off-by: Lazar Petrovic <lpetrovic05@gmail.com>
Signed-off-by: Lazar Petrovic <lpetrovic05@gmail.com>
Signed-off-by: Lazar Petrovic <lpetrovic05@gmail.com>
Signed-off-by: Lazar Petrovic <lpetrovic05@gmail.com>
Signed-off-by: Lazar Petrovic <lpetrovic05@gmail.com>
Signed-off-by: Lazar Petrovic <lpetrovic05@gmail.com>
Signed-off-by: Lazar Petrovic <lpetrovic05@gmail.com>
Signed-off-by: Lazar Petrovic <lpetrovic05@gmail.com>
Signed-off-by: Lazar Petrovic <lpetrovic05@gmail.com>
Signed-off-by: Lazar Petrovic <lpetrovic05@gmail.com>
Signed-off-by: Lazar Petrovic <lpetrovic05@gmail.com>
Signed-off-by: Lazar Petrovic <lpetrovic05@gmail.com>
Signed-off-by: Lazar Petrovic <lpetrovic05@gmail.com>
Signed-off-by: Lazar Petrovic <lpetrovic05@gmail.com>
@lpetrovic05 lpetrovic05 force-pushed the 10319-D-create-a-state-signer-component branch from e8d6481 to f8904cf Compare December 12, 2023 14:57
@lpetrovic05 lpetrovic05 merged commit c7dd6e7 into develop Dec 13, 2023
24 checks passed
@lpetrovic05 lpetrovic05 deleted the 10319-D-create-a-state-signer-component branch December 13, 2023 16:38
Comment on lines +131 to +142
if (converter == null && targetClass.isEnum()) {
// FUTURE WORK: once logging is added to this module, log a warning here
// ("No converter defined for type '" + targetClass + "'. Converting using backup enum converter.");
try {
return (T) Enum.valueOf((Class<Enum>) targetClass, value);
} catch (final IllegalArgumentException e) {
throw new IllegalArgumentException(
"Can not convert value '%s' of Enum '%s' by default. Please add a custom config converter."
.formatted(value, targetClass),
e);
}
}
Copy link
Contributor

@mxtartaglia-sl mxtartaglia-sl Dec 13, 2023

Choose a reason for hiding this comment

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

This is cool, the only problem that I see is that after this change, the method
getConverterForType(@NonNull final Class<T> valueType)
would work inconsistently compared with #convert.

Regardless I don't think that the change required to address my comment is in the scope of the current task. What do you think @hendrikebbers should we create a follow-up task to make those two behaviors consistent on our side?

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.

Create a state signer component
7 participants