Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[V3 CogManager] Paths issues #2330

Closed
aikaterna opened this issue Dec 13, 2018 · 2 comments
Closed

[V3 CogManager] Paths issues #2330

aikaterna opened this issue Dec 13, 2018 · 2 comments
Assignees
Labels
Type: Bug Unexpected behavior, result, or exception. In case of PRs, it is a fix for the foregoing.
Milestone

Comments

@aikaterna
Copy link
Member

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

self.cog_mgr = CogManager(paths=(str(self.main_dir / "cogs"),))
and having a v2 install on the cwd path.

@Tobotimus Tobotimus added Type: Bug Unexpected behavior, result, or exception. In case of PRs, it is a fix for the foregoing. V3 Status: Accepted We want this labels Dec 21, 2018
@Tobotimus Tobotimus self-assigned this Dec 21, 2018
@Tobotimus Tobotimus added this to the RC3 milestone Dec 21, 2018
@Tobotimus
Copy link
Member

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 Tobotimus added Status: In Progress There's a PR open to deal with this, or an org member is working on this internally and removed Status: Accepted We want this labels Dec 22, 2018
@Tobotimus Tobotimus removed the Status: In Progress There's a PR open to deal with this, or an org member is working on this internally label Jan 6, 2019
@Tobotimus
Copy link
Member

Resolved by #2345.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Unexpected behavior, result, or exception. In case of PRs, it is a fix for the foregoing.
Projects
None yet
Development

No branches or pull requests

2 participants