[V3 CogManager] Paths issues #2330
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 project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Mrcoolgamer11/Red-DiscordBot#2330
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?
Command bugs
Command name
This affects [p]paths and [p]removepath, and loading v3 core cogs when there is a v2 install on the same machine/vps
What cog is this command from?
CogManagerUI
What were you expecting to happen?
For removepath to be able to remove a path, also for a brand new install to have only the Install Path and the Core Path listed
What actually happened?
2 users in support and a few of my RC2 bots show an additional path listed that were not added at instance creation or later. For example:
While there is a v2 install located at
/home/user/Red-DiscordBot/, this location was not added by the user and on a new instance creation, this path was still added to the paths list automatically. If the user tries to use [p]removepath with this location in no. 1, it will say the path is removed but it never is removed from the [p]paths list.This error makes the bot try to load v2 cogs for default v3 cogs, resulting in a traceback.
A RC2 bot on Heroku:
An RC2 bot on Ubuntu 18.04:
Strangely another instance that shares that vps/Red v3 install with that previous bot, does not have an additional path listed in 1.
How can we reproduce this issue?
I am not quite sure what makes this occur. Might be related to us grabbing the cwd in https://github.com/Cog-Creators/Red-DiscordBot/blob/3b50ed819212ac77a517a24c0138c801031b1a61/redbot/core/bot.py#L114 and having a v2 install on the cwd path.
Yeah, by default (and I believe persistently) the cog manager includes
CWD/cogs, which most often turns out to be$HOME/cogs. I'm in favour of entirely removing this, given that it is never documented, creates odd behaviour in the cog manager, and I'm guessing was put in place initially for debugging reasons.Resolved by #2345.