WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Conversation

@vidarl
Copy link
Contributor

@vidarl vidarl commented Oct 16, 2025

🎫 Issue IBX-10233

Description:

If all files in the current bulk are missing, then $metadataList ($metadataList = $fileLister->loadMetadataList($bulkCount, $offset);) will be a empty list. This will cause the loop to be exited prematurely ( while (count($metadataList) > 0) )

For QA:

Documentation:

@vidarl vidarl changed the base branch from main to 4.6 October 16, 2025 13:32
@sonarqubecloud
Copy link

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a bug in the file migration command where the migration process would terminate prematurely if an entire batch of files was missing. The fix changes the loop termination condition from checking if the current batch has files to verifying if there are more files to process based on the total file count.

Key Changes:

  • Store the total file count before starting the migration loop
  • Calculate offset explicitly for better readability
  • Replace batch-based loop condition with offset-based condition that checks against total file count

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@vidarl vidarl requested a review from a team December 2, 2025 08:04
@alongosz alongosz changed the title IBX-10233: File migration fails when a whole batch of files is missing (ibexa:io:migrate-files) IBX-10233: Fixed iterating over a batch of files in ibexa:io:migrate-files command Dec 3, 2025
@tomaszszopinski tomaszszopinski force-pushed the IBX-10233_File_migration_fails_when_a_whole_batch_of_files_is_missing branch from b8caedf to e0d806a Compare December 10, 2025 11:23
@sonarqubecloud
Copy link

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants