RoadieHQ / backstage-entity-validator

Validate properties and well known annotations in your Backstage catalog-info.yaml files.
https://roadie.io
68 stars 14 forks source link

Validation fails when using `backstage.io/techdocs-ref: dir:.` annotation #53

Closed joshbranham closed 1 year ago

joshbranham commented 1 year ago

Version:

0.3.10

What happened:

When validating a catalog-info.yml file with backstage.io/techdocs-ref: dir:. set, validation fails with

Failed to validate repositories/api-gateway.yaml: Error: Techdocs annotation specifies "dir" but file under repositories/mkdocs.yaml|repositories/mkdocs.yml not found

We use a monorepo for all our catalog files, so the app code and mkdocs.yml file are not in the same repo where we want to run the validator.

Expected behavior:

Backstage claims that is the default value when using external storage for techdocs (like S3 in our case). Ideally this would pass validation.

Additional Information:

roadie-bot commented 1 year ago

https://app.shortcut.com/larder/story/13246

martina-if commented 1 year ago

Hi @joshbranham this looks like a bug indeed. We are heads down with other priorities at the moment but we would be happy to accept a pull request to fix it if you are up for it?

joshbranham commented 1 year ago

Sure, looks like the validation actually happens over here https://github.com/RoadieHQ/roadie-backstage-plugins/blob/9d25f095dc0755e15f9bba1a4dddff8a926d1185/utils/roadie-backstage-entity-validator/src/relativeSpaceValidation.js#L24 so I can push a fix there.

joshbranham commented 1 year ago

I filed https://github.com/backstage/backstage/issues/16547 and started a convo here https://github.com/backstage/backstage/discussions/16478 to see what Backstage wants to do in this scenario.