Skip to content

[IGNORE] simplify logic and refactor url pattern#134

Merged
shahrokni merged 1 commit into
feat/plugin_versioning_frontfrom
versioned-plugins-load
May 13, 2026
Merged

[IGNORE] simplify logic and refactor url pattern#134
shahrokni merged 1 commit into
feat/plugin_versioning_frontfrom
versioned-plugins-load

Conversation

@jgbernalp
Copy link
Copy Markdown
Contributor

Description

refactor to simplify the logic and use a different pattern to make it easy in the backend to parse by differentiate between files using a ~ separator

Backend counterpart: perses/perses#4064

Signed-off-by: Gabriel Bernal <gbernal@redhat.com>
@jgbernalp jgbernalp requested a review from shahrokni May 12, 2026 20:45
@jgbernalp jgbernalp requested a review from a team as a code owner May 12, 2026 20:45
Comment on lines -66 to +60
if (!kind || !name || !version) {
console.warn(`An invalid Plugin Resource key detected during default plugin lookup: ${np}`);
const [, , reg, ver] = split;
if (!ver) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we be precautions here?
A compound of key consists of 4 parts from which 3 parts are mandatory based on the definition and the interface. Kind, name, and version. We could be more strict and check the other two (kind and name) as well. Just to make sure the built up compound key has all the essential parts. No?

@shahrokni shahrokni merged commit a78cd3f into feat/plugin_versioning_front May 13, 2026
12 checks passed
@shahrokni shahrokni deleted the versioned-plugins-load branch May 13, 2026 08:42
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 this pull request may close these issues.

2 participants