fix(idp): remove stale idp.rs after module split to idp/#571
Merged
Conversation
… to v3 Adds `pup idp migrate-schema [path]` which migrates Datadog service catalog YAML files (v1, v2, v2.1, v2.2) to v3 format using a Rust-native migration engine with JSON schema validation against the official DataDog/schema schemas. Features: - Detects schema version (v1/v2/v2.1/v2.2/v3) and migrates to v3 - Migrates all field mappings: contacts, links, repos, docs, integrations, lifecycle, tags, extensions, and unknown fields (moved to extensions) - Generates companion 'kind: system' entities from 'application:' fields, deduplicating across multi-doc files - Validates migrated output against v3 JSON schemas fetched from GitHub (in-memory $ref resolution, no blocking HTTP) - Interactive output prompt: write in-place, custom path, or stdout - Auto-discovers *.datadog.yaml files when no path given; accepts a file or directory as argument - Multi-file mode: confirms once, migrates in parallel (batches of 16 to avoid fd exhaustion), prints consolidated summary with counts and timing - Gracefully skips empty files, comment-only files, and broken symlinks - Handles indented YAML (e.g. 4-space indent after ---) correctly - ANSI-coloured output following codebase conventions (no colour crate) Implementation: - src/commands/idp/ directory module (idp/mod.rs + idp/migrate.rs) - jsonschema crate (default-features = false, no blocking HTTP resolver) - 26 unit tests covering version detection, all migration paths, multi-doc handling, companion deduplication, and file discovery
The PR converted commands/idp.rs into a directory module (idp/mod.rs + idp/migrate.rs) but left the old flat file in place, causing a compile error: "file for module found at both idp.rs and idp/mod.rs". Also apply cargo fmt fixes in migrate.rs. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
🐑 PR Shepherd is maintaining this PRI watch your PR and automatically fix CI failures, rebase your branch, handle flaky tests, and push it to the merge queue when it's ready. More about what I do → Guide To pause me on this PR, add the |
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
Fixes all 5 CI failures in #567 caused by an ambiguous module definition.
Root Cause
PR #567 converted
src/commands/idp.rsinto a directory module (idp/mod.rs+idp/migrate.rs) but left the originalsrc/commands/idp.rsin place. Rust rejected the compile with:This caused
cargo fmtto exit with code 1 immediately, failing every CI job.Changes
src/commands/idp.rs— deleted (stale flat file, superseded byidp/mod.rs)src/commands/idp/migrate.rs—cargo fmtcleanup (long lines)This branch also contains the full feature from #567 — it can supersede that PR or be cherry-picked once the upstream branch is fixed.
🤖 Generated with Claude Code