[V3 Downloader] Missing repos from repo list #1950
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#1950
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
[p]repo list
What cog is this command from?
Downloader
What were you expecting to happen?
For Red to reliably show installed repos every time.
What actually happened?
Some users are reporting that they have installed repos and after this issue occurs, using [p]repo list will return a blank list with just the "Installed Repos:" header. Going into the RepoManager folder in the bot's data path shows all of the previously-installed repo folders. This is not a holdover issue from the downloader changes in roughly beta 13 as this can occur with new instances. The cause is a corrupted info.json and the subsequent UnicodeDecodeError that stops RepoManager._load_repos() from executing on startup. However, I'm not sure how these info.json files change encoding type over time. Opening the info.json from the affected repo folder did not show any obvious file changes plain text-wise (looked at it with nano).
How can we reproduce this issue?
Unfortunately, even with asking users specific questions in support and even having this issue occur on one of my own bots I am unable to find why this happens. Attached is the traceback from the affected bot on startup:
I'm gonna self-assign this as it's an issue I'm somehow able to reproduce, although I'm not entirely sure of the conditions. I'll investigate.
OK, here's what I've found:
reposdirectory, but it did not create an entry in RepoManager's settings.json. The sub-directory was also empty (not a git repository)I think it's likely
_load_reposis exiting early at the first sight of an exception. This should not be occurring and instead it should only fail on the repo causing the exception, and continue to load all other repos. We can also look at preventing these types of exceptions, since obviously the one described above is another bug.Resolved by #2121.