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.

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.

4 participants