feat: add diode-replay-dyrun helper - #53
Closed
leoparente wants to merge 5 commits into
Closed
Conversation
leoparente
requested review from
jajeffries,
ltucker and
mfiedorowicz
as code owners
July 8, 2025 16:49
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a new CLI helper for ingesting dry-run JSON messages into Diode, registers it as a script, and updates documentation accordingly.
- Added
netboxlabs/diode/sdk/dryrun_replay.pyimplementing thediode-replay-dryruncommand - Registered the script in
pyproject.toml - Updated
README.mdwith usage examples for the new CLI
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| pyproject.toml | Registered diode-replay-dryrun in project.scripts |
| netboxlabs/diode/sdk/dryrun_replay.py | Implemented the new CLI helper tool |
| README.md | Added instructions for using the new CLI command |
Comments suppressed due to low confidence (3)
pyproject.toml:49
- [nitpick] The CLI command name 'diode-replay-dryrun' differs from the PR title/description ('diode-load-dryrun'). Standardize the name across code, docs, and metadata to avoid confusion.
diode-replay-dryrun = "netboxlabs.diode.sdk.dryrun_replay:main"
netboxlabs/diode/sdk/dryrun_replay.py:1
- There are currently no tests for this new CLI helper. Consider adding unit tests for argument parsing, successful ingestions, and error handling to ensure proper coverage.
"""CLI helper to ingest dry-run JSON messages into Diode."""
README.md:108
- [nitpick] The example here doesn't mention the
-c/--client-idand-k/--client-secretflags or their environment variable defaults. Document these options to help users configure OAuth credentials.
Alternatively, the same file can be ingested using the `diode-replay-dryrun`
jajeffries
reviewed
Jul 9, 2025
Contributor
|
As this isn't part of the sdk as such, I wonder whether moving it to netboxlabs/diode/sdk/bin might make that clearer? Not 100% sure on this, but it feels closer to the approach we'd take with the golang version too |
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 introduces a new CLI tool,
diode-replay-dryrun, to simplify the ingestion of dry-run JSON files into Diode. It also updates the documentation and project configuration to support this new functionality.CLI Tool Addition:
netboxlabs/diode/sdk/dryrun_replay.py: Added a new CLI helper,diode-replay-dryrun, to ingest dry-run JSON messages into Diode. It supports arguments for target server, application name/version, OAuth2 credentials, and input files.Documentation Updates:
README.md: Updated usage instructions to include the newdiode-replay-dryruncommand for ingesting dry-run files, alongside the existingDiodeClientmethod. [1] [2]Project Configuration Updates:
pyproject.toml: Registered thediode-replay-dryrunscript as an entry point in the project configuration.