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

[Potential Bug] Plugin ID generated in plugins.json is not using the 'id' field (and instead the name of the file) #652

Open
cp2004 opened this issue Oct 7, 2020 · 1 comment

Comments

@cp2004
Copy link
Member

cp2004 commented Oct 7, 2020

Problem

Seems that the file plugins.json is grabbing its plugin ID from the name of the file under _plugins/, rather than the id: field in the data at the top of the file. If this is intended, it should be documented and the id field removed.

This causes a problem with:

  • the built in backup & restore
  • Upgrade to Python 3

since they look to compare the internal ID with the repository, and don't find a match.

Example

https://plugins.octoprint.org/plugins/DiscordRemote/

The internal ID is discordremote, which is in the file _plugins/DiscordRemote.md correctly - however, in the plugins.json file, the ID is wrong

Linking cameroncros/OctoPrint-DiscordRemote#141, and first noticed with Kragrathea/OctoPrint-PrettyGCode#68 (comment)

One issue with changing it

Might need to check that no plugins are adversely affected (ie. wrong ID inside the file, but filename is right), but this is probably not a problem since it says that the ID should be correct

@foosel
Copy link
Member

foosel commented Jun 20, 2022

Additional thoughts from a Discord discussion a while back:

We can only check stuff on GitHub easily, but we already do some things there that looks at the plugin metadata, so we could probably easily add a "is the id fully identical" thing and first step flag anything that's currently NOT

then fix this in the repo across the board, then add it as mandatory pr check step for the future

long term it should probably be somehow switched to be case insensitive

but again, still no idea what that could break

(had this in my Todoist backlog and am adding it here now that I'm creating a public one on GitHub Projects)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
Development

No branches or pull requests

3 participants