Repository navigation
Replaced the IPS_TO_SKIP regex with the upstream list of excluded IP addresses - #108
Merged
Merged
Conversation
DandiRemoteS3LogAccessExtractor now takes excluded_ips, defaulting to the upstream s3_log_extraction.config.get_excluded_ips(), and the DANDI awk script drops exactly those addresses. Added --exclude to extract and update summaries, and raised the upstream pin to >=1.12.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LWo8Rh1Ceh8UAWkJCdHou3
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LWo8Rh1Ceh8UAWkJCdHou3
Collaborator
Author
|
Generated by Claude Code |
Follows the upstream change that makes S3_LOG_EXTRACTION_EXCLUDED_IPS in ~/.s3-log-extraction/.env the single source, replacing excluded_ips.txt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LWo8Rh1Ceh8UAWkJCdHou3
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LWo8Rh1Ceh8UAWkJCdHou3
Follows the upstream change that accepts a double-quoted multi-line value with per-line comments. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LWo8Rh1Ceh8UAWkJCdHou3
Follows the upstream change that drops the dotenv entry and --exclude. The --exclude option is removed from extract and update summaries, the docs point at ~/.s3-log-extraction/excluded_ips.txt, and the upstream pin is raised to >=1.13.0, the version that carries the change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LWo8Rh1Ceh8UAWkJCdHou3
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LWo8Rh1Ceh8UAWkJCdHou3
The upstream EXCLUDED_IPS_FILE_PATH is no longer public. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LWo8Rh1Ceh8UAWkJCdHou3
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LWo8Rh1Ceh8UAWkJCdHou3
CodyCBakerPhD
marked this pull request as ready for review
October 28, 2026 04:54
1.13.0 was never published, and 1.14.1 is the first release carrying the excluded_ips.txt extraction change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LWo8Rh1Ceh8UAWkJCdHou3
Brings in the extract --check flag of #107, which already raised the upstream pin to >=1.14.1. Both changelog entries stay under Upcoming, and the version stays at 1.7.0, this pull request's single bump above main's 1.6.2. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LWo8Rh1Ceh8UAWkJCdHou3
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #108 +/- ##
===========================================
+ Coverage 67.05% 85.10% +18.04%
===========================================
Files 4 9 +5
Lines 170 658 +488
===========================================
+ Hits 114 560 +446
- Misses 56 98 +42
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
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
This follows dandi/s3-log-extraction#321, released in
s3-log-extraction1.14.1. That change makes the upstream~/.s3-log-extraction/excluded_ips.txtthe only list of excluded IP addresses and applies it at extraction too. The format is one address per line, with#comments.IPS_TO_SKIPandIPS_TO_SKIP_REGEXentirely. An unset or empty regex matched every IP, which was a trap. An empty list now excludes nothing.DandiRemoteS3LogAccessExtractor(*, cache_directory=None, excluded_ips=None)forwardsexcluded_ipsto the upstream extractor, defaulting to the upstreamget_excluded_ips(). The constructor is now keyword-only, since it has two parameters. The only caller (the CLI) already passed keywords._dandi_extraction.awkreads the upstreamEXCLUDED_IPSawk env entry (space-separated) into an array and doesif (ip in EXCLUDED_IPS) next. The lines are the same as in the upstream generic script.main.s3_log_extraction>=1.14.1, the first published release carrying the change (1.13.0 was never published), and bumped the version to 1.7.0.IPS_TO_SKIPsection with the file, and notes that removing an address needs a fresh extraction to bring its requests back.The old
IPS_TO_SKIPwas a regex, so it may match ranges or patterns. Before running this version, convert it into explicit addresses, one per line, in~/.s3-log-extraction/excluded_ips.txt. Patterns and CIDR networks are refused with an error. Any requester the regex matched but the list leaves out will start being extracted. The runner side is brain-bbqs-runners/dandi-usage-runner#12.Testing
s3-log-extraction1.14.1 from PyPI:pytest -m "not remote"gave 124 passed and 1 deselected. The deselected test istest_dandi_summaries.py::test_dandiset_summaries, which needsapi.dandiarchive.org. The sandbox blocks that host, and the test fails the same way onmainthere.ai_generatedtest runs the DANDI awk script end to end. It checks that only the exact excluded address is dropped and that a neighboring address is kept.excluded_ips.pre-commit run --all-filesis clean.🤖 Generated with Claude Code
https://claude.ai/code/session_01LWo8Rh1Ceh8UAWkJCdHou3