-
Notifications
You must be signed in to change notification settings - Fork 77
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
Fix: Resolve Type Warnings for ConfigService.get() #3350
Fix: Resolve Type Warnings for ConfigService.get() #3350
Conversation
@Nana-EC @ebadiere @quiet-node I've submitted a PR addressing issue #3142 to resolve type warnings for ConfigService.get(). It ensures type consistency across test cases by refining type usage and adding/removing the necessary casting. Let me know if further changes are needed. Thank you for reviewing! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution.
packages/relay/tests/lib/config/hbarSpendingPlanConfigService.spec.ts
Outdated
Show resolved
Hide resolved
27253f5
to
7f440e4
Compare
@Nana-EC @acuarica @quiet-node, Could you please review my updates and let me know if further adjustments are needed? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @belloibrahv, thanks for taking the time to send this, it's looking good. Left a couple of suggestions we can continue iterating on to improve the config.
packages/config-service/tests/src/services/configService.spec.ts
Outdated
Show resolved
Hide resolved
packages/config-service/tests/src/services/configService.spec.ts
Outdated
Show resolved
Hide resolved
Also @belloibrahv please take a look at #3350 (comment). |
7f440e4
to
c7e6a08
Compare
@quiet-node @acuarica @Nana-EC @shemnon , thank you for the suggestion. I've implemented the following changes based on your feedback:
Let me know if there's anything else you'd like me to address! |
@acuarica, Thank you for the suggestion! I think adding a Would you suggest we implement these methods for this task or address it as a follow-up? Also, should these methods throw errors for mismatched types, or return defaults like |
Let's do it in a separate PR after this. Also appreciate the patience. |
Hi @quiet-node, @acuarica, @Nana-EC, @shemnon, Hope you all had a wonderful holiday! When you have a moment, please review and provide feedback on the requested changes to the PR. Thank you for your understanding! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @belloibrahv, hope you had a wonderful holiday too! It's looking good, left some comments.
We appreciate your patience on this. Next week the full team will be back from holidays, so you'll get more reviews.
packages/relay/tests/lib/config/hbarSpendingPlanConfigService.spec.ts
Outdated
Show resolved
Hide resolved
Great job @quiet-node 🚀 |
Signed-off-by: Logan Nguyen <[email protected]>
Signed-off-by: Logan Nguyen <[email protected]>
Signed-off-by: Logan Nguyen <[email protected]>
Signed-off-by: Logan Nguyen <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @belloibrahv and @quiet-node for putting the effort to get this done. Great stuff!
…h config value Signed-off-by: Logan Nguyen <[email protected]>
…ith config Signed-off-by: Logan Nguyen <[email protected]>
Signed-off-by: Logan Nguyen <[email protected]>
…h config Signed-off-by: Logan Nguyen <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fantastic work!
@quiet-node @acuarica @natanasow @Nana-EC 🚀 🚀🚀 Thank You all |
Codecov ReportAttention: Patch coverage is
❌ Your project check has failed because the head coverage (53.61%) is below the target coverage (80.00%). You can increase the head coverage or adjust the target coverage.
Additional details and impacted files@@ Coverage Diff @@
## main #3350 +/- ##
===========================================
- Coverage 85.58% 53.61% -31.98%
===========================================
Files 69 65 -4
Lines 4753 4525 -228
Branches 1059 979 -80
===========================================
- Hits 4068 2426 -1642
- Misses 393 1700 +1307
- Partials 292 399 +107
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Signed-off-by: Logan Nguyen <[email protected]> Revert "fix(ci): fixed ci test with fallback log level" This reverts commit 9af4396. Reapply "fix(ci): fixed ci test with fallback log level" This reverts commit bd81c5729ffa7e4e20cf07cccbec718aff61af9b. Revert "fix(ci): fixed ci test with fallback log level" This reverts commit 981cad0a66a4e487d6e396dfcc0fa1123f19296f. Reapply "fix(ci): fixed ci test with fallback log level" This reverts commit 87eb44fd5fcd09156210cd431d7a0d00e9f8e720.
fa189dd
to
67a8e75
Compare
Signed-off-by: Logan Nguyen <[email protected]>
|
Thanks, team, for the great responses and feedback! Congrats on the merge, @belloibrahv! Appreciate your effort and patience—looking forward to more of your contributions in the future! |
Thank You all for helping out, I look forward to working and collaborating on more work. |
Description:
TL;DR; Enhancing Type Inference, Config Consistency, and Establishing a Single Source of Truth in ConfigService
This PR significantly improves type inference in
ConfigService.get()
, ensuring more reliable and explicit type resolution across configurations.It also updates the entire codebase to adhere to a single source of truth for configuration management, enhancing consistency, reliability, and maintainability.
Key improvements include:
ConfigService.get()
, introducing explicit TypeScript types and interfaces that precisely map config keys to their expected types, reducing manual casting and type mismatches.configurations.md
, enhancing correctness and consistency.configurations.md
, ensuring proper documentation and organization.These enhancements improve type safety, reliability, and maintainability, making the configuration system more robust and easier to manage across the entire codebase.
Related issue(s):
Fixes #3142
Checklist: