[Discussion] Load downloader by default #5940

Closed
opened 2022-12-27 23:16:32 +01:00 by Flame442 · 15 comments
Flame442 commented 2022-12-27 23:16:32 +01:00 (Migrated from github.com)

What's the problem?

V3 has a philosophy of not loading any cogs by default, and only enabling the absolute bare minimum functionality in the bot's core on bot startup. This is to prevent users who have just installed Red from feeling overwhelmed by multiple pages of commands, many of which they may not want to use. An obvious example for this kind of thinking can be found looking at the Audio cog, and its 27 top level commands.

The black sheep of this philosophy has always been the Downloader cog, as is only has 4 top level commands which are intended to add the modularity that Red boasts as a major selling point. Currently, there is little reason to not have this cog loaded at all times, since almost all Red users will install at least 1 third party cog, and will want to be able to update that cog later.

How do we fix it?

There are a few different ways to approach making such a change:

Option 1 is to load Downloader by default in new installs, but is otherwise a normal cog after that. This will require the least amount of work to implement, and will not be nearly as much of a breaking change. Users can still decide to unload the Downloader cog if they for some reason wish to do so. However, this option will break the philosophy of V3, and may be slightly confusing for users who may not understand why this cog is loaded and no other.

Option 2 is to build Downloader into Core, similar to how CogManagerUI currently is. This will require more work, will be more of a breaking change, and will make it impossible for users to decide to unload the Downloader cog for whatever reason. However, it always being an available part of the bot will allow other cogs to more safely access its internals without having to also disable themselves when downloader is not loaded. It will also make it easier to make and support actual public APIs, rather than third party cogs like Neuro's updatechecker having to rely on internals. EDIT: It may make sense to consider #5943 at the same time this is done, while Downloader is receiving a major overhaul, if this option is picked.

Option 3 is to do nothing. Obviously this is the easiest option, but it means nothing will change.

What can I do?

We are looking for community feedback regarding this change. If you have any opinions or concerns regarding any of these options, or any options we may not have considered, please let us know in this issue. If we see enough support for this change, we may look in to making one of these changes for 3.6.0 (or some other breaking version thereafter).

### What's the problem? V3 has a philosophy of not loading any cogs by default, and only enabling the absolute bare minimum functionality in the bot's core on bot startup. This is to prevent users who have just installed Red from feeling overwhelmed by multiple pages of commands, many of which they may not want to use. An obvious example for this kind of thinking can be found looking at the Audio cog, and its 27 top level commands. The black sheep of this philosophy has always been the Downloader cog, as is only has 4 top level commands which are intended to add the modularity that Red boasts as a major selling point. Currently, there is little reason to *not* have this cog loaded at all times, since almost all Red users will install at *least* 1 third party cog, and will want to be able to update that cog later. ### How do we fix it? There are a few different ways to approach making such a change: **Option 1** is to load Downloader by default in new installs, but is otherwise a normal cog after that. This will require the least amount of work to implement, and will not be nearly as much of a breaking change. Users can still decide to unload the Downloader cog if they for some reason wish to do so. However, this option will break the philosophy of V3, and may be slightly confusing for users who may not understand why this cog is loaded and no other. **Option 2** is to build Downloader into Core, similar to how CogManagerUI currently is. This will require more work, will be more of a breaking change, and will make it impossible for users to decide to unload the Downloader cog for whatever reason. However, it always being an available part of the bot will allow other cogs to more safely access its internals without having to also disable themselves when downloader is not loaded. It will also make it easier to make and support actual public APIs, rather than third party cogs like Neuro's `updatechecker` having to rely on internals. EDIT: It may make sense to consider #5943 at the same time this is done, while Downloader is receiving a major overhaul, if this option is picked. **Option 3** is to do nothing. Obviously this is the easiest option, but it means nothing will change. ### What can I do? We are looking for community feedback regarding this change. If you have any opinions or concerns regarding any of these options, or any options we may not have considered, please let us know in this issue. If we see enough support for this change, we may look in to making one of these changes for 3.6.0 (or some other breaking version thereafter).
Drapersniper commented 2022-12-28 00:10:26 +01:00 (Migrated from github.com)

Not sure if the plan is still to merge @Twentysix26 Index cog with Downloader -

while the first would be the easiest is there any real work scenario where it makes sense to unload downloader?

the only thing I can think of is keeping the top level command namespace clear but not aware of any other commands that conflict with downloader anyways.

From a user perspective given how red is advertised it would make sense longterm to bundle it into core similar to CogManagerUI unless there is a clear benefit/reason to ever unload it removing the ability to unload would just simplify the majority of users experience - i.e no need to load Downloader when they inevitably want to install a new cog/update it etc

A quick and cheap way would be to go with option 1 first (potentially even as part of 3.5) and then merge into core as the next minor after

Not sure if the plan is still to merge @Twentysix26 Index cog with Downloader - while the first would be the easiest is there any real work scenario where it makes sense to unload downloader? the only thing I can think of is keeping the top level command namespace clear but not aware of any other commands that conflict with downloader anyways. From a user perspective given how red is advertised it would make sense longterm to bundle it into core similar to CogManagerUI unless there is a clear benefit/reason to ever unload it removing the ability to unload would just simplify the majority of users experience - i.e no need to load Downloader when they inevitably want to install a new cog/update it etc A quick and cheap way would be to go with option 1 first (potentially even as part of 3.5) and then merge into core as the next minor after
Jackenmen commented 2022-12-28 00:11:42 +01:00 (Migrated from github.com)

Not sure if the plan is to merge @ Twentysix26 Index cog with Downloader

That would be a separate issue entirely.

> Not sure if the plan is to merge @ Twentysix26 Index cog with Downloader That would be a separate issue entirely.
Twentysix26 commented 2022-12-29 00:55:32 +01:00 (Migrated from github.com)

+1 on option 2 if there is real community interest in a Downloader public API. Otherwise, I don't see much reason to spend time changing a setup that works fine as is.

+1 on option 2 if there is real community interest in a Downloader public API. Otherwise, I don't see much reason to spend time changing a setup that works fine as is.
wohali commented 2022-12-30 00:14:35 +01:00 (Migrated from github.com)

I like Option 2, but could see the value in having a global disable of downloading functionality (possibly out-of-band, an env var or startup option). I can't see the downside of always including the downloading functionality as long as it can be hard-disabled somehow.

As-is is great too, every use case is catered for, even if it is a special case philosophically.

I like Option 2, but could see the value in having a global disable of downloading functionality (possibly out-of-band, an env var or startup option). I can't see the downside of always including the downloading functionality as long as it can be hard-disabled somehow. As-is is great too, every use case is catered for, even if it is a special case philosophically.
ltzmax commented 2022-12-30 01:38:48 +01:00 (Migrated from github.com)

I'll say +1 for option 2.
It sounds pretty alright option since I nearly never see anyone actually unload downloader, You pretty much need it for cog installing, repo adding and cog update / repo update.

I'll say +1 for option 2. It sounds pretty alright option since I nearly never see anyone actually unload downloader, You pretty much need it for cog installing, repo adding and cog update / repo update.
qenu commented 2022-12-30 02:16:41 +01:00 (Migrated from github.com)

+1 for option 2
Imo, cogs are one of the core features for Red.
Moving Downloader to Core sounds like the intuitive option.

+1 for option 2 Imo, cogs are one of the core features for Red. Moving Downloader to Core sounds like the intuitive option.
Kuro-Rui commented 2023-01-01 05:38:40 +01:00 (Migrated from github.com)

Imma say +1 for option 2
Since many people want to download another external cog, building Downloader into Core will reduce some work and this will be much more efficient.

Imma say +1 for option 2 Since many people want to download another external cog, building Downloader into Core will reduce some work and this will be much more efficient.
palmtree5 commented 2023-01-09 02:44:13 +01:00 (Migrated from github.com)

+1 on option 2 from me

Reading this, it's the option that makes the most sense, since we do advertise being fully modular and a lot of that modularity comes from installing third-party cogs through Downloader

+1 on option 2 from me Reading this, it's the option that makes the most sense, since we do advertise being fully modular and a lot of that modularity comes from installing third-party cogs through Downloader
AAA3A-AAA3A commented 2023-01-09 09:25:19 +01:00 (Migrated from github.com)

+1 for option 2 as well.

First of all, from a new user's perspective, putting the Downloader cog in Core would prevent new users from asking why the add repo command doesn't work.

Also, from a normal user's point of view, this cog is perhaps the most used over a long period of time by users. Running Red without the third-party cogs is only rarely done. It never needs to be unloaded and, since it is rigorously tested before each Red release, it doesn't cause critical errors in the bot (and the fact that it doesn't work would be a problem anyway). In case of an error caused by a loaded cog, the user can use the --no-cogs cli flag, but is often forced to load Downloader to uninstall the problematic cog or retrieve the url from the repo in order to open a problem.

Finally, from the cogs developer's point of view, loading Downloader by default ensures that the user is at the latest version of the code, unless of course he wants to pin the module. This way the user is aware that he can do it easily. Some cogs also use Downloader to retrieve the commit of an installed cog or repo to warn the user that the cog is out of date or calculate a version number. The fact that Downloader may not be loaded and prevents some cogs features from working.

So Downloader has no reason not to be loaded continuously, and I think Red should add it in Core. It provides necessary functionality to all users without exception, unlike default cogs which may not be used.

+1 for option 2 as well. First of all, from a new user's perspective, putting the Downloader cog in Core would prevent new users from asking why the add repo command doesn't work. Also, from a normal user's point of view, this cog is perhaps the most used over a long period of time by users. Running Red without the third-party cogs is only rarely done. It never needs to be unloaded and, since it is rigorously tested before each Red release, it doesn't cause critical errors in the bot (and the fact that it doesn't work would be a problem anyway). In case of an error caused by a loaded cog, the user can use the `--no-cogs` cli flag, but is often forced to load Downloader to uninstall the problematic cog or retrieve the url from the repo in order to open a problem. Finally, from the cogs developer's point of view, loading Downloader by default ensures that the user is at the latest version of the code, unless of course he wants to pin the module. This way the user is aware that he can do it easily. Some cogs also use Downloader to retrieve the commit of an installed cog or repo to warn the user that the cog is out of date or calculate a version number. The fact that Downloader may not be loaded and prevents some cogs features from working. So Downloader has no reason not to be loaded continuously, and I think Red should add it in Core. It provides necessary functionality to all users without exception, unlike default cogs which may not be used.
Zephyrkul commented 2023-01-09 19:46:16 +01:00 (Migrated from github.com)

+1 for option 1.

+1 for option 1.
vertyco commented 2023-01-11 14:34:39 +01:00 (Migrated from github.com)

+1 for option 2, can't think of a reason not to build it into core.

+1 for option 2, can't think of a reason not to build it into core.
hatchcanon commented 2023-01-12 08:09:18 +01:00 (Migrated from github.com)

+1 for option 2

Downloader should be built-in

+1 for option 2 Downloader should be built-in
jump commented 2023-04-02 15:21:22 +02:00 (Migrated from github.com)

I'd like to see it added to the setup. Perhaps that and a few other things. Do you want ability to download cogs enabled by default? Something of that sort.

I'd like to see it added to the setup. Perhaps that and a few other things. Do you want ability to download cogs enabled by default? Something of that sort.
Jackenmen commented 2023-04-02 15:53:06 +02:00 (Migrated from github.com)

I don't think that's something we would be interested in doing. If Downloader is integrated into Core, I don't see us offering a way to cut it off completely. Users will just be able to choose not to use its functionality by disabling or simply not using those commands.

I don't think that's something we would be interested in doing. If Downloader is integrated into Core, I don't see us offering a way to cut it off completely. Users will just be able to choose not to use its functionality by disabling or simply not using those commands.
Owner

Downloader ist inzwischen Teil des Cores (redbot/core/_downloader), der Cog stellt nur noch die Befehle bereit. Die übrige Diskussion (standardmäßig laden) ist eine Ermessensfrage ohne Konsens, deshalb schließe ich das Issue.


Generated by Claude Code

Downloader ist inzwischen Teil des Cores (`redbot/core/_downloader`), der Cog stellt nur noch die Befehle bereit. Die übrige Diskussion (standardmäßig laden) ist eine Ermessensfrage ohne Konsens, deshalb schließe ich das Issue. --- _Generated by [Claude Code](https://claude.ai/code)_
Sign in to join this conversation.
No labels
Automated PR
Blocked
Blocked By: Damage Control
Blocked By: Dependency
Blocked By: Other PR
Breaking Change
Category: CI
Category: Cogs - Admin
Category: Cogs - Alias
Category: Cogs - Audio
Category: Cogs - Bank
Category: Cogs - Cleanup
Category: Cogs - CustomCommands
Category: Cogs - Dev
Category: Cogs - Downloader
Category: Cogs - Economy
Category: Cogs - Filter
Category: Cogs - General
Category: Cogs - Image
Category: Cogs - Mod
Category: Cogs - Modlog
Category: Cogs - Mutes
Category: Cogs - Permissions
Category: Cogs - Reports
Category: Cogs - Streams
Category: Cogs - Trivia
Category: Cogs - Trivia - Lists
Category: Cogs - Warnings
Category: Core - API - App Commands Package
Category: Core - API - Audio
Category: Core - API - Bank
Category: Core - API - Commands Package
Category: Core - API - Config
Category: Core - API - Other
Category: Core - API - Utils Package
Category: Core - Bot Class
Category: Core - Bot Commands
Category: Core - Command-line Interfaces
Category: Core - Downloader
Category: Core - Help
Category: Core - i18n
Category: Core - Modlog
Category: Core - Other Internals
Category: Core - RPC/ZMQ
Category: Docker
Category: Docs - Changelogs
Category: Docs - For Developers
Category: Docs - Install Guides
Category: Docs - Other
Category: Docs - User Guides
Category: Meta
Category: RPC/ZMQ methods
Category: Vendored Packages
Changelog Entry: Added
Changelog Entry: Pending
Changelog Entry: Skipped
Closed: Duplicate
Closed: External
Closed: Invalid
Closed: User Error
Closed: Won't Fix
Complex Issue
Docs-only
Feature Branch
Good First Issue
Help Wanted
High Priority
Needs Backport To stable-docs
No Activity
No Repro
QA: Bypassed
QA: Changes Requested
QA: Passed
Release Blocker
Status: Accepted
Status: Frozen
Status: In Progress
Status: Needs Discussion
Status: Needs Info
Status: Needs Triage
Status: PRs Welcome
Type: Bug
Type: Dependency Update
Type: Deprecation
Type: Enhancement
Type: Feature
Type: Informational
Type: Merge
Type: Optimisation
Type: Question
Type: Removal
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Mrcoolgamer11/Red-DiscordBot#5940
No description provided.