Repository navigation
feat: safely deduplicate and collapse network lists - #4
Merged
Merged
Conversation
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.
This pull request adds support for storing detailed run history and exact target list snapshots for sync jobs, along with optional CIDR collapsing and related API and schema changes. The main improvements are the ability to track and retrieve the precise list of items sent to each target during a run, store per-run statistics, and enable or disable CIDR collapsing for jobs. It also updates tests to cover these new features.
Run History and Target Snapshot Enhancements:
RunTargetSnapshotstruct and new database table (run_log_targets) to store the exact list of items sent to each target during a job run, including label, name, type, entry count, and the payload (items_json). New methods allow listing and retrieving these snapshots for a given run. [1] [2] [3]RunLogstruct and database schema now include aStatsfield for per-run statistics, stored as JSON, and methods to save and retrieve this data. [1] [2] [3]Job Configuration and List Optimization:
CollapseCIDRsboolean field toSyncJoband the database, allowing jobs to optionally collapse fully covered IPv4 ranges into/24or larger CIDRs. All CRUD methods and tests updated to support this field. [1] [2] [3] [4] [5] [6] [7] [8] [9]API and Documentation Updates:
GET /api/jobs/{id}/logs/{logID}/targets/{targetID}.Testing Improvements:
CollapseCIDRs, per-run statistics, and target snapshots are correctly stored, retrieved, and validated. [1] [2] [3] [4] [5]These changes provide improved auditability, traceability, and configurability for sync jobs and their outputs.
Closes #2