-
Notifications
You must be signed in to change notification settings - Fork 165
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
feat(user-settings): allow overriding build info in the user settings page #2564
base: main
Are you sure you want to change the base?
Conversation
The image is available at: |
/retest |
[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.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
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.
Thanks for all the tests 👍
But I thought we can simple use useConfig and make the build config visibility to the frontend. Wouldn't this easier? Wdyt?
"Backstage Version: 1.35.1", | ||
"Last Commit: repo @ 2025-01-31T14:15:06Z" | ||
] | ||
"card": { |
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.
I think this file is generated in the build process. Maybe also in the midstream repo on GitLab.
I recommend to check this with @nickboldt, or maybe you can support an object and an array to support the old format (and revert this)?
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.
There's a comment from @nickboldt here about revamping the file
I was under the impression that this file is somehow manually built
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.
it's generated in this repo, then I apply a sed
transformation downstream to spiff it up and add more build information (the up and midstream repo commits, and the build time).
# set build-metadata.json info, using upstream info: ${ROOTPATH}/sync/upstream_SHA_rhdh-hub ==> redhat-developer/rhdh main @ 2ff35695
sed -i packages/app/src/build-metadata.json -r \
-e 's|"(Last Commit: )(.+)"|"Upstream: '"$upstream_repo_hub"'", "Midstream: '"$midstream_repo_and_SHA"'", "Build Time: '"$now"'"|'
-- https://gitlab.cee.redhat.com/rhidp/rhdh/-/blob/rhdh-1-rhel-9/build/ci/sync-midstream.sh#L605-607
If you change the file format, just let me know so I can adjust the downstream sed changes. Or even better, throw me a PR to update the script above to properly adopt your changes! :D
The image is available at: |
94f5296
to
6a0d499
Compare
The image is available at: |
/test e2e-tests |
1 similar comment
/test e2e-tests |
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.
I think we're fine, on the other side, I feel that this code is so "complex" for what it does. But I'm almost fine when its merges.
The image is available at: |
The image is available at: |
The image is available at: |
Description
Which issue(s) does this PR fix
Screenshots
PR acceptance criteria
Please make sure that the following steps are complete:
How to test changes / Special notes to the reviewer
Add the following snippet in your app-config.yaml file