Skip to content

[Bug][GitHub][DORA] Case-sensitive environment filtering breaks DORA metrics for lowercase deployment sources #8649

@dmora

Description

@dmora

Search before asking

  • I searched in the 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 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:

-- Before (broken)
WHERE cdc.environment = 'PRODUCTION'

-- After (works)
WHERE UPPER(cdc.environment) = 'PRODUCTION'

Or create normalized view:

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:

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    component/extThis issue or PR relates to external components, such as Grafanapriority/highThis issue is very importantseverity/p1This bug affects functionality or significantly affect uxtype/bugThis issue is a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions