Skip to content

Conversation

@rwwiv
Copy link

@rwwiv rwwiv commented Dec 11, 2025

Assets discovered during Google Photos takeout were being left in PENDING state instead of being transitioned to DISCARDED when:

  1. A duplicate file was found in the same directory
  2. A file had no matching JSON metadata (with --include-unmatched=false)

The fix ensures these assets properly transition from PENDING to DISCARDED using RecordAssetDiscarded (for already-discovered assets) rather than RecordAssetDiscardedImmediately (for assets rejected at discovery time).

Added tests documenting the correct behavior for these state transitions.

@rwwiv rwwiv requested a review from simulot as a code owner December 11, 2025 22:56
… state

Assets discovered during Google Photos takeout processing were being left
in PENDING state when they should have been transitioned to DISCARDED.

Two scenarios were affected:

1. Duplicate files in the same directory: When a file with the same base
   name was found in a directory, RecordAssetDiscardedImmediately was
   being called. However, the asset was already discovered and in PENDING
   state, so RecordAssetDiscarded should be used instead to properly
   transition it.

2. Files without JSON metadata: When --include-unmatched is false, files
   without matching JSON metadata were not being transitioned to DISCARDED
   state, leaving them stuck in PENDING.

This resulted in assets being reported as "pending" at the end of upload,
even though they were correctly identified as duplicates or filtered.
@rwwiv rwwiv force-pushed the fix/pending-assets-tracking branch from 17f34af to d471fcf Compare December 11, 2025 22:59
@simulot
Copy link
Owner

simulot commented Dec 13, 2025

/run_e2e

4 similar comments
@simulot
Copy link
Owner

simulot commented Dec 13, 2025

/run_e2e

@simulot
Copy link
Owner

simulot commented Dec 13, 2025

/run_e2e

@simulot
Copy link
Owner

simulot commented Dec 13, 2025

/run_e2e

@simulot
Copy link
Owner

simulot commented Dec 13, 2025

/run_e2e

@simulot
Copy link
Owner

simulot commented Dec 13, 2025

/run-e2e

@simulot
Copy link
Owner

simulot commented Dec 13, 2025

Thank you! I have missed those cases.

Could you add e2e tests in the internal/e2e/client folder?

@rwwiv
Copy link
Author

rwwiv commented Dec 14, 2025

Sure thing! Should have them up today or tomorrow 👍

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants