Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENT] Update license table to use hash of license text #2453

Merged
merged 3 commits into from
Jan 24, 2025

Conversation

pxp928
Copy link
Collaborator

@pxp928 pxp928 commented Jan 24, 2025

Description of the PR

License text can be very long and this results in IngestLicenses :: bulk upsert license node: insert nodes to table \"licenses\": pq: index row size 5840 exceeds btree version 4 maximum 2704 for index \"license_name_inline_list_version\

To solve this, we can instead create a hash of the inline and listversion and create the index against that. This will allow the users to input any length of license text and we can validate against the hash.

The SQL migration also creates the hashes of historical license data.

PR Checklist

  • All commits have a Developer Certificate of Origin (DCO) -- they are generated using -s flag to git commit.
  • All new changes are covered by tests
  • If GraphQL schema is changed, make generate has been run
  • If GraphQL schema is changed, GraphQL client updates/additions have been made
  • If OpenAPI spec is changed, make generate has been run
  • If ent schema is changed, make generate has been run
  • If collectsub protobuf has been changed, make proto has been run
  • All CI checks are passing (tests and formatting)
  • All dependent PRs have already been merged

@pxp928 pxp928 requested a review from mihaimaruseac as a code owner January 24, 2025 14:57
@pxp928 pxp928 force-pushed the pxp928-hash-license-text-ent branch from e3d7133 to 28bd113 Compare January 24, 2025 14:58
@pxp928 pxp928 marked this pull request as draft January 24, 2025 15:07
@pxp928 pxp928 force-pushed the pxp928-hash-license-text-ent branch from 28bd113 to 5e2c825 Compare January 24, 2025 16:37
@pxp928 pxp928 marked this pull request as ready for review January 24, 2025 16:37
@kodiakhq kodiakhq bot merged commit 237114f into main Jan 24, 2025
10 checks passed
@kodiakhq kodiakhq bot deleted the pxp928-hash-license-text-ent branch January 24, 2025 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants