feat(extensions): add source metadata to entities#3944
feat(extensions): add source metadata to entities#3944christoph-jerolimov wants to merge 12 commits into
Conversation
Signed-off-by: Hope Hadfield <hhadfiel@redhat.com>
Signed-off-by: Hope Hadfield <hhadfiel@redhat.com>
Signed-off-by: Hope Hadfield <hhadfiel@redhat.com>
Signed-off-by: Hope Hadfield <hhadfiel@redhat.com>
Signed-off-by: Hope Hadfield <hhadfiel@redhat.com>
Signed-off-by: Hope Hadfield <hhadfiel@redhat.com>
…ing extensions Signed-off-by: Christoph Jerolimov <jerolimov+git@redhat.com>
Signed-off-by: Christoph Jerolimov <jerolimov+git@redhat.com>
Signed-off-by: Christoph Jerolimov <jerolimov+git@redhat.com>
…w catalog-source annotation gots automatically added Signed-off-by: Christoph Jerolimov <jerolimov+git@redhat.com>
…in playwright on that message Signed-off-by: Christoph Jerolimov <jerolimov+git@redhat.com>
|
Important This PR includes changes that affect public-facing API. Please ensure you are adding/updating documentation for new features or behavior. Changed Packages
|
PR Summary by QodoAdd derived catalog-source annotation to extension entities
AI Description
Diagram
High-Level Assessment
Files changed (45)
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #3944 +/- ##
=======================================
Coverage 57.35% 57.35%
=======================================
Files 2384 2384
Lines 95608 95617 +9
Branches 26699 26708 +9
=======================================
+ Hits 54832 54841 +9
Misses 39238 39238
Partials 1538 1538
*This pull request uses carry forward flags. Click here to find out more. Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
Code Review by Qodo
Context used✅ Compliance rules (platform):
11 rules✅ Cross-repo context Explored:
repo: redhat-developer/rhdh (sha: d090bd1a) Explored:
repo: redhat-developer/rhdh-operator (sha: cde4968e) Explored:
repo: redhat-developer/rhdh-local (sha: 2ae9e8c8) Not relevant to this PR:
redhat-developer/rhdh-chart 1. webServer missing backend url
|
…L parse error Signed-off-by: Hope Hadfield <hhadfiel@redhat.com>
dfca187 to
45748ce
Compare
|



This is a copy of #3711 where GitHub didn't updated the PR and now didn't let me reopen it because I force pushed the last 4 commits into your @hopehadfield branch. Normally this works fine. So here is a follow-up. You're work lgtm, Hope. -- I changes some configurations and moved the plugins yamls so that they are picked up now in the included Backstage app by the catalog-extensions-module.
From the origin PR:
Hey, I just made a Pull Request!
Resolves RHIDP-13665 / Epic RHIDP-13606
Problem
When RHDH is configured with multiple catalog index images (
CATALOG_INDEX_IMAGE+EXTRA_CATALOG_INDEX_IMAGES), theinstall-dynamic-pluginsinit container extracts entities from each image into separate directories. However, onceBaseEntityProvideringests them into the Backstage catalog, all source information is lost with the current implementation.Solution
Add an
extensions.backstage.io/catalog-sourceannotation that is automatically derived from the on-disk directory layout and set on every entity emitted byBaseEntityProvider.The derivation logic:
extra/<name>/catalog-entities/…getcatalog-source: "<name>"(matching the name fromEXTRA_CATALOG_INDEX_IMAGES)catalog-source: "primary"Changes
extensions-common/src/annotations.tsCATALOG_SOURCEtoExtensionsAnnotationenumcatalog-backend-module-extensions/src/providers/BaseEntityProvider.tsderiveCatalogSource()static method; updateaddProviderAnnotations()to set the annotation using the entity's file pathcatalog-backend-module-extensions/src/providers/BaseEntityProvider.test.tsdocs/catalog/plugins.mdcatalog-backend-module-extensions/README.mdHow to test
Unit tests:
Local dev (manual):
extensions.directoryinapp-config.yamlto point at itDesign decisions
"primary"as default. Vendor-neutral. The UI/config layer can map it to a display label as desired.EXTRA_CATALOG_INDEX_IMAGES(community=quay.io/...).BaseEntityProvider, so Plugins, Packages, and Collections all get the annotation.✔️ Checklist