[V3 CogManager] Paths issues #2330

Closed
opened 2018-12-13 21:07:51 +01:00 by aikaterna · 2 comments
aikaterna commented 2018-12-13 21:07:51 +01:00 (Migrated from github.com)

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:

Install Path: /home/user/.local/share/Red-DiscordBot/cogs/CogManager/cogs
Core Path: /usr/lib/python3.7/site-packages/redbot/cogs

1. /home/user/Red-DiscordBot/cogs

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:

Install Path: /app/cogs/CogManager/cogs
Core Path: /app/.heroku/python/lib/python3.6/site-packages/redbot/cogs

1. /app/cogs

An RC2 bot on Ubuntu 18.04:

Install Path: /root/.local/share/Red-DiscordBot/cogs/CogManager/cogs
Core Path: /usr/local/lib/python3.6/dist-packages/redbot/cogs

1. /root/cogs

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.

# 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: ``` Install Path: /home/user/.local/share/Red-DiscordBot/cogs/CogManager/cogs Core Path: /usr/lib/python3.7/site-packages/redbot/cogs 1. /home/user/Red-DiscordBot/cogs ``` 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: ``` Install Path: /app/cogs/CogManager/cogs Core Path: /app/.heroku/python/lib/python3.6/site-packages/redbot/cogs 1. /app/cogs ``` An RC2 bot on Ubuntu 18.04: ``` Install Path: /root/.local/share/Red-DiscordBot/cogs/CogManager/cogs Core Path: /usr/local/lib/python3.6/dist-packages/redbot/cogs 1. /root/cogs ``` 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.
Tobotimus commented 2018-12-22 00:33:09 +01:00 (Migrated from github.com)

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.

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.
Tobotimus commented 2019-01-06 02:46:35 +01:00 (Migrated from github.com)

Resolved by #2345.

Resolved by #2345.
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
1 participant
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#2330
No description provided.