Expose relations to Scorecards
complete
Cody Dunlap
When defining scorecards, it would be helpful to be able to create rules that check if an entity has been defined in the relation. It would also be really helpful to either be able to create scorecards that refer to properties on related entities or to have scorecards that aggregate scores from score cards on related entities.
I have two real world use cases to provide examples for this.
I have the following entities with relations:
Repository -> Component -> Resource
The repositories are ingested from GitHub, so the component is not automatically populated. I would like to create a Scorecard that checks if at least one component has been associated with the GitHub repository.
Similarly, a component may have multiple resources related to it. These could be external services, S3 buckets, databases, etc. I would like to be able to create a Scorecard on the Component entity that filters for resources that have the type 'Database' and check that the database technology property is set to one of a few organization preferred database technologies.
Dudi - Port team
complete
Hi Cody Dunlap!
I see that you got answers, so I'm closing this item for now. Please feel free to open a new one or reach out if you have any questions 😃
H
Hador Co
Hey Cody Dunlap!
IIUC, there are 2 things here:
- Using a scorecard to check if a relation is empty or not - we already support this:) See an example here - https://docs.getport.io/promote-scorecards/examples#ensure-relation-existence
- Referring to properties of related entities in a scorecard - this is also possible currently using Mirror properties. After creating a relation between A->B, you can create a mirror property on A that reflects any property in B, thus also allowing you to use it in a scorecard defined on A. Read more here - https://docs.getport.io/build-your-software-catalog/define-your-data-model/setup-blueprint/properties/mirror-property/.
I hope this solves your use-case:)