[COST-7249] Widen rates_to_usage.label_hash to VARCHAR(64)#6048
Merged
myersCody merged 1 commit intoMay 11, 2026
Conversation
jordigilh
added a commit
to jordigilh/koku
that referenced
this pull request
May 6, 2026
…6048) Migration 0350 (widen label_hash to VARCHAR(64)) has been extracted into standalone PR project-koku#6048 per TL request, so Phase 3 can be cleanly reverted via git revert without migration entanglement. The model change (max_length=64) is retained here since Phase 3's SHA-256 hashes require the wider column. After PR project-koku#6048 merges, a final rebase will deduplicate the model change. Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
There was a problem hiding this comment.
Code Review
This pull request increases the maximum length of the label_hash field from 32 to 64 characters in the RatesToUsage model and includes the corresponding database migration. I have no feedback to provide as there were no review comments.
myersCody
approved these changes
May 6, 2026
Contributor
|
/retest |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6048 +/- ##
=====================================
Coverage 94.3% 94.4%
=====================================
Files 362 362
Lines 31988 31988
Branches 3513 3513
=====================================
+ Hits 30179 30181 +2
+ Misses 1172 1171 -1
+ Partials 637 636 -1 🚀 New features to boost your workflow:
|
Contributor
Author
|
/retest |
Contributor
Author
|
@myersCody koku-ci is green on retest — PR is ready to merge (approved, all checks passing). |
jordigilh
added a commit
to jordigilh/koku
that referenced
this pull request
May 11, 2026
…6048) Migration 0350 (widen label_hash to VARCHAR(64)) has been extracted into standalone PR project-koku#6048 per TL request, so Phase 3 can be cleanly reverted via git revert without migration entanglement. The model change (max_length=64) is retained here since Phase 3's SHA-256 hashes require the wider column. After PR project-koku#6048 merges, a final rebase will deduplicate the model change. Co-authored-by: Cursor <cursoragent@cursor.com>
Extend label_hash from VARCHAR(32) (MD5) to VARCHAR(64) in preparation for Phase 3's SHA-256 upgrade. This is a backwards- compatible schema change with zero runtime impact on existing MD5 hashes. Split out from Phase 3 PR project-koku#6043 per TL request so that Phase 3 remains a clean git-revert without migration entanglement. Co-authored-by: Cursor <cursoragent@cursor.com>
2eaa783 to
2f43f87
Compare
jordigilh
added a commit
to jordigilh/koku
that referenced
this pull request
May 11, 2026
…6048) Migration 0350 (widen label_hash to VARCHAR(64)) has been extracted into standalone PR project-koku#6048 per TL request, so Phase 3 can be cleanly reverted via git revert without migration entanglement. The model change (max_length=64) is retained here since Phase 3's SHA-256 hashes require the wider column. After PR project-koku#6048 merges, a final rebase will deduplicate the model change. Co-authored-by: Cursor <cursoragent@cursor.com>
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.
Summary
rates_to_usage.label_hashfromVARCHAR(32)toVARCHAR(64)in preparation for Phase 3's SHA-256 hash upgradeRatesToUsagemodel and adds migration0350Context
Split out from Phase 3 PR #6043 per TL request. Merging the schema change independently keeps Phase 3 as a pure SQL/Python change with a clean git-revert rollback path (no migration entanglement).
The
AlterFieldreverse naturally narrows back toVARCHAR(32). If 64-char SHA-256 data exists (from Phase 3), PostgreSQL will reject the reverse — which is the correct behavior since Phase 3 must be reverted first.Test plan
rates_to_usagerows (Phase 2 MD5 hashes)Made with Cursor