Skip to content

Conversation

v-tarasevich-blitz-brain
Copy link
Contributor

@v-tarasevich-blitz-brain v-tarasevich-blitz-brain commented Oct 7, 2025

This PR includes:

  • Brings S3Utils from Saas to OSS
  • Adds additional method in S3Util to generate presigned upload url
  • Adds endpoint to get presigned upload url

@github-actions github-actions bot added product PR or Issue related to the DataHub UI/UX devops PR or Issue related to DataHub backend & deployment labels Oct 7, 2025
@v-tarasevich-blitz-brain v-tarasevich-blitz-brain force-pushed the vt--ch-820-upload-files--add-upload-method branch from 3d2e071 to 629229b Compare October 9, 2025 13:01
Copy link

codecov bot commented Oct 9, 2025

Bundle Report

Changes will increase total bundle size by 38 bytes (0.0%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
datahub-react-web-esm 28.59MB 38 bytes (0.0%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: datahub-react-web-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/index-*.js 38 bytes 18.93MB 0.0%

Copy link

codecov bot commented Oct 9, 2025

Comment on lines +33 to +36
new HashSet<>(
Arrays.asList(
"pdf", "jpeg", "jpg", "png", "pptx", "docx", "xls", "xml", "ppt", "gif", "xlsx",
"bmp", "doc", "rtf", "gz", "zip", "mp4", "mp3", "wmv", "tiff", "txt", "md", "csv"));
Copy link
Collaborator

Choose a reason for hiding this comment

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

comma separated config in application.yaml would make it easier to change this for anyone

Copy link
Contributor Author

@v-tarasevich-blitz-brain v-tarasevich-blitz-brain Oct 13, 2025

Choose a reason for hiding this comment

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

@v-tarasevich-blitz-brain v-tarasevich-blitz-brain marked this pull request as ready for review October 13, 2025 17:13
@datahub-cyborg datahub-cyborg bot added the needs-review Label for PRs that need review from a maintainer. label Oct 13, 2025
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.

awesome stuff so far

Comment on lines +121 to +125
if (scenario == UploadDownloadScenario.ASSET_DOCUMENTATION) {
return String.format("%s/product-assets/%s", bucketName, fileId);
} else {
throw new IllegalArgumentException("Unsupported upload scenario: " + scenario);
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

yeah and we'll come back to this later in order to support other scenarios like home page modules and the like.

Copy link
Collaborator

Choose a reason for hiding this comment

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

i'm not positive we need to prefix with the bucket name here, but with local stack i'm seeing that's needed. it may be something we need to update once we deploy on a real instance with a real connection to s3

ASSET_DOCUMENTATION
}

type GetPresignedUploadUrl {
Copy link
Collaborator

Choose a reason for hiding this comment

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

could rename to GetPresignedUploadUrlResponse

Comment on lines +3676 to +3688
private void configureFilesResolver(final RuntimeWiring.Builder builder) {
builder.type(
"GetPresignedUploadUrlResponse",
typeWiring ->
typeWiring
.dataFetcher(
"latestVersion",
new EntityTypeResolver(
entityTypes, (env) -> ((VersionSet) env.getSource()).getLatestVersion()))
.dataFetcher(
"versionsSearch",
new VersionsSearchResolver(this.entityClient, this.viewService)));
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

i think this isn't necessary right?

this(s3Client, entityClient, null);
}

public S3Util(
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 double check @anshbansal has reviewed this file since he was the original implementer

* @param expirationSeconds The expiration time in seconds
* @return The pre-signed URL
*/
public String generatePresignedDownloadUrl(
Copy link
Collaborator

Choose a reason for hiding this comment

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

okay nice so you brought this over from my WIP branch

Comment on lines +85 to +92
'quickstartDebugAws': [
profile: 'debug-aws',
modules: python_services_modules + backend_profile_modules + [':datahub-frontend', ':datahub-actions'],
isDebug: true,
additionalEnv: [
DATAHUB_LOCAL_ACTIONS_ENV: "${rootProject.project(':smoke-test').projectDir}/test_resources/actions/actions.env"
]
],
Copy link
Collaborator

Choose a reason for hiding this comment

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

we want to keep this right? or not? i know you added it yourself for local dev purposes obviously

Comment on lines +50 to +54
// AWS SDK for S3 file serving
implementation platform('software.amazon.awssdk:bom:2.23.6')
implementation 'software.amazon.awssdk:regions'
implementation 'software.amazon.awssdk:sts'
implementation 'software.amazon.awssdk:s3'
Copy link
Collaborator

Choose a reason for hiding this comment

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

we will want to double check with at least one platform person whether this makes sense. i believe this was added for the S2UtilsFactory and we need that factory so we can us S3Utils in our new REST endpoint that will return a redirect to a download presigned url given a file ID. that will be in another PR.

@datahub-cyborg datahub-cyborg bot added pending-submitter-response Issue/request has been reviewed but requires a response from the submitter and removed needs-review Label for PRs that need review from a maintainer. labels Oct 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

devops PR or Issue related to DataHub backend & deployment pending-submitter-response Issue/request has been reviewed but requires a response from the submitter product PR or Issue related to the DataHub UI/UX

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants