dosubot[bot] commented on issue #8649:
URL: 
https://github.com/apache/incubator-devlake/issues/8649#issuecomment-3572987014

   <!-- Greeting -->
   Hi @dmora! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the 
incubator-devlake team.
   
   <!-- Answer -->
   This is a confirmed bug: DORA dashboard queries filter for `environment = 
'PRODUCTION'` in a case-sensitive way, but GitHub deployments often use 
lowercase (e.g., `production`). The ingestion pipeline stores environment names 
as-is, so deployments with lowercase environments are missed by the dashboards, 
causing metrics like Deployment Frequency and Lead Time to show zero for 
affected users. There is no case normalization during ingestion or in the 
dashboard queries 
[source](https://github.com/apache/incubator-devlake/blob/2c15ad880dce830c6512fa58039527cbf4745b8b/backend/plugins/github/tasks/cicd_run_extractor.go#L44-L76),
 
[source](https://github.com/apache/incubator-devlake/blob/2c15ad880dce830c6512fa58039527cbf4745b8b/grafana/dashboards/DORA.json#L236-L830).
   
   To fix or work around this, update all relevant dashboard queries to use 
case-insensitive matching, for example:
   ```sql
   WHERE UPPER(cdc.environment) = 'PRODUCTION'
   ```
   Alternatively, create a normalized view:
   ```sql
   CREATE VIEW v_cicd_deployments_normalized AS
   SELECT *, UPPER(environment) as environment FROM cicd_deployments;
   ```
   and update the dashboards to use this view.
   
   No existing issues or PRs address this yet. Until an official fix is 
released, updating your dashboard queries as above will restore correct DORA 
metrics for all environment name cases.
   
   
   <!-- Dosu Comment Footer -->
   *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*
   
   ---
   <sup>How did I do? 
[Good](https://app.dosu.dev/response-feedback/41438d8a-ee6e-4ae0-b3b0-51523cd79109?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/41438d8a-ee6e-4ae0-b3b0-51523cd79109?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/41438d8a-ee6e-4ae0-b3b0-51523cd79109?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/41438d8a-ee6e-4ae0-b3b0-51523cd79109?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/41438d8a-ee6e-4ae0-b3b0-51523cd79109?feedback_type=hallucination)
 | [Report 
šŸ›](https://app.dosu.dev/response-feedback/41438d8a-ee6e-4ae0-b3b0-51523cd79109?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/41438d8a-ee6e-4ae0-b3b0-51523cd79109?feedback_type=other)</sup>
   
   [![Chat with 
Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/b4e8e847-d479-4541-83a8-d88d83fea5c9/ask?utm_source=github)&nbsp;[![Open
 in 
Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=This%20is%20a%20confirmed%20bug%3A%20DORA%20dashboard%20queries%20filter%20for%20%60environment%20%3D%20%27PRODUCTION%27%60%20in%20a%20case-sensitive%20way%2C%20but%20GitHub%20deployments%20often%20use%20lowercase%20%28e.g.%2C%20%60production%60%29.%20The%20ingestion%20pipeline%20stores%20environment%20names%20as-is%2C%20so%20deployments%20with%20lowercase%20environments%20are%20missed%20by%20the%20dashboards%2C%20causing%20metrics%20like%20Deployment%20Frequency%20and%20Lead%20Time%20to%20show%20zero%20for%20affected%20users.%20There%20is%20no%20case%20normalization%20during%20ingestion%20or%20in%20the%20dashboard%20queries%20%5Bsource%5D%28https%3A//github.com/apache/incubator-devlake/blob/2c15ad880dce830c6512fa58039527cbf4745b8b/backend/plugins/
 
github/tasks/cicd_run_extractor.go%23L44-L76%29%2C%20%5Bsource%5D%28https%3A//github.com/apache/incubator-devlake/blob/2c15ad880dce830c6512fa58039527cbf4745b8b/grafana/dashboards/DORA.json%23L236-L830%29.%0A%0ATo%20fix%20or%20work%20around%20this%2C%20update%20all%20relevant%20dashboard%20queries%20to%20use%20case-insensitive%20matching%2C%20for%20example%3A%0A%60%60%60sql%0AWHERE%20UPPER%28cdc.environment%29%20%3D%20%27PRODUCTION%27%0A%60%60%60%0AAlternatively%2C%20create%20a%20normalized%20view%3A%0A%60%60%60sql%0ACREATE%20VIEW%20v_cicd_deployments_normalized%20AS%0ASELECT%20%2A%2C%20UPPER%28environment%29%20as%20environment%20FROM%20cicd_deployments%3B%0A%60%60%60%0Aand%20update%20the%20dashboards%20to%20use%20this%20view.%0A%0ANo%20existing%20issues%20or%20PRs%20address%20this%20yet.%20Until%20an%20official%20fix%20is%20released%2C%20updating%20your%20dashboard%20queries%20as%20above%20will%20restore%20correct%20DORA%20metrics%20for%20all%20environment%20name%20cases.)&nbsp;[![J
 oin 
Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share
 on 
X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/incubator-devlake/issues/8649)


-- 
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]

Reply via email to