Skip to content

feat: update rfc json - #10951

Merged
jennifer-richards merged 5 commits into
ietf-tools:mainfrom
rjsparks:update_rfc_json
Jun 2, 2026
Merged

feat: update rfc json#10951
jennifer-richards merged 5 commits into
ietf-tools:mainfrom
rjsparks:update_rfc_json

Conversation

@rjsparks

@rjsparks rjsparks commented May 29, 2026

Copy link
Copy Markdown
Member

RFC JSON files (json/rfc{N}.json) live in the "rfc" blob bucket. Purple generates the
initial file on publication and uploads it via RfcPubFilesView. After that, nothing updates
them. Datatracker must regenerate them — by combining data from its own DB (which purple keeps
current) and errata.json (produced by the errata system) — whenever any of three triggers fire.

  • Publication of a new RFC affects metadata of other RFCs
  • RFC Metadata is updated by purple
  • an RFC gets an errata report (indicate by an entry in errata.json)

@rjsparks
rjsparks marked this pull request as draft May 29, 2026 21:05

@jennifer-richards jennifer-richards left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few comments inline. Generally looks good to me.

A high-level thing (touched on by the comment about rfc_number not in pub_levels) is that can fail semi-silently if there's a problem generating one of the json files. There are at least a couple probably transient situations that could cause this (the pub_levels issue, or a temporary failure accessing the red bucket are the ones I can think of). It might be worth retrying in those cases so we don't have to count on noticing the logged exception.

Comment thread ietf/doc/utils_rfc_json.py Outdated
Comment on lines +82 to +99
if stream_slug == "ise":
source = "INDEPENDENT"
elif stream_slug == "iab":
source = "IAB"
elif stream_slug == "ietf" and (
group_acronym in ("none", "gen") or not area_acronym
):
source = "IETF - NON WORKING GROUP"
elif group_acronym not in ("none", ""):
source = group_acronym
if stream_slug == "ietf" and area_acronym:
source += f" ({area_acronym})"
elif stream_slug:
source += f" ({stream_slug})"
elif stream_slug:
source = "Legacy" if stream_slug == "legacy" else stream_slug.upper()
else:
source = ""

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This differs substantially from the json production at purple. I believe this code is correct and purple's is incorrect for some non-IETF WG documents. We could fix purple to match, but long-term I think we should make datatracker responsible for producing these json files on initial publication as well as update. (The important things being that it's the same code generating the original and updated contents, and that it's the same place that the RFC index is generated)

(In the short term it may be easier to fix purple rather than adjust the plumbing for document publication.)

@rudimatz fyi

Comment thread ietf/doc/utils_rfc_json.py Outdated

@jennifer-richards jennifer-richards left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple typos - but this looks good

Comment thread ietf/doc/utils_rfc_json.py Outdated
Comment thread ietf/doc/utils_rfc_json.py Outdated
@rjsparks
rjsparks marked this pull request as ready for review June 2, 2026 14:00
@codecov

codecov Bot commented Jun 2, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 81.39535% with 24 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.51%. Comparing base (432aa3b) to head (11d845d).
⚠️ Report is 9 commits behind head on main.

Files with missing lines Patch % Lines
ietf/doc/utils_rfc_json.py 88.23% 12 Missing ⚠️
ietf/sync/tasks.py 29.41% 12 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #10951   +/-   ##
=======================================
  Coverage   88.51%   88.51%           
=======================================
  Files         332      333    +1     
  Lines       44970    45065   +95     
=======================================
+ Hits        39805    39890   +85     
- Misses       5165     5175   +10     

☔ 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.

@jennifer-richards
jennifer-richards merged commit ce4345f into ietf-tools:main Jun 2, 2026
9 checks passed
kesara added a commit that referenced this pull request Jun 10, 2026
* ci: numeric settings -> int for searchindex cfg (#10904)

* fix: remove no longer needed notification to the rfc-editor (#10911)

* fix: meeting_stats -> 404 for nonexistent meeting (#10896)

* fix: meeting_stats->404 for nonexistent number

* test: add test case

* chore: fix lint

* test: fix new test

* fix: set searchindex hiddenDefault flag (#10916)

* fix: set searchindex hiddenDefault flag

* chore: adjust docstring comments

* ci: pin xym until we can adapt to new required arguments (#10939)

* ci: update base image target version to 20260527T1529

* fix: adjust searchindex abstract sanitiziation (#10950)

* fix: adjust searchindex abstract sanitiziation

* test: leading/trailing whitespace to be stripped

* fix: strip each line of the abstract

* chore: add items to tracked yarn cache (#10964)

* chore: configurable I-D submit timeout for k8s (#10971)

* feat: update rfc json (#10951)

* feat: update rfc json

* fix: resilience around fetch of publication status

* fix: guards against malformed RFC document objects

* chore: fix log msg typos

* test: mock more async calls

* chore: nginx -> 1.30 (#10978)

* chore: "nginxinc" GH org is now "nginx" (#10981)

* chore: use redis for django caches (#10975)

* chore: drop memcache, add redis (WIP) (#10940)

* chore(dev): use redis for dev sessions

Adds a redis container with a persistent volume and uses this for sessions instead of the database. Results in the same general behavior as before - logins should be persistent until the docker compose stack is torn down.

* chore(deps): install redis/hiredis python pkgs

* chore: remove memcached (mostly)

Still keeps some config references and a custom cache backend

* chore: switch to django-redis for sentinel support

* chore: production redis cache config

Uses sentinel. Untested.

* chore: telemetry: add redis, drop memcache

* chore: remove now-unused cache.py

* chore: adjust imports in gunicorn.conf.py

* chore: adjust redis sentinel settings

* feat: size limit on redis values

* style: ruff ruff

* chore(dev): SizeLimitingRedisClient for dev

Does not make a functional difference in most cases, but
might as well exercise the class.

* test: use db-backed sessions for tests

* chore: typing nit

* ci: remove DEPLOY_STRATEGY

"strategery"

* ci: remove strategy from dt manifests altogether

* ci: update base image target version to 20260604T1454

* ci: remove guard against missing CACHES in prod (#10986)

* chore: revert switch to redis (#10991)

* ci: update base image target version to 20260605T2314

* feat: add group type to search index (#11001)

* feat: self-serve queries for inputs to reporting and survey purposes (#10976)

* feat: utilities to count I-D submitters and authors by year

* chore: fix comment typo

* fix: return querysets and sets rather than lists. Improve docstrings.

* refactor: don't flatten sets to lists

* fix: filter to posted submissions and produce report

* chore: black

* chore: boilerplate

* fix: re-re-re fix the ^M problem in the issue template

* feat: self-serve queries for inputs to reporting and survey purposes

* Update ietf/utils/tests_reports.py

Co-authored-by: Jennifer Richards <jeni@borkbork.org>

---------

Co-authored-by: Jennifer Richards <jeni@borkbork.org>

* ci: remove strategy from dt manifests (#11004)

* fix: tweak logging settings to avoid spurious keyerrors (#11009)

* fix: improved source and keywords for rfc json (#11008)

* test: make check for April 1 resilient across line-breaks (#11006)

* test: make check for April 1 resilient across line-breaks

* test: be resilient against faker creating a 63 character long title

* chore(dev): fix nginx config (#11014)

keepalive 0 is not supported by the version of nginx
in the dev container

---------

Co-authored-by: Jennifer Richards <jennifer@staff.ietf.org>
Co-authored-by: Robert Sparks <rjsparks@nostrum.com>
Co-authored-by: jennifer-richards <19472766+jennifer-richards@users.noreply.github.com>
Co-authored-by: Jennifer Richards <jeni@borkbork.org>
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jun 11, 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