Skip to content

fix: blank not null for StoredObject doc_name/doc_rev - #10400

Merged
jennifer-richards merged 4 commits into
ietf-tools:feat/storedobjfrom
jennifer-richards:stored-obj-nulls
Feb 12, 2026
Merged

fix: blank not null for StoredObject doc_name/doc_rev#10400
jennifer-richards merged 4 commits into
ietf-tools:feat/storedobjfrom
jennifer-richards:stored-obj-nulls

Conversation

@jennifer-richards

@jennifer-richards jennifer-richards commented Feb 11, 2026

Copy link
Copy Markdown
Member

Allows matching a doc via StoredObject.objects.filter(doc_name=doc.name, doc_rev=doc.rev), which doesn't work if those fields are None. Will want to confirm that the migration is not slow in staging.

Todo before promoting from draft PR:

  • Confirm that StoredObject does not need explicit defaults for those fields
  • Time migration in dev

If / when this is merged, we can roll back #10401.

Comment thread ietf/doc/models.py Outdated
@codecov

codecov Bot commented Feb 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (feat/storedobj@0b637ef). Learn more about missing BASE report.

Additional details and impacted files
@@                Coverage Diff                @@
##             feat/storedobj   #10400   +/-   ##
=================================================
  Coverage                  ?   88.36%           
=================================================
  Files                     ?      325           
  Lines                     ?    43644           
  Branches                  ?        0           
=================================================
  Hits                      ?    38566           
  Misses                    ?     5078           
  Partials                  ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread ietf/doc/models.py Outdated
@jennifer-richards

Copy link
Copy Markdown
Member Author

Migration in dev takes about 7 seconds total (with about 4.7 seconds of that in migration system overhead)

dev ➜ /workspace $ time ietf/manage.py migrate --plan
Planned operations:
doc.0031_storedobject_blank_not_null
    Alter field doc_name on storedobject
    Alter field doc_rev on storedobject
ietf/manage.py migrate --plan  3.33s user 1.06s system 94% cpu 4.653 total
dev ➜ /workspace $ time ietf/manage.py migrate
Operations to perform:
  Apply all migrations: admin, auth, blobdb, community, contenttypes, dbtemplate, django_celery_beat, django_celery_results, doc, group, iesg, ipr, liaisons, mailinglists, mailtrigger, meeting, message, name, nomcom, oidc_provider, person, redirects, review, sessions, sites, stats, status, submit, tastypie, utils
Running migrations:
  Applying doc.0031_storedobject_blank_not_null... OK
ietf/manage.py migrate  3.57s user 0.68s system 60% cpu 6.992 total

@jennifer-richards
jennifer-richards marked this pull request as ready for review February 12, 2026 01:43
@jennifer-richards
jennifer-richards changed the base branch from main to feat/storedobj February 12, 2026 15:49
@jennifer-richards
jennifer-richards merged commit a9c35f9 into ietf-tools:feat/storedobj Feb 12, 2026
10 checks passed
@jennifer-richards
jennifer-richards deleted the stored-obj-nulls branch February 12, 2026 15:49
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Feb 16, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants