feat(AmazonPhotos): add Videos importer - #1513
Merged
vipulkala95 merged 1 commit intoAug 21, 2026
Merged
Conversation
Add AmazonVideosImporter (VIDEOS vertical) that reuses AmazonImportHelper for per-job client creation and error classification, and wire it into AmazonTransferExtension alongside the photos importer.
Tanishq-Gupta-95
approved these changes
Aug 21, 2026
vipulkala95
added a commit
that referenced
this pull request
Sep 9, 2026
### Summary Adds support for the `MEDIA` data vertical to the Amazon Photos extension. reusing the shared import path introduced with the Photos/Videos importers (#1512, #1513). ### Changes - **`AmazonMediaImporter`** — imports `MediaContainerResource` (albums + photos + videos) into Amazon Photos, delegating album creation, download+MD5, upload, and duplicate/quota handling to the shared `AmazonImportHelper`. - **`UploadItemRequest`** — new immutable parameter object with `forPhoto`/`forVideo` factories; keeps the per-vertical field mapping in one place. `AmazonPhotosImporter` and `AmazonVideosImporter` are refactored to use it, removing duplicated upload wiring. - **`AmazonMediaTransmogrificationConfig`** — transmogrification config for the MEDIA vertical. - **`AmazonTransferExtension`** — registers the importer for `DataVertical.MEDIA`. - **`AmazonOAuthConfig`** — adds import/export scopes for the MEDIA vertical. - **`AmazonImportHelper`** — shared upload/album operations extended to serve the media importer. ### Testing - Completed transfer using the vertical successfully for both videos and photos. - New `AmazonMediaImporterTest` covers albums+photos+videos registration, favorited items, duplicate skip, insufficient-storage → `DestinationMemoryFullException`, retry-executor selection, and happy-path uploads with uploaded time. - New `AmazonOAuthConfigTest` cases for media import/export scopes.
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.
feat(amazon-photos): add Amazon Videos importer
Summary
Adds
AmazonVideosImporterfor the VIDEOS vertical, completing Amazon Photos as an import destination for both photos and videos. It reuses theAmazonImportHelperintroduced in #1512 for per-job client creation (bounded LRU, endpoints resolved once per job), MD5/streamed download, and typed error classification — so photos and videos share one hardened code path. The importer is wired intoAmazonTransferExtensionalongside the existing photos importer.What's changed
AmazonVideosImporter— importsVideosContainerResource, creates albums, and uploads videos viaAmazonImportHelper.getOrCreateClient(...). Duplicates (DuplicatesConflictError) are skipped idempotently; storage-quota conditions (InsufficientStorage,NoActiveSubscriptionFound) surface as a terminalDestinationMemoryFullException. Opt-in platform retry via theenableRetryingsetting, consistent with the photos importer.AmazonTransferExtension— constructs and returns the videos importer forDataVertical.VIDEOS.AmazonVideosImporterTest— mirrors the photos importer test suite.Testing
Unit tests (
./gradlew :extensions:data-transfer:portability-data-transfer-amazon:build, Java 11 — green):AmazonVideosImporter: 100%.End-to-end (local demo server, Google → Amazon, VIDEOS vertical):
SUCCESSFULLY_COMPLETEDwith the client's[MultipartPoll]progress observable in the logs. ✅