Skip to content

Conversation

@surajnarwade
Copy link
Contributor

@surajnarwade surajnarwade commented Dec 31, 2025

This PR solves this issue: #4259

Hey, I just made a Pull Request!

✔️ Checklist

  • A changeset describing the change and affected packages. (more info)
  • Added or updated documentation
  • Tests for new functionality and regression tests for bug fixes
  • Screenshots attached (for UI changes)
  • All your commits have a Signed-off-by line in the message. (more info)

@backstage-service backstage-service added the workspace/tech-insights Used to tag tech-insights workspace issues and pull requests label Dec 31, 2025
@backstage-goalie
Copy link
Contributor

Changed Packages

Package Name Package Path Changeset Bump Current Version
@backstage-community/plugin-tech-insights-backend-module-jsonfc workspaces/tech-insights/plugins/tech-insights-backend-module-jsonfc patch v0.6.1
@backstage-community/plugin-tech-insights-common workspaces/tech-insights/plugins/tech-insights-common patch v0.7.1
@backstage-community/plugin-tech-insights-node workspaces/tech-insights/plugins/tech-insights-node patch v2.5.1

@surajnarwade surajnarwade changed the title Feat checks filter tech-insights: ability to add filters on the checks Dec 31, 2025
Signed-off-by: surajnarwade <[email protected]>
Signed-off-by: surajnarwade <[email protected]>
Signed-off-by: surajnarwade <[email protected]>
Signed-off-by: surajnarwade <[email protected]>
@surajnarwade surajnarwade marked this pull request as ready for review December 31, 2025 12:30
@surajnarwade surajnarwade requested review from a team, Xantier and punkle as code owners December 31, 2025 12:30
@surajnarwade surajnarwade requested review from awanlin and removed request for a team December 31, 2025 12:30
Signed-off-by: surajnarwade <[email protected]>
Signed-off-by: surajnarwade <[email protected]>
Signed-off-by: surajnarwade <[email protected]>
Signed-off-by: surajnarwade <[email protected]>
Comment on lines 37 to +47
deps: {
config: coreServices.rootConfig,
logger: coreServices.logger,
discovery: coreServices.discovery,
techInsights: techInsightsFactCheckerFactoryExtensionPoint,
},
async init({ config, logger, techInsights }) {
async init({ config, logger, discovery, techInsights }) {
const catalogClient = new CatalogClient({ discoveryApi: discovery });
const factory = JsonRulesEngineFactCheckerFactory.fromConfig(config, {
logger,
catalogApi: catalogClient,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A better route is having the module define catalog as a dependency with catalogServiceRef from @backstage/plugin-catalog-node. This is the newer way of communicating with the catalog as it includes auth support. In this scenario, I think passing { credentials: await this.auth.getOwnServiceCredentials() } as the second argument to the catalog api calls would suffice.

deps: {
  config: coreServices.rootConfig,
  logger: coreServices.logger,
-  discovery: coreServices.discovery,
+ catalog: catalogServiceRef,
+ auth: coreServices.auth,
  techInsights: techInsightsFactCheckerFactoryExtensionPoint,
}

wdyt?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is referring to the ingestion and processing of entities in the catalog, known as EntityProvider and EntityProcessor. This factory class is neither a catalog provider or processor.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah okay, now it make sense. sorry I misunderstood earlier. I now found the similar references:

I will update my code accordingly, thank you for the review.

Signed-off-by: surajnarwade <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

workspace/tech-insights Used to tag tech-insights workspace issues and pull requests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants