-
Notifications
You must be signed in to change notification settings - Fork 375
fix(execute): execute remote got broken
#1786
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
base: forks/osaka
Are you sure you want to change the base?
fix(execute): execute remote got broken
#1786
Conversation
| for group in parser._groups: | ||
| for option in group.options: | ||
| if "--chain-id" in option._long_opts: | ||
| chain_id_exists = True | ||
| break | ||
| if chain_id_exists: | ||
| break |
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.
I would rather not having to patch like this. The places/plugins where we define --chain-id is currently visible in code + the pytest ini files, we could take some time to locate them and simply refactor based on that.
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.
u can locate them via rg -nP 'addoption\(\s*"--chain-id"' --multiline .
the problem we seem to have is that the logic for handling --chain-id and--rpc-chain-id deprecation stuff are kinda duplicated in remote.py (does not specify loading order) and execute.py (uses @pytest.hookimpl(tryfirst=True)). and we have multiple plugins with execute in their name which makes it hard to see which of them end up requiring chain-id or not.
if u want to do the clean solution (e.g. also get rid of --rpc-chain-id while we are at it, it has been described at 'deprecated' for a long time), we might as well move the parameter stuff into its own plugin (e.g. execute.flags) to have like a single source of truth. or if u don't like the current pr and want minimal changes we can use try .. except instead to get chain-id safely (only if it hasn't been gotten yet)
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.
Let's do it right and extract chain-id logic into its own plugin, but keep the deprecation notice (because nethermind might still be using it at the moment).
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## forks/osaka #1786 +/- ##
============================================
Coverage 86.08% 86.08%
============================================
Files 743 743
Lines 44072 44072
Branches 3891 3891
============================================
Hits 37938 37938
Misses 5656 5656
Partials 478 478
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
🗒️ Description
The recent fix for
execute recoverbrokeexecute remotedue to double registering thechain-idflag. This PR not only fixes what got broken but also adds unit tests for discovering basic breakage like this (not even--helpcommand worked so this can be detected now)🔗 Related Issues or PRs
N/A.
✅ Checklist
toxchecks to avoid unnecessary CI fails, see also Code Standards and Enabling Pre-commit Checks:uvx tox -e statictype(scope):.mkdocs servelocally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.@ported_frommarker.Cute Animal Picture