-
Notifications
You must be signed in to change notification settings - Fork 213
feat(quickstart): dynamic version of rhdh in documentation links #4017
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
base: main
Are you sure you want to change the base?
feat(quickstart): dynamic version of rhdh in documentation links #4017
Conversation
Signed-off-by: its-mitesh-kumar <itsmiteshkumar98@gmail.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR TypeEnhancement Description
|
| Relevant files | |||||
|---|---|---|---|---|---|
| Enhancement |
| ||||
| Tests |
|
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||||
|
The image is available at: /test e2e-ocp-helm |
|
@its-mitesh-kumar: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
| -e "s/(\"Last Commit\": \"(.+)\")/\1, \"Build Time\": \"$now\"/" && \ | ||
| cat packages/app/src/build-metadata.json; echo | ||
|
|
||
| # Replace ${RHDH_DOCS_VERSION:-latest} placeholder with actual version (major.minor) from package.json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if doing this in docker/Dockerfile should do the same in .rhdh/docker/Dockerfile too... but there we have metadata which defines the version of RHDH. Why do you need a different version here for the DOCS of the RHDH version? Surely they're the same since the docs use the same value in https://github.com/redhat-developer/red-hat-developers-documentation-rhdh/blob/main/artifacts/attributes.adoc#L16 ?
| await uiHelper.verifyButtonURL( | ||
| "Learn more", | ||
| "https://docs.redhat.com/en/documentation/red_hat_developer_hub/latest/html/integrating_red_hat_developer_hub_with_github/", | ||
| "docs.redhat.com/en/documentation/red_hat_developer_hub/", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why remove the https:// and the suffix to the actual page?
nickboldt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changes to DPDY will be overwritten by the downstream plugin-catalog repo processes and the GH action https://github.com/redhat-developer/rhdh/actions/workflows/update-dynamic-plugins-default.yaml
Updating the docker/Dockerfile without also updating the .rhdh/docker/Dockerfile is a bad idea.
| link: https://docs.redhat.com/en/documentation/red_hat_developer_hub/${RHDH_DOCS_VERSION}/html/integrating_red_hat_developer_hub_with_github/ | ||
| - title: Manage plugins | ||
| titleKey: steps.managePlugins.title | ||
| icon: Plugins |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The DPDY file (dynamic-plugins.default.yaml) file is generated downstream in the https://gitlab.cee.redhat.com/rhidp/rhdh-plugin-catalog/-/blob/rhdh-1-rhel-9/build/scripts/generateDynamicPluginsDefaultYaml.py
If you would like to embed a version, we can do it there.



Summary
This PR updates the quickstart plugin documentation links to dynamically use the current RHDH version instead of hardcoded
/latest.Problem
Documentation links in the quickstart plugin currently point to
/latest, which always redirects to the newest version. Users running older RHDH versions (e.g., 1.6, 1.7) see documentation that may not match their installed version.Solution
Replace
/latestwith${RHDH_DOCS_VERSION:-latest}placeholder in:dynamic-plugins.default.yaml(lines 507, 527)app-config.yaml(line 58)Add build-time substitution in
docker/Dockerfilethat extracts the major.minor version frompackage.jsonand replaces the placeholderUpdate e2e tests to validate URLs with regex pattern matching both
/latestand versioned paths (e.g.,/1.9/)How It Works
yarn dev)latest(fallback)1.9)Which issue(s) does this PR fix
PR acceptance criteria
Please make sure that the following steps are complete:
How to test changes / Special notes to the reviewer