Fixes #27130: Stored procedure version view shows empty Code tab#27531
Open
hyspacex wants to merge 1 commit intoopen-metadata:mainfrom
Open
Fixes #27130: Stored procedure version view shows empty Code tab#27531hyspacex wants to merge 1 commit intoopen-metadata:mainfrom
hyspacex wants to merge 1 commit intoopen-metadata:mainfrom
Conversation
Contributor
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
Code Review ✅ ApprovedUpdates the stored procedure version view to correctly populate the Code tab. No issues found. OptionsDisplay: compact → Showing less information. Comment with these commands to change:
Was this helpful? React with 👍 / 👎 | Gitar |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe your changes:
Fixes #27130
On the stored procedure version view (
/storedProcedure/<fqn>/versions/<version>), the Code tab rendered only the description with no code block, while the current (non-version) details page showed the stored procedure code correctly. This made historical versions appear to have lost their DDL.The version tab didn't render any code component — it only had
DescriptionV1. The fix adds the existingStoredProcedureCodeCard(already used inStoredProceduresUtils.tsxfor the main details page) into the version tab's layout. It reads the code viauseGenericContext<StoredProcedure>(), which is already populated with the version'scurrentVersionDataby the surroundingGenericProvider, so historical versions resolve their ownstoredProcedureCodecorrectly.How it was tested
storedProcedureCodeto bump to v0.2, then opened/versions/0.1and/versions/0.2— each version now renders its own historical code (v0.1 shows the original DDL, v0.2 shows the updated DDL).storedProcedureCodematches the realStoredProcedureCodeObjectshape.Type of change:
Checklist:
Fixes <issue-number>: <short explanation>