feat: concurrent DNS resolution and partial scan on nmap failure - #58
Merged
Merged
Conversation
…51) #51 — Concurrent hostname resolution: - Replace sequential SIGALRM loop with ThreadPoolExecutor (max 20 workers) - All PTR lookups run in parallel — eliminates serial ~1-2s DNS overhead - socket.setdefaulttimeout(2) per thread replaces signal-based timeout - signal/contextmanager imports removed (not safe in threads) - Test: 5-host batch all resolved correctly via concurrent mock #50 — Partial scan persists ARP results when nmap fails: - ScanResult gains warnings: list[str] field - orchestrate_scan() catches RuntimeError from run_nmap_scan(), appends warning, continues with ARP-only results (no longer raises) - scan_runner sets scan.warning_message when warnings present - Scan model gains warning_message: Text nullable column - ScanOut schema and _scan_to_out updated to include warning_message - Frontend Scan type updated; Dashboard last-scan card shows ⚠ warning - HistoryPage scan table shows ⚠ icon (tooltip) on rows with warnings - Test: mock nmap failure → ARP device persisted, scan completed + warning Closes #50 Closes #51 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Closes #50, Closes #51