Skip to content

datacontract ci ignores severity: warning for quality checks #1190

@hk8suva

Description

@hk8suva

A failing quality check with severity: warning is reported as failed, and datacontract ci exits with code 1.

Example

schema:
  - name: some_model
    quality:
      - metric: rowCount
        mustBeGreaterOrEqualTo: 5
        severity: warning
servers:
  - server: local
    type: local
    format: json
    path: example_data/{model}/*.json
❯ datacontract ci datacontract.yaml --server local
Testing datacontract.yaml
╭────────┬────────────────────────────────────────────────────┬─────────────────────────┬──────────────────────────────────╮
│ Result │ Check                                              │ Field                   │ Details                          │
├────────┼────────────────────────────────────────────────────┼─────────────────────────┼──────────────────────────────────┤
│ failed │ Check that model tpch_region has row_count >= 5    │ tpch_region             │ Value: 2 Fail: {'lessThan': 5.0} │
...
🔴 data contract is invalid, found the following errors:
1) tpch_region Check that model tpch_region has row_count >= 5: Value: 2 Fail: {'lessThan': 5.0}

Actual

  • rowCount result is failed
  • Exit code is 1

Expected

  • rowCount result should be warning
  • Exit code should be 0 by default

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions