Skip to content

Conversation

@arugupta1992
Copy link
Collaborator

Testing Notes:
This includes restructuring of code that impacts chunking of files in acrobat. Validate the acrobat workflow with large files, validate the analytics with the current prod.
Also perform sanity for other products upload workflow

Resolves: MWPW-181921

Test URLs:

@aem-code-sync
Copy link

aem-code-sync bot commented Dec 19, 2025

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
In case there are problems, just click a checkbox below to rerun the respective action.

  • Re-run PSI checks
  • Re-sync branch
Commits

async batchUpload(tasks, batchSize) {
await this.executeInBatches(tasks, batchSize, async (task) => { await task(); });
async uploadChunkToStorage(urlString, chunk, fileType, assetId, signal, chunkNumber, chunkContext) {
const putOpts = {
Copy link
Collaborator

Choose a reason for hiding this comment

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

use getApiCallOptions


try {
const result = await uploadFunction(urlString, chunk, fileType, assetData.assetId, signal, chunkNumber);
const result = await uploadFunction(urlString, chunk, fileType, assetId, signal, chunkNumber, chunkContext);
Copy link
Collaborator

Choose a reason for hiding this comment

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

chunk, fileType, assetId, chunkNumber are already inside chunkContext, no need to send them separately.

}

async processUploadedAssets(uploadedAssets) {
const { executeInBatches } = await import(`${getUnityLibs()}/utils/chunkingUtils.js`);
Copy link
Collaborator

Choose a reason for hiding this comment

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

can have something like this:
async _getChunkingUtils() {
if (!this._chunkingUtilsPromise) {
this._chunkingUtilsPromise = import(${getUnityLibs()}/utils/chunkingUtils.js);
}
return this._chunkingUtilsPromise;
}

// usage
const { executeInBatches } = await this._getChunkingUtils();

return Math.min(baseProgress + chunkProgress, 100);
}

export function createChunkUploadErrorMessage(assetId, fileSize, fileType, failedChunkCount) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

is this method needed?

};
}

export const DEFAULT_CHUNK_CONFIG = {
Copy link
Collaborator

Choose a reason for hiding this comment

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

this is not being used anywhere.

Copy link
Collaborator

Choose a reason for hiding this comment

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

agreed, we can probably remove this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants