-
Notifications
You must be signed in to change notification settings - Fork 121
We're starting to dive into Backstage and wondering if anyone has any experience around representing their Packwerk packages as Backstage entities? Our plan was to implement some custom entity provider or a custom processor but wanted to reach out before I started.
All reactions
Hello @silasb,
We opted for using the Custom Processor. We have a separate directory within our mono repo for our team definitions and have custom attributes we wanted to ingest. We stitch the team information with the data we obtain from the package.yml files.
The processor logic is relatively straight forward. We first ingest the team data then search for all package.yml files, extract the metadata needed to build an Entity then emit the results directly. Given the number packs we have in one of our mono repos, we avoid excessive calls the Github API (reading content of each package and team file would each result in API call) by downloading a tar of the repo (one call to the Github API...
Replies: 2 comments 2 replies
Hello @silasb,
We opted for using the Custom Processor. We have a separate directory within our mono repo for our team definitions and have custom attributes we wanted to ingest. We stitch the team information with the data we obtain from the package.yml files.
The processor logic is relatively straight forward. We first ingest the team data then search for all package.yml files, extract the metadata needed to build an Entity then emit the results directly. Given the number packs we have in one of our mono repos, we avoid excessive calls the Github API (reading content of each package and team file would each result in API call) by downloading a tar of the repo (one call to the Github API) then processing the repo via the fs JS package.
All reactions
Thanks for the explanation @abeyum and also thanks for the callout on the rate limit, super helpful. As for your implementation, is there plans to open source that within bigrails project?
All reactions
No problem! @silasb we don't have plans to open source it at the moment but can send you snippets.