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

endoflife: Fixed error for products that share the same cycles #14

Merged
merged 2 commits into from
Apr 6, 2024

Conversation

jwnmulder
Copy link

The EntityEndOfLifeCard will error when multiple products are listed that share the same cycle. As an example, adding the annotation 'endoflife.date/products': 'oracle-jdk,redhat-jboss-eap@7' will trigger that error on rendering the card.

Error log

Cannot add item: item with id 7 already exists
    at DataSet._addItem (webpack-internal:///../../node_modules/vis-timeline/standalone/esm/vis-timeline-graph2d.js:23660:15)
    at DataSet.add (webpack-internal:///../../node_modules/vis-timeline/standalone/esm/vis-timeline-graph2d.js:22979:21)
    at new DataSet (webpack-internal:///../../node_modules/vis-timeline/standalone/esm/vis-timeline-graph2d.js:22897:14)
    at Timeline.setGroups (webpack-internal:///../../node_modules/vis-timeline/standalone/esm/vis-timeline-graph2d.js:42822:46)
    at new Timeline (webpack-internal:///../../node_modules/vis-timeline/standalone/esm/vis-timeline-graph2d.js:42708:13)
    at eval (webpack-internal:///../../node_modules/@dweber019/backstage-plugin-endoflife/dist/esm/index-666b849a.esm.js:366:27)
    at eval (webpack-internal:///../../node_modules/@dweber019/backstage-plugin-endoflife/dist/esm/index-666b849a.esm.js:382:5)
    at commitHookEffectListMount (webpack-internal:///../../node_modules/react-dom/cjs/react-dom.development.js:23145:26)
    at commitPassiveMountOnFiber (webpack-internal:///../../node_modules/react-dom/cjs/react-dom.development.js:24921:13)
    at commitPassiveMountEffects_complete (webpack-internal:///../../node_modules/react-dom/cjs/react-dom.development.js:24886:9)

PR includes the fix and an accompanying test

@dweber019
Copy link
Owner

Thanks for the contribution ❤️

Please provide a changeset file see https://github.com/dweber019/backstage-plugins/blob/main/CONTRIBUTING.md#how-to-create-a-changeset

Use patch

@dweber019 dweber019 merged commit 28f6014 into dweber019:main Apr 6, 2024
@jwnmulder jwnmulder deleted the bugfix/overlapping-cycles branch April 6, 2024 18:03
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