Repository navigation
Backfill file sizes per extension version instead of per file resource - #2095
Merged
netomi merged 1 commit intoAug 25, 2026
Merged
Conversation
…esource Scope the FileResourceSizeMigration backfill by extension version rather than by individual file resource: an extension version's handful of resources (download, README, CHANGELOG, icon, sha256 checksum, ...) are now backfilled together in one job, instead of one job (and one migration_item row) per resource -- for a registry with millions of resources, that's a lot fewer jobs for JobRunr to carry for the same amount of work. - FileResourceSizeJobRequestHandler now looks up the ExtensionVersion and loops over all its file resources, backfilling each one still missing a size. A resource whose object is missing from storage (FileNotFoundInStorageException) no longer aborts the whole job -- its siblings are still processed. - MigrationService.getFileResources(ExtensionVersion) added, delegating to RepositoryService.findFiles like FixMissingFilesJobRequestHandler already does. - V1_73__File_Resource_Size.sql seeding updated to insert one migration_item per extension version that still has an unsized resource, rather than one per file resource. Edited in place rather than layered as a new migration, since nothing has shipped with the original seeding yet. Also fixes the seed insert to use migration_item_seq (MigrationItem's actual sequence since V1_40) instead of the unrelated hibernate_sequence it was using before. Verified against a real Postgres instance that the updated migration still applies cleanly. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
netomi
deleted the
feature/1777-filesize-migration-by-extension-version
branch
August 25, 2026 07:22
This was referenced Sep 5, 2026
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.
What
Scopes the
FileResourceSizeMigrationbackfill (#1777) by extension version rather than by individual file resource: an extension version's handful of resources (download, README, CHANGELOG, icon, sha256 checksum, ...) are now backfilled together in one job, instead of one job (and onemigration_itemrow) per resource — for a registry with millions of resources, that's a lot fewer jobs for JobRunr to carry for the same amount of work.How
FileResourceSizeJobRequestHandlernow looks up theExtensionVersionand loops over all its file resources viamigrations.getFileResources(extVersion), backfilling each one still missing a size. A resource whose object is missing from storage (FileNotFoundInStorageException, from Tolerate missing storage objects in the file-size backfill #2094) no longer aborts the whole job — its siblings are still processed.MigrationService.getFileResources(ExtensionVersion)added, delegating toRepositoryService.findFiles— the same accessorFixMissingFilesJobRequestHandleralready uses.V1_73__File_Resource_Size.sql's seeding updated to insert onemigration_itemper extension version that still has an unsized resource, rather than one per file resource. Edited in place rather than layered as a new migration, since nothing has shipped with the original seeding yet. Also fixes the seed insert to usemigration_item_seq(MigrationItem's actual sequence sinceV1_40) instead of the unrelatedhibernate_sequenceit was using before.Testing
FileResourceSizeJobRequestHandlerTestrewritten for the per-extension-version shape: no-op when the extension version is gone, backfills every unsized resource while skipping already-sized ones, and one resource's missing object doesn't block backfilling the rest of that version's resources.unitTestssuite passes (949 tests).ExtensionVersionJooqRepositoryTest, which boots the full Spring context) that the updatedV1_73migration still applies cleanly.🤖 Generated with Claude Code