dmora opened a new issue, #8649: URL: https://github.com/apache/incubator-devlake/issues/8649
### Search before asking - [x] I searched in the [issues](https://github.com/apache/incubator-devlake/issues) and found no similar issues. ### What happened DORA dashboard queries use case-sensitive `environment = 'PRODUCTION'` filters, which fail to match deployments created with lowercase `"production"` values, resulting in 100% data loss for DORA metrics. Testing with 249 repositories and 409 production deployments confirmed: - Data collected: `SELECT COUNT(*) FROM cicd_deployments WHERE environment = 'production'` → 409 - Dashboard query: `SELECT COUNT(*) FROM cicd_deployments WHERE environment = 'PRODUCTION'` → 0 ### What do you expect to happen DORA dashboards should display metrics for all production deployments regardless of environment field case. The filtering should be case-insensitive or normalize values during ingestion. ### How to reproduce 1. Configure GitHub connection with deployments collection enabled (v0.20+ default) 2. Create deployments with lowercase environment via GitHub API or deployment tools 3. Sync data to DevLake - verify: `SELECT environment FROM cicd_deployments LIMIT 5` 4. Open DORA dashboard (UID: `qNo8_0M4z`) 5. Observe: Deployment Frequency = 0, Lead Time = 0 ### Anything else **Root Cause:** GitHub Deployments API accepts environment as free-text field with no case normalization. Dashboard queries in [DORA.json](https://github.com/apache/incubator-devlake/blob/main/grafana/dashboards/DORA.json) assume uppercase, but GitHub's documentation and many deployment tools use lowercase. **Affected Dashboards (11 total):** - DORA (`qNo8_0M4z`) - DORA (by Team) (`66YkL8y4z`) - DORA Details - Deployment Frequency, Lead Time, CFR, MTTR - All `_nobots` variants **Workaround:** Update dashboard queries to use case-insensitive matching: ```sql -- Before (broken) WHERE cdc.environment = 'PRODUCTION' -- After (works) WHERE UPPER(cdc.environment) = 'PRODUCTION' ``` Or create normalized view: ```sql CREATE VIEW v_cicd_deployments_normalized AS SELECT *, UPPER(environment) as environment FROM cicd_deployments; ``` **Impact:** - **Severity:** High (P1) - DORA metrics completely non-functional (show 0) - **Scope:** All users with lowercase deployment sources - **Metrics affected:** Deployment Frequency, Lead Time for Changes **Additional Context:** - GitHub API docs use lowercase: https://docs.github.com/en/rest/deployments/deployments - Webhook examples use uppercase (ArgoCD discussion #6162) - No existing issues found about this mismatch ### Version v1.0.3-beta8@cfe519c ### Are you willing to submit PR? - [ ] I'm willing to submit a PR (dashboard query updates) ### Code of Conduct - [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
