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

Duplicate plugin entries #1334

Open
manasaV3 opened this issue Jan 14, 2025 · 0 comments · May be fixed by #1335
Open

Duplicate plugin entries #1334

manasaV3 opened this issue Jan 14, 2025 · 0 comments · May be fixed by #1335

Comments

@manasaV3
Copy link
Collaborator

Description

On running the plugin update process workflow, we found 499 public plugins (i.e., plugins that are neither hidden nor blocked) on the hub. This was unexpected, as PyPI lists only 496 plugins in total, and the npe2api lists 483.

The reason for this discrepancy is due to duplicate entries for some plugins in the Napari Hub. For example, the plugin anchor-droplet-chip appears twice: once as anchor-droplet-chip and once as anchor_droplet_chip, even though both refer to the same name and version of the plugin.

Why is this happening?

The issue arises from how plugin data is retrieved and processed. The workflow fetches plugin list from the npe2 API, where the plugin anchor_droplet_chip is listed with underscores. However, we also have an old entry for anchor-droplet-chip from when PyPI was used as the data source. This older entry should have been marked as stale, since it doesn’t match the entry from npe2api (the new source of truth for the latest plugin version).

To prevent problems caused by intermittent issues with PyPI returning empty lists (which led to the deletion of all plugins on the hub multiple times), we added an extra check before removing any plugin. This check ensures that a plugin is only removed if it is not considered as active by npe2api. (ref: https://github.com/napari/npe2api/blob/main/public/classifiers.json)

However, the issue is that the list we use for this check contains entries with hyphenated names, like pypi (eg. anchor-droplet-chip), and not the underscored versions (e.g., anchor_droplet_chip). As a result, the duplicate entry with underscores is skipped for deletion, and continues to be retained.

TLDR: The difference in how certain plugins are named in different parts of the npe2api is resulting in duplicate entries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant