chore: Added missing timeout support for some execute() implementations#1736
chore: Added missing timeout support for some execute() implementations#1736manishdait wants to merge 4 commits intohiero-ledger:mainfrom
execute() implementations#1736Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #1736 +/- ##
=======================================
Coverage 93.25% 93.25%
=======================================
Files 141 141
Lines 9061 9061
=======================================
Hits 8450 8450
Misses 611 611 🚀 New features to boost your workflow:
|
WalkthroughAdds optional timeout propagation to several Query subclass execute() methods and corrects docstring type-annotation typos; updates CHANGELOG to note timeout propagation. Changes
Sequence Diagram(s)sequenceDiagram
participant Caller as Caller
participant Query as Query Subclass
participant Client as Client
participant Exec as _execute / Transport
Caller->>Query: execute(client, timeout)
Query->>Client: prepare/validate request
Query->>Exec: _execute(client, timeout)
Exec->>Client: send request (network)
Client-->>Exec: response
Exec-->>Query: return response
Query-->>Caller: return parsed result
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Request step security help please @hiero-ledger/security-maintainers |
Signed-off-by: Manish Dait <daitmanish88@gmail.com>
Signed-off-by: Manish Dait <daitmanish88@gmail.com>
Signed-off-by: Manish Dait <daitmanish88@gmail.com>
061546b to
e292f1a
Compare
| - Fixed incorrect run instructions and broaden error handling in `token_dissociate_transaction.py` example to improve usability for new users (#1468) | ||
| - Update `.github/scripts/bot-advanced-check.sh` to unassign unqualified users. | ||
| - Fixed broken project structure link in `CONTRIBUTING.md` (#1664) | ||
| - Ensure all Query sub-class `execute()` function to correctly propagate the optional `timeout` parameter. |
There was a problem hiding this comment.
Minor grammar issue and missing issue reference in changelog entry.
The entry reads slightly awkwardly. Consider rewording for grammatical consistency with other entries in the "Fixed" section, and adding the issue reference for traceability.
Suggested fix
-- Ensure all Query sub-class `execute()` function to correctly propagate the optional `timeout` parameter.
+- Fixed all Query sub-class `execute()` functions to correctly propagate the optional `timeout` parameter. (`#1735`)📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - Ensure all Query sub-class `execute()` function to correctly propagate the optional `timeout` parameter. | |
| - Fixed all Query sub-class `execute()` functions to correctly propagate the optional `timeout` parameter. (`#1735`) |
Signed-off-by: Manish Dait <daitmanish88@gmail.com>
f060927
|
|
||
| import traceback | ||
| from typing import List, Optional | ||
| from typing import List, Optional, Union |
There was a problem hiding this comment.
🧹 Nitpick | 🔵 Trivial
Nit: typing.List is deprecated in favor of built-in list (Python 3.9+).
Ruff UP035 flags this. However, since the entire codebase consistently uses typing.List, this is fine to keep for now. Consider a codebase-wide migration as a separate task.
🧰 Tools
🪛 Ruff (0.14.14)
[warning] 6-6: typing.List is deprecated, use list instead
(UP035)
|
Hi, this is MergeConflictBot. Please resolve these conflicts locally and push the changes. Quick Fix for CHANGELOG.md ConflictsIf your conflict is only in CHANGELOG.md, you can resolve it easily using the GitHub web editor:
For all other merge conflicts, please read: Thank you for contributing! |
|
@manishdait please rebase, i think step security is now passing |
Description:
Support for passing a
timeouttoexecute(client, timeout)was introduced earlier PR #1499, but some query sub-classes that overrideexecute()did not forward the parameter when calling_execute().This PR updates the affected query classes to correctly propagate the
timeoutargument to ensureexecute(client, timeout)behaves consistently across queries.Related issue(s):
Closes #1735
Notes for reviewer:
Checklist