-
Notifications
You must be signed in to change notification settings - Fork 447
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
fix: save config and env on plugins enable/disable
#957
Conversation
before this, after enabling/disabling any plugins we should re-generate all files with tutor config save.
e34734f
to
55d466e
Compare
Also, update docs on `tutor config save`. Note that we had to fix an issue where the plugin unload callback was being called too late.
55d466e
to
3fb44cf
Compare
Until Tutor 17, just enabling a plugin with "tutor plugin enable" would not recreate the configuration, meaning the tests/tutor-sandbox/env directory would remain empty. As of overhangio/tutor#957, however, "tutor plugin enable" does automatically also run "tutor config save", generating a full Tutor configuration. This means that unless configured otherwise, with Tutor 17 our flake8 checks would test code generated by Tutor, rather than just that generated by our plugin. Thus, to make our tests not break once we bump our dependencies to support Tutor 17, exclude the tests/tutor-sandbox/env checks from flake8.
Until Tutor 17, just enabling a plugin with "tutor plugin enable" would not recreate the configuration, meaning the tests/tutor-sandbox/env directory would remain empty. As of overhangio/tutor#957, however, "tutor plugin enable" does automatically also run "tutor config save", generating a full Tutor configuration. This means that unless configured otherwise, with Tutor 17 our flake8 checks would test code generated by Tutor, rather than just that generated by our plugin. Thus, to make our tests not break once we bump our dependencies to support Tutor 17, exclude the tests/tutor-sandbox/env checks from flake8.
Until Tutor 17, just enabling a plugin with "tutor plugin enable" would not recreate the configuration, meaning the tests/tutor-sandbox/env directory would remain empty. As of overhangio/tutor#957, however, "tutor plugin enable" does automatically also run "tutor config save", generating a full Tutor configuration. This means that unless configured otherwise, with Tutor 17 our flake8 checks would test code generated by Tutor, rather than just that generated by our plugin. Thus, to make our tests not break once we bump our dependencies to support Tutor 17, exclude the tests/tutor-sandbox/env checks from flake8.
Until Tutor 17, just enabling a plugin with "tutor plugin enable" would not recreate the configuration, meaning the tests/tutor-sandbox/env directory would remain empty. As of overhangio/tutor#957, however, "tutor plugin enable" does automatically also run "tutor config save", generating a full Tutor configuration. This means that unless configured otherwise, with Tutor 17 our flake8 checks would test code generated by Tutor, rather than just that generated by our plugin. Thus, to make our tests not break once we bump our dependencies to support Tutor 17, exclude the tests/tutor-sandbox/env checks from flake8.
Until Tutor 17, just enabling a plugin with "tutor plugin enable" would not recreate the configuration, meaning the tests/tutor-sandbox/env directory would remain empty. As of overhangio/tutor#957, however, "tutor plugin enable" does automatically also run "tutor config save", generating a full Tutor configuration. This means that unless configured otherwise, with Tutor 17 our flake8 checks would test code generated by Tutor, rather than just that generated by our plugin. Thus, to make our tests not break once we bump our dependencies to support Tutor 17, exclude the tests/tutor-sandbox/env checks from flake8.
Until Tutor 17, just enabling a plugin with "tutor plugin enable" would not recreate the configuration, meaning the tests/tutor-sandbox/env directory would remain empty. As of overhangio/tutor#957, however, "tutor plugin enable" does automatically also run "tutor config save", generating a full Tutor configuration. This means that unless configured otherwise, with Tutor 17 our flake8 checks would test code generated by Tutor, rather than just that generated by our plugin. Thus, to make our tests not break once we bump our dependencies to support Tutor 17, exclude the tests/tutor-sandbox/env checks from flake8.
Until Tutor 17, just enabling a plugin with "tutor plugin enable" would not recreate the configuration, meaning the tests/tutor-sandbox/env directory would remain empty. As of overhangio/tutor#957, however, "tutor plugin enable" does automatically also run "tutor config save", generating a full Tutor configuration. This means that unless configured otherwise, with Tutor 17 our flake8 checks would test code generated by Tutor, rather than just that generated by our plugin. Thus, to make our tests not break once we bump our dependencies to support Tutor 17, exclude the tests/tutor-sandbox/env checks from flake8.
Please note: plugin authors may need to be aware of the impact this change may have on their unit and integration tests. See the PRs referenced from here. |
@fghaas Would it make sense to add a |
Good question. Most of the time, users would want automatic Would a toggle to turn it off be useful, or would it be more likely to be a footgun? I really don't know. |
Let's do nothing for now. If you (or anyone else) later think it's important we can decide to add a toggle. |
That works for me! |
Until Tutor 17, just enabling a plugin with "tutor plugin enable" would not recreate the configuration, meaning the tests/tutor-sandbox/env directory would remain empty. As of overhangio/tutor#957, however, "tutor plugin enable" does automatically also run "tutor config save", generating a full Tutor configuration. This means that unless configured otherwise, with Tutor 17 our flake8 checks would test code generated by Tutor, rather than just that generated by our plugin. Thus, to make our tests not break once we bump our dependencies to support Tutor 17, exclude the tests/tutor-sandbox/env checks from flake8.
Until Tutor 17, just enabling a plugin with "tutor plugin enable" would not recreate the configuration, meaning the tests/tutor-sandbox/env directory would remain empty. As of overhangio/tutor#957, however, "tutor plugin enable" does automatically also run "tutor config save", generating a full Tutor configuration. This means that unless configured otherwise, with Tutor 17 our flake8 checks would test code generated by Tutor, rather than just that generated by our plugin. Thus, to make our tests not break once we bump our dependencies to support Tutor 17, exclude the tests/tutor-sandbox/env checks from flake8.
This replaces #917