Add async DAG fetching, health checks, report diffing, and rule config - #13
Merged
Conversation
…rmalized score, diff command
- doctor: replace hardcoded [STUB] messages with real probes
- Airflow: GET /api/v1/health → reports metadatabase + scheduler status
- dbt: file-existence check for manifest.json (required) and
run_results.json (optional warning)
- Warehouse: lightweight connection probe per driver
(psycopg2 / BigQuery client / snowflake.connector)
- async fetching: AirflowConnector.fetch_dag_details() uses
httpx.AsyncClient + asyncio.gather with a configurable semaphore
(rules.fetch_concurrency, default 10) — replaces the serial
get_dag_runs/get_tasks loop that produced 400 sequential HTTP calls
for a 200-DAG shop
- configurable rule severities: new RulesConfig.severity_overrides dict
injected into rule context; each rule calls _severity(context, rule_name,
default) so teams can escalate missing_sla to critical via YAML without
touching source code
- normalized health score: penalty now scales with critical_density
(criticals / dag_count) and warning_density rather than raw counts —
5 criticals on 500 DAGs ≠ 5 criticals on 10 DAGs; formula is printed
in every report summary
- diff command: `pipelineprobe diff baseline.json current.json` compares
two JSON audit reports, shows regressions (new issues) and improvements
(resolved issues), exits 1 if any regressions found
- config: stale_threshold_days and fetch_concurrency promoted to
RulesConfig so they are exposed in pipelineprobe.yml; init template
updated with commented examples including severity_overrides
https://claude.ai/code/session_014GhFtopVtaMtygBYvZJ7WE
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
This PR significantly enhances PipelineProbe's audit capabilities and operational tooling by introducing concurrent Airflow API calls, comprehensive health diagnostics, report comparison functionality, and configurable rule severity overrides.
Key Changes
Async DAG Fetching & Performance
fetch_dag_details()inAirflowConnectorusingasynciowith semaphore-based concurrency control to fetch DAG runs and tasks in parallelfetch_concurrencyparameter (default: 10) to prevent API overwhelmingEnhanced
doctorCommand/api/v1/healthendpoint, reports metadatabase and scheduler statusmanifest.json(required) andrun_results.json(optional)New
diffCommandRule Configuration & Severity Overrides
RulesConfigclass supporting:missing_slaas critical for fintech teams)stale_threshold_days(default: 7)fetch_concurrency(default: 10)_severity()helperHealth Score Improvements
score_formulato summary output for transparencyConfiguration & Documentation
pipelineprobe.ymltemplate with newrulessectionNotable Implementation Details
httpx.AsyncClientwith auth preservation across concurrent requestshttps://claude.ai/code/session_014GhFtopVtaMtygBYvZJ7WE