weaveworks/weave-gitops-enterprise

Not handling empty inventory in GitOpsSet

bigkevmcd opened this issue · 0 comments

Describe the bug
When the inventory is empty (0 resources created) we get an error.

status:
  conditions:
    - lastTransitionTime: 2023-12-14T00:20:05Z
      message: 0 resources created
      reason: ReconciliationSucceeded
      status: "True"
      type: Ready
  observedGeneration: 2
image

To Reproduce
Create a GitOpsSet that doesn't generate any resources, perhaps with an empty list.

There's a bug filed already to do some validation of the spec requiring some generated resources.

(lists should not be allowed to be empty)

But this could happen if no GitopsClusters matched the labels etc.

Actual behaviour
See error message above

Expected behaviour
No error, perhaps a message showing that there are no resources generated.

Additional context

  • Weave GitOps version:
  • Kubernetes version: