backstage/community-plugins

๐Ÿ› tech-insights: Checks under the conditions ignore metadata

Closed this issue ยท 2 comments

Plugin Name

backstage-community/plugin-tech-insights-backend

๐Ÿ“œ Description

In the even we setup a fact in the following way:

exampleFact:
  type: json-rules-engine
  name: example name
  description: |
    example description
  factIds:
    - exampleFactRetriever
  rule:
    conditions:
      all:
        - fact: exampleCheck1
          operator: equal
          value: true
          metadata:
           key: value
           key2: value
        - fact: exampleCheck2
          operator: equal
          value: true

exampleCheck1 metadata is not included in /checks/run response.

๐Ÿ‘ Expected behavior

/checks/run should return both fact and checks metadata.

๐Ÿ‘Ž Actual Behavior with Screenshots

Not applicable.

๐Ÿ‘Ÿ Reproduction steps

Nothing special besides setting up the fact as described.

๐Ÿ“ƒ Provide the context for the Bug.

No response

๐Ÿ‘€ 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?

No, but I'm happy to collaborate on a PR with someone else

Could you elaborate on the expected and unexpected behavior?

Could you provide a PR to fix this to meet your expectations?

After thorough investigation I've found a solution. Although not optimal, it serves the purpose.

Updating metadata under the retriever schema will result in the factResponse on the /run/checks
endpoint.