Skip to content

Don't re-queue undetermined IPs in update_ip_to_region_codes#275

Merged
CodyCBakerPhD merged 7 commits into
mainfrom
fix/undetermined-ip-reprocessing
Jun 16, 2026
Merged

Don't re-queue undetermined IPs in update_ip_to_region_codes#275
CodyCBakerPhD merged 7 commits into
mainfrom
fix/undetermined-ip-reprocessing

Conversation

@CodyCBakerPhD

@CodyCBakerPhD CodyCBakerPhD commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • IPs stored as "undetermined" (API quota exceeded) were re-queued on every run, wasting batch slots that should go to genuinely new IPs
  • Fix: skip any IP already present in the cache regardless of its stored value — only truly new IPs consume batch budget
  • The existing refresh command handles periodic re-querying of stale entries on a 90-day cycle

Test plan

  • Verify existing tests pass
  • Manually confirm a second run with --batch-limit 1 no longer re-processes IPs marked undetermined in the previous run

https://claude.ai/code/session_011P2oXRraRrd1Yg7i7TVWiK

Previously, IPs stored as "undetermined" (API quota exceeded) were
excluded from ip_to_determined_region and re-entered ips_to_update on
every run, wasting batch slots that should go to genuinely new IPs.

Now any IP already present in the cache (regardless of value) is skipped.
The existing refresh command handles periodic re-querying of old entries.

https://claude.ai/code/session_011P2oXRraRrd1Yg7i7TVWiK
@CodyCBakerPhD CodyCBakerPhD self-assigned this Jun 16, 2026
Comment thread src/s3_log_extraction/ip_utils/_update_ip_to_region_codes.py Outdated
@codecov

codecov Bot commented Jun 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.75%. Comparing base (a7a9f46) to head (c9fbf19).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #275      +/-   ##
==========================================
+ Coverage   73.96%   74.75%   +0.78%     
==========================================
  Files          40       40              
  Lines        1571     1620      +49     
==========================================
+ Hits         1162     1211      +49     
  Misses        409      409              
Flag Coverage Δ
unittests 74.75% <100.00%> (+0.78%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
..._extraction/ip_utils/_update_ip_to_region_codes.py 81.25% <100.00%> (-0.39%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@CodyCBakerPhD
CodyCBakerPhD merged commit a6c0cb2 into main Jun 16, 2026
7 checks passed
@CodyCBakerPhD
CodyCBakerPhD deleted the fix/undetermined-ip-reprocessing branch June 16, 2026 19:24
@github-project-automation github-project-automation Bot moved this from Uncategorized to Done in My Work History Jun 16, 2026
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.

2 participants