feat(app-defaults): Add Learning Paths plugin - #4814
Conversation
|
Important This PR includes changes that affect public-facing API. Please ensure you are adding/updating documentation for new features or behavior. Unexpected ChangesetsThe following changeset(s) reference packages that have not been changed in this PR:
Note that only changes that affect the published package require changesets, for example changes to tests and storybook stories do not require changesets. Changed Packages
|
ad937a4 to
288a43b
Compare
46e38da to
d671ddc
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #4814 +/- ##
==========================================
+ Coverage 63.60% 63.62% +0.02%
==========================================
Files 2685 2693 +8
Lines 107077 107215 +138
Branches 30010 30041 +31
==========================================
+ Hits 68101 68216 +115
- Misses 37165 37188 +23
Partials 1811 1811
*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:
|
9fbe906 to
0415191
Compare
lokanandaprabhu
left a comment
There was a problem hiding this comment.
Legacy behavior In legacy RHDH (packages/app), when the Developer Hub proxy call failed, the app fell back to a runtime fetch:
- GET /learning-paths/data.json
- Source file: packages/app/public/learning-paths/data.json
That meant operators could customize fallback content without rebuilding the frontend (e.g. by mounting/replacing the JSON via ConfigMap, volume, or image layer), even if they didn’t use the proxy.
NFS behavior in this PR When the proxy fails, the hook now uses build-time bundled data:
- src/learning-paths/data/data.json (imported into the bundle)
- No runtime request to /learning-paths/data.json
Proxy-based customization is unchanged and still the documented path:
proxy:
endpoints:
'/developer-hub':
target: ...
pathRewrite:
'^/api/proxy/developer-hub/learning-paths': '...'
Do we have any existing deployments/customers that customize Learning Paths by replacing packages/app/public/learning-paths/data.json without configuring the /developer-hub proxy?
If yes:
- Should we document an explicit migration note (README/changelog) directing them to proxy pathRewrite?
- Is proxy-only customization the intended long-term approach for NFS, or do we need a runtime-overridable fallback equivalent?
If no:
- A short README note may still help future adopters avoid assuming /learning-paths/data.json is still overridable at runtime.
Legacy RHDH (packages/app) did load fallback data at runtime via GET |
74e2759 to
939de6c
Compare
HusneShabbir
left a comment
There was a problem hiding this comment.
/lgtm
Tested locally, works as expected
|
/hold |
Signed-off-by: Debsmita Santra <debsmita.santra@gmail.com>
939de6c to
febf9d0
Compare
|
New changes are detected. LGTM label has been removed. |
|
Once the CI is green , we can merge it. The overlay image can be tested on a cluster @teknaS47 |
|





Hey, I just made a Pull Request!
Resolves:
https://redhat.atlassian.net/browse/RHIDP-16847
Test setup:
Publish a
data.jsonon GitHub with unique card labels (e.g. https://github.com/debsmita1/rhdh/blob/learning-paths-test/packages/app/public/learning-paths/data.json ) so proxy-loaded content is visually distinct from the bundled fallback atpackages/app/public/learning-paths/data.json.app-config.yaml
Point the
/developer-hubproxy at the raw GitHub file:Screenshots:
rhdh-plugins
With proxy configured → cards show proxy labels; network shows /api/proxy/developer-hub/learning-paths → 200
rhdh-local
rhdh-plugins
With proxy disabled/broken → console warns about fallback; network shows /learning-paths/data.json; cards show bundled content.
rhdh-local
Tests:
✔️ Checklist