Skip to content

Fix oversized values in CodebaseResource.extension (fixes #1537)#2040

Open
Monal-Reddy wants to merge 1 commit intoaboutcode-org:mainfrom
Monal-Reddy:fix-codebase-resource-extension
Open

Fix oversized values in CodebaseResource.extension (fixes #1537)#2040
Monal-Reddy wants to merge 1 commit intoaboutcode-org:mainfrom
Monal-Reddy:fix-codebase-resource-extension

Conversation

@Monal-Reddy
Copy link
Contributor

This PR fixes issue #1537 where non-extension identifiers were stored in CodebaseResource.extension, causing database failures due to the field's 100-character limit.
The root cause was that values such as Java-generated class names, SBOM qualifiers, and encoded URLs were incorrectly treated as file extensions during resource ingestion.
This change normalizes the extension value by recomputing it from the resource name and ignoring non-extension values, preventing oversized data from being stored and avoiding 'bulk_create' failures.
Fixes #1537

@Monal-Reddy Monal-Reddy force-pushed the fix-codebase-resource-extension branch 2 times, most recently from 4214187 to 20adf35 Compare January 27, 2026 14:04
@Monal-Reddy Monal-Reddy force-pushed the fix-codebase-resource-extension branch from 6a66098 to 840661e Compare March 22, 2026 04:24
Fixes aboutcode-org#1537

Signed-off-by: Monal-Reddy <monalreddy001@gmail.com>
@Monal-Reddy Monal-Reddy force-pushed the fix-codebase-resource-extension branch from 840661e to 4f45713 Compare March 22, 2026 05:26
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.

BUG: value too long for type character varying(100)

1 participant