Skip to content

Hyperlink-ify Failed Output to Facilitate Data Cleanup #198

@bryanculver

Description

@bryanculver

Environment

  • Nautobot version: 2.4
  • nautobot-netbox-importer version: latest

Proposed Functionality

As a user migrating from NetBox to Nautobot,
I want to linkify and cache records that fail during the save_failed portion of the import,
So that I can more quickly navigate and resolve issues without re-processing all data each time.


Acceptance Criteria:

  1. Phase 1: Output Enhancements and Caching

    • The save_failed entries in the importer's output are enriched with hyperlinks to the Netbox instance.
    • A local cache file is written (e.g. failed_records.json) containing:
      • The object type, primary identifier (e.g. name, ID), and raw data.
      • The specific exception or validation error encountered.
    • Subsequent runs reuse this cache to avoid re-parsing records that already succeeded.
    • CLI flag to clear or ignore the cache when needed.
  2. Phase 2: Intelligent Re-Validation of Previously Failed Records

    • On re-run, importer:
      • Loads the failed cache file.
      • Compares failed records with a fresh export from NetBox to see if the invalid data still exists.
      • Also supports ignoring cache file and re-running import.
    • Provides a summary indicating:
      • Which failures were resolved.
      • Which remain and why.
    • Optional: Check NetBox instance directly provided API key and URL

Key Benefits & Justification

  1. Faster Iteration During Migration – Reduces the feedback loop by eliminating the need to re-process the entire dataset just to check known failures.
  2. Improved Developer UX – Linkified errors allow for immediate inspection of problematic entries, aiding faster debugging.
  3. Supports Large Datasets – Makes the importer more scalable by avoiding redundant validation work during iterative migrations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: featureIntroduction of substantial new functionality to the application

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions