This repository has been archived by the owner on Sep 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Fix Voight kampff reset of patched config #2742
Merged
krisgesling
merged 2 commits into
MycroftAI:dev
from
forslund:bugfix/vk-reset-config-spam
Nov 6, 2020
Merged
Fix Voight kampff reset of patched config #2742
krisgesling
merged 2 commits into
MycroftAI:dev
from
forslund:bugfix/vk-reset-config-spam
Nov 6, 2020
Conversation
This file contains 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
devs-mycroft
added
the
CLA: Yes
Contributor License Agreement exists (see https://github.com/MycroftAI/contributors)
label
Oct 28, 2020
forslund
added
the
Status: Work in progress
PR being actively worked on, not yet ready for review.
label
Oct 28, 2020
As I read more of the context I see that there may be a better way of handling this. Adding the work in progress label while I research a bit more. |
Voight Kampff Integration Test Succeeded (Results) |
Thanks for digging into this, and also for not just removing the logging line 😂 |
original_config will now only live in the scenario part of the context being automatically cleared at the end of each scenario. To reset the patch a custom cleanup is added when the patch is performed.
Since we have a reset log a matching info message for when updating the config should be shown
forslund
force-pushed
the
bugfix/vk-reset-config-spam
branch
from
October 29, 2020 07:06
4f420c6
to
dfe909a
Compare
Voight Kampff Integration Test Succeeded (Results) |
forslund
added
Type: Refactoring and other improvements
Improvement of code and documentation that does not alter functionality.
and removed
Status: Work in progress
PR being actively worked on, not yet ready for review.
labels
Oct 29, 2020
Updated the procedure to use a custom cleanup. This keeps all the config logic in a single location and fixes the redundant config patch clearing. |
forslund
added
Type: Tests
Addition or improvement of automated tests
and removed
Type: Refactoring and other improvements
Improvement of code and documentation that does not alter functionality.
labels
Oct 31, 2020
krisgesling
approved these changes
Nov 6, 2020
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.
context.add_cleanup()
💥
Also nice to have the config methods brought together - beautiful stuff!
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
CLA: Yes
Contributor License Agreement exists (see https://github.com/MycroftAI/contributors)
Type: Tests
Addition or improvement of automated tests
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
This resets a configuration patch by adding a custom cleanup function. This moves the entire config patching and resetting into the steps/configuration.py file keeping it all together in one place.
This also fixes issue with test cases following a case setting the system units would reset the config despite not needing to. This resulted in quite cluttered see here for example
How to test
Make sure VK test passes and reset message is only shown on test cases that patches the config.
Contributor license agreement signed?
CLA [ Yes ] (Whether you have signed a CLA - Contributor Licensing Agreement