Skip to content
This repository has been archived by the owner on May 2, 2024. It is now read-only.

Automatically tutor config save after enabling/disabling a plugin #176

Closed
4 tasks
kdmccormick opened this issue Jul 7, 2023 · 5 comments
Closed
4 tasks
Assignees
Labels
good first issue A good task for a newcomer to start with help wanted Ready to be picked up by anyone in the community

Comments

@kdmccormick
Copy link
Collaborator

kdmccormick commented Jul 7, 2023

Background

Every time you run tutor plugins [enable/disable] PLUGIN, it warns you that you should now render your config with tutor config save. Why not just run tutor config save automatically?

Tasks

  • Save config as part of plugin enable/disable.
  • Add a unit test.
  • Manually test, including the case where the plugin has a syntax or a name error in it.
  • Add it to the changelog.

Notes

  • Follow-up:
    • are there any other commands that would make sense to automatically do tutor config save after?
    • going a step further, could we make it so the only time you need to run tutor config save is if you hand-edit config.yml? At that point, perhaps could we rename it to tutor config apply?
  • Pros:
    • Less typing.
    • Less things users can forget to do.
  • Cons:
    • A bit more magical, less explicit.
      • Counterargument: Some other commands already tutor config save for you. For example, tutor mounts [add/remove].
    • Is there ever a time when we'd want to enable or disable a plugin but not apply the change the env/ folder? I can't think of one, except maybe when the plugin has an error. Related:
@kdmccormick
Copy link
Collaborator Author

@regisb Here's one for your consideration, when you have a chance.

@regisb
Copy link

regisb commented Jul 13, 2023

YES! Lately I've been wondering the exact same thing every time I run tutor plugins enable/disable .... We should definitely update the environment on enabling/disabling a plugin.

@kdmccormick kdmccormick moved this from New to Refined in Developer Experience Working Group Jul 13, 2023
@kdmccormick kdmccormick added good first issue A good task for a newcomer to start with help wanted Ready to be picked up by anyone in the community labels Jul 13, 2023
@kdmccormick kdmccormick removed their assignment Aug 18, 2023
@CodeWithEmad
Copy link

Hello there! I'd like to give it a try.
Any additional information or suggestions would be highly appreciated.
Thank you!

@regisb
Copy link

regisb commented Oct 9, 2023

Let's just do the base feature for now (run tutor config save after tutor plugins enable/disable) and we'll think about the follow up later. I think you have enough to get started, and we can always discuss further in the PR.

@CodeWithEmad
Copy link

We can close this because of overhangio/tutor#957

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue A good task for a newcomer to start with help wanted Ready to be picked up by anyone in the community
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants