operator-framework / deppy

Deppy: The dependency resolver for Kubernetes
Apache License 2.0
14 stars 21 forks source link

✨ Replace separator in `NotSatisfiable` error #158

Closed m1kola closed 6 months ago

m1kola commented 6 months ago

Use new line instead of comma as a separator.

Example from operator-controller as yaml:

status:
  conditions:
  - lastTransitionTime: "2023-11-13T13:43:28Z"
    message: |-
      constraints not satisfiable:
      argocd-operator package uniqueness permits at most 1 of operatorhubio-argocd-operator-argocd-operator.v0.6.0, operatorhubio-argocd-operator-argocd-operator.v0.4.0
      installed package argocd-operator requires at least one of operatorhubio-argocd-operator-argocd-operator.v0.4.0
      installed package argocd-operator is mandatory
      required package argocd-operator requires at least one of operatorhubio-argocd-operator-argocd-operator.v0.6.0
      required package argocd-operator is mandatory
    observedGeneration: 2
    reason: ResolutionFailed
    status: "False"
    type: Resolved

And as json:

{
    "status": {
        "conditions": [
            {
                "lastTransitionTime": "2023-11-13T13:43:28Z",
                "message": "constraints not satisfiable:\nargocd-operator package uniqueness permits at most 1 of operatorhubio-argocd-operator-argocd-operator.v0.6.0, operatorhubio-argocd-operator-argocd-operator.v0.4.0\ninstalled package argocd-operator requires at least one of operatorhubio-argocd-operator-argocd-operator.v0.4.0\ninstalled package argocd-operator is mandatory\nrequired package argocd-operator requires at least one of operatorhubio-argocd-operator-argocd-operator.v0.6.0\nrequired package argocd-operator is mandatory",
                "observedGeneration": 2,
                "reason": "ResolutionFailed",
                "status": "False",
                "type": "Resolved"
            }
        ]
    }
}

Closes #150

codecov[bot] commented 6 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (0a012d2) 65.45% compared to head (3135de7) 65.45%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #158 +/- ## ======================================= Coverage 65.45% 65.45% ======================================= Files 11 11 Lines 495 495 ======================================= Hits 324 324 Misses 152 152 Partials 19 19 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.