[JSON Schema/Index] Add a new key for cog's info.json to indicate if ready for d.py 2.0/Red 3.5 #5836
Labels
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
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Mrcoolgamer11/Red-DiscordBot#5836
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type of feature request
API functionality, Other
Description of the feature you're suggesting
The suggestion here implies the cogs
info.jsonand Red's index.The idea is to add a new key called for example
is_dpy_2_readyto indicate that the bot has been updated for discord.py 2.0.The values takes a bool, each of them representing the following:
true: The cog is ready for being usable after Red upgrades discord.py to2.0.false: The cog is NOT ready for being usable with Red after it upgrades to discord.py2.0.Not a boolean or not present: The status is unknown, cog should work but breakage should be expected by users.
str: The cog is NOT ready for being usable with Red and the contained value should be shown to users.This new key would be available in the Red's Index.
If possible, this change should be ported too to the Twentysix's
indexcog to help users.When installing (or even better, when loading) a cog, Red could indicate that the cog is not/may not be ready for discord.py 2.0 if the cog fails to load AND/OR the value of the key is
Falseor not specified.Anything else?
If accepted, this suggestion should be implemented for when Red will upgrade discord.py, else there's no real point in this suggestion after then.
I am willing to create a PR for this issue.
If anyone else is interested in taking this issue, however, feel free to leave a comment.
Why can't we use the already existing min and max bot version keys for this?
Since those aren't currently enforced we might want to add a [p]load implementation that respects the values of these keys.
I don't think we should be adding more attributes to the info.json if we can already represent the desired functionality with existing attributes.
If the approach to use existing keys is taken, I think there should be standardisation regarding how to set a max version. Should 3.5 compatibility be
3.5.99,3.6.0.dev0, or maybe something like just3.5allowing for all 3.5 releases. I think this standadisation is especially important if this key will be incorperated with an automated 3.5 (and 3.6 etc?) compatibility flag.As of today, we can. I just think their use in this context is poor.
These keys are, in my sense, more interesting to use when it is about Red's APIs itself only (Config, Bank, and so on). The difference here being that it's about Red's dependency, and not its APIs in any sense.
This key stay vague, and I think that we need more clearance here.
Looking back of when some users asked about "Have you guys heard of slash commands?", I expect quite the same and some of the same kind to actually come and say "Do you guys know if X cog support d.py? It doesn't damn load!", this is where this key can be very useful IMO.
Also, I'm personally making this suggestion most especially for Red's Index as to indicate to users which cogs are ready and which are not.
They strongly are, but in
[p]cog install/update/.... I guess that's what you meant? :pAren't they are already? (By the look of https://github.com/Cog-Creators/Red-DiscordBot/blob/V3/develop/schema/red_cog.schema.json#L30-L39)
On another note, @jack1142 suggested adding a command to the downloader cog to "check all of their installed cogs to know if they already have an update that makes them work with 3.5."1.
I think it's important to add it here, but this might require a different issue to be opened.
https://discord.com/channels/133049272517001216/718148684629540905/946374021329584148 ↩︎
Then rather than a key specific to this update that would only be used one time, would you consider a
min/max_dpy_versionkey something to satisfy this request?I do agree with the idea to pass a partial update number to state "all micro updates of this version" (like passing
3.5). While right now you can do3.6.0.dev0for the same behavior (since the first patch is almost always something trivial like the version bump) it is somewhat bad UX for a cog dev, and hard to know that's what to do. If this key (and the othermin/maxs) supported that functionality, I think that would be an OK solution to this problem.If the above key(s) are used, I'd be more inclined to agree with the previously discussed solution of unloading all of a user's cogs the first time they launch 3.5 (through the same system that
--no-cogsuses, which doesn't remove them from the list of previously loaded cogs?), and messaging owners that they should probably run[p]cog updateand restart the bot. That way they would get the same notice that some cogs do not support the new bot version without adding a new command which is also one time use for 3.5.The other option I would agree with more is to enforce
info.jsonversions in the loading code, but I personally don't like that option since it makes it borderline impossible to override a cog creator's claimedinfo.jsonversions in cases where you know it works (or works well enough) on a version not covered by the guarantees.