Skip to content
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

Merged
merged 14 commits into from
Dec 13, 2023

Conversation

Salman-Apptware
Copy link
Contributor

Checklist

@github-actions github-actions bot added the product PR or Issue related to the DataHub UI/UX label Dec 5, 2023
@anshbansal anshbansal marked this pull request as draft December 5, 2023 14:25
@Salman-Apptware
Copy link
Contributor Author

Screenshot from 2023-12-05 19-59-31

@anshbansal anshbansal marked this pull request as ready for review December 7, 2023 10:09
Copy link
Collaborator

@chriscollins3456 chriscollins3456 left a 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

@@ -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>
Copy link
Collaborator

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.

Copy link
Contributor Author

@Salman-Apptware Salman-Apptware Dec 8, 2023

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

Copy link
Collaborator

@chriscollins3456 chriscollins3456 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

@@ -11054,6 +11054,10 @@ input CreateDataProductInput {
The primary key of the Domain
"""
domainUrn: String!
"""
An id for the DataProduct
Copy link
Collaborator

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"

Copy link
Contributor Author

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
Copy link
Collaborator

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 :

Copy link
Contributor Author

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 || '',
Copy link
Collaborator

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

Copy link
Contributor Author

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){
Copy link
Collaborator

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

Copy link
Contributor Author

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){
Copy link
Collaborator

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!

Copy link
Contributor Author

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)}
Copy link
Collaborator

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!");
Copy link
Collaborator

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)

Copy link
Collaborator

@jjoyce0510 jjoyce0510 left a 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!

@Salman-Apptware
Copy link
Contributor Author

Left a few comments - overall this is looking great!

I have resolved all comments

@anshbansal anshbansal merged commit eb8cbd8 into datahub-project:master Dec 13, 2023
36 of 37 checks passed
Salman-Apptware added a commit to Salman-Apptware/datahub that referenced this pull request Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product PR or Issue related to the DataHub UI/UX
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants