-
Notifications
You must be signed in to change notification settings - Fork 192
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
Modules remove patch #2216
Modules remove patch #2216
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #2216 +/- ##
======================================
Coverage ? 72.98%
======================================
Files ? 77
Lines ? 8396
Branches ? 0
======================================
Hits ? 6128
Misses ? 2268
Partials ? 0
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
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.
Looks very good! :) Maybe we could add a recommendation to lint the module after that? And also an option to force the remove and skip the questionary.
os.rmdir(temp_module_dir) | ||
|
||
# Remove patch file | ||
patch_path.unlink() |
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 catch possible errors here before removing it from modules.json
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.
Yes, error handling needs to be added for sure!
I've added some code to check if the reverted module matches the code for the known Not sure what the best way to write a test for this is either. |
Even if it would be the easiest, I think we should avoid reinstalling because we could lose track from the "installed_by" in modules.json |
Failure due to an API rate-limit issue. Tests for 3.9 all passed though. Could I get a re-review on the test I implemented please @mirpedrol |
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.
LGTM when tests pass 🙂 thanks!
#1920
This is an initial commit of an example of how we could achieve this using exisiting functionality to apply a patch in reverse.
Would need significant improvements in error-handling.
May be better to do an update on the current
sha
?PR checklist
CHANGELOG.md
is updateddocs
is updated