-
Notifications
You must be signed in to change notification settings - Fork 3k
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: Allow specifying Data Product URN via UI #9386
feat: Allow specifying Data Product URN via UI #9386
Conversation
f085b46
to
3c0c228
Compare
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.
things are looking good! only real request is to add a check on the graphql side that this data product doesn't already exist like we do for domains
metadata-service/services/src/main/java/com/linkedin/metadata/service/DataProductService.java
Show resolved
Hide resolved
@@ -47,6 +73,37 @@ export default function DataProductBuilderForm({ builderState, updateBuilderStat | |||
<Form.Item label={<Typography.Text strong>Description</Typography.Text>}> | |||
<StyledEditor doNotFocus content={builderState.description} onChange={updateDescription} /> | |||
</Form.Item> | |||
<Collapse ghost> |
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.
minor: this seems like a good chunk of code to break into its own component! just trying to keep react components tighter in general.
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.
created new component for Data Product Id and PR update
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.
nice!
...src/main/java/com/linkedin/datahub/graphql/exception/DataHubDataFetcherExceptionHandler.java
Outdated
Show resolved
Hide resolved
@@ -11054,6 +11054,10 @@ input CreateDataProductInput { | |||
The primary key of the Domain | |||
""" | |||
domainUrn: String! | |||
""" | |||
An id for the DataProduct |
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.
nitpick: let's say
"An optional id for the new data product"
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.
Done
""" | ||
An id for the DataProduct | ||
""" | ||
id : String |
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.
please remove space between id and :
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.
Done
@@ -32,6 +32,7 @@ export default function CreateDataProductModal({ domain, onCreateDataProduct, on | |||
variables: { | |||
input: { | |||
domainUrn: domain.urn, | |||
id: builderState.id || '', |
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.
not || ''
this will cause an empty string id to be created.
let's just say builderState.id.
Undefined | null should be provided if an id is not
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.
Done
color: #373d44; | ||
`; | ||
|
||
export function DataProductAdvanceOption({builderState, updateBuilderState }:DataProductBuilderFormProps){ |
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.
naming nitpick:
Let's call this DataProductAdvancedOption
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.
Done
color: #373d44; | ||
`; | ||
|
||
export function DataProductAdvanceOption({builderState, updateBuilderState }:DataProductBuilderFormProps){ |
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.
lint fix: add a space between : and DataProductBuilderFormProps.
Please always pay attention to the small details!
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.
Done
data-testid="data-product-id" | ||
placeholder="engineering" | ||
value={builderState.id} | ||
onChange={(e) => updateDataProductId(e.target.value)} |
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.
overall, nice component!
throw new IllegalArgumentException("This Data product already exists!"); | ||
} | ||
} catch (RemoteInvocationException e) { | ||
throw new RuntimeException("Unable to check for existence of Data Product!"); |
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.
let's include the underlying context in this exception:
throw new RuntimeException("Unable to check for existence of Data Product!", e)
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.
Left a few comments - overall this is looking great!
I have resolved all comments |
Co-authored-by: Aseem Bansal <[email protected]>
Checklist