[V3 Downloader] Update repo without cogs, update single cog #2527
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#2527
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?
Feature request
Select the type of feature you are requesting:
Cog
Command
API functionality
Describe your requested feature
I would want to see
[p]repo updatecommand which would update repo without updating any cog. This could be useful when new cog is released in repo and you would want to install it without updating other cogs.From what I've seen to make this change without breaking
[p]cog updateit would be required to know status of the installed cogs (if they are up-to-date) as currently updating cog is based on checking if the repo is up-to-date and if it isn't downloader updates all cogs from that repo.Once we know the status of the installed cogs, it probably wouldn't be hard to add functionality to update individual cogs without updating other from the repo, so I thought I add this to the issue as well.
Both of these features already exist with V3.
Update repos without updating cogs:
Simply use
[p]cog updateand when it asks you if you want to reload, react with ❎.Update only specified cog
[p]cog update [cog_name]But in reality cogs are updated and just not reloaded, which means that in next reload or restart of a bot, new version will be used, so it doesn't work as I suggested above.
This doesn't update one cog, it updates every cog from the repo this cog is in.
I'd love to see this as part of the core behavior, including pinning cogs to specific versions, but it's not here right now. The underlying behavior of this is also why when an author updates a single cog, every installed and loaded cog shows as updated.
Yeah, pinning cogs would go well with these changes too, true. I was wondering, how it should be handled, to make those changes possible. Everything should probably be based on commit ids as by this we could:
git diff, which might not be good performance-wise though, there's alsogit diff-index, which should faster option, but I'm not git expert, so there might still be some better option)Commit ids for each cog should be kept in conf's
installedvariable as we will need to operate on it in some of those functionalities.I'm interested in helping with this, I'm not sure, if I'll be able to write all of this on my own, but I surely wanted to write my ideas on what could be implemented as it might be useful for someone else too.
And if someone thinks that something from what I said should be handled differently, it would be better to know that too :D