fix(core): rpc reload has old cache#6628
Open
NNTin wants to merge 10 commits intoCog-Creators:V3/developfrom
Open
fix(core): rpc reload has old cache#6628NNTin wants to merge 10 commits intoCog-Creators:V3/developfrom
NNTin wants to merge 10 commits intoCog-Creators:V3/developfrom
Conversation
Contributor
Author
# Call RPC handler and verify it now executes new code
result = await new_handler()
> assert result == "version_2", "RPC handler should execute new code after reload"
E AssertionError: RPC handler should execute new code after reload
E assert 'version_1' == 'version_2'
E - version_2
E ? ^
E + version_1
E ? ^from https://github.com/Cog-Creators/Red-DiscordBot/actions/runs/19065280048/job/54454289643?pr=6628 |
…pyc files in __pycache__ directories Reload Problem: When modules were reloaded after source code changes, Python continued using the cached .pyc
…rpc_reload; this test will fail, HTTP test re-runs red.rpc._pre_login() after fixtures, wiping earlier RPC handler registrations.
… it as: params[0] (which is "httptest") → pkg_names argument So pkg_names gets the value "httptest" instead of ["httptest"].
Contributor
Author
|
The test with the version update was fixed in commit 9650a09 (?) python -m pytest tests/core/test_rpc.py::test_rpc_handler_updates_on_reload -v -s --tb=short Solving rpc reload via websocket, has the same root of error: Solving that was a mess. Month just started and my GitHub Copilot is already at 50% usage 😖 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of the changes
Have the changes in this PR been tested?
Yes, via tests
No, via manual reproduction of issue