Skip to content

🐛 entity-validation: Errors out with kind or metadata key value missing, instead of properly reporting the issue #8216

@0xts

Description

@0xts

Workspace

entity-validation

📜 Description

When an entity with either missing kind or an empty metadata field is validated, the plugin errors out, instead of reporting proper errors.

👍 Expected behavior

The plugin should properly flag missing kind and metadata to be a proper object type.

👎 Actual Behavior with Screenshots

It errors out instead of reporting the missing field.

When kind is missing ->
Image

When metadata property is present without any content ->
Image

👟 Reproduction steps

  1. Go to entity validation plugin screen.
  2. Try to validate an entity with kind or metadata key value missing.

📃 Provide the context for the Bug.

This bug doesn't flag an incorrect entity properly. This happens because the humaizeEntityRef from @backstage/plugin-catalog-react package expects entitiyRef.kind & entityRef.metadata.namespace to be available, even with the defaults provided.

👀 Have you spent some time to check if this bug has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

Are you willing to submit PR?

Yes I am willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions