Refactored Techdocs publishers to use a single parameter object as the
constructor argument to ease extendability as more options are introduced.
Updated local publisher to use `.fromConfig` for instantiation so that it
follows the same design pattern as the other publishers.
Signed-off-by: Colton Padden <colton.padden@fastmail.com>
- Updated app-config.yaml with additional configuration parameters:
- techdocs.publisher.awsS3.bucketRootPath
- techdocs.publisher.googleGcs.bucketRootPath
- Updated `fromConfig` and constructors to support additional `bucketRootPath`
parameters.
- Updated publish method to support `bucketRootPath` in constructing destination
file path
- Updated `fetchTechDocsMetadata` to use `bucketRootPath`
- Updated `docsRouter` to use `docsRouter` when retrieving files
- When using both legacy casing, and a bucket root path, additional logic
was added to prevent the root path's case from being modified as
previously legacy casing would be applied to the first three entities of
the URI
- Updated `hasDocsBeenGenerated` to use `bucketRootPath`
- Added additional unit tests for new configurations to updated, and new methods
Signed-off-by: Colton Padden <colton.padden@fastmail.com>
* set default docker image to latest one 0.3.3
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
* update extensions docs with new truly sane lists example
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
* changeset
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
* use consistent tagging for docker image versions
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
* update changeset with correct link to tag
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
* update api report
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
Currently if a document is requested that is found found a generic log line
containing only the error from the provider is logged.
{"type":"plugin","plugin":"techdocs","message":"The specified key does not exist.","level":"warn","service":"backstage"}
This gives very little indication as to what and where something failed.
This change expands the log lines to include more details about what is being
attempted. It also removes the propagation of the raw error message to the
client as there might be information here that is not meant to be disclosed.
Tests are added for each provider. A bug in the Azure Blob storage provider was
found where the download method would reject its promise but the express handler
would not detect this and therefore not write a response.
Signed-off-by: Crevil <bjoern.soerensen@gmail.com>
* Implement in-context search bar for tech docs
* Add in-context search functionality to tech docs
* Use the existing backend search functionality with tech docs specific filters
* Use material-ui autocomplete to display 10 first search results
* Add tests
Signed-off-by: Jussi Hallila <jussi@hallila.com>
* Remove context and replace it with `withSearch` prop.
Signed-off-by: Jussi Hallila <jussi@hallila.com>
* Bump search-common devp to latest
Signed-off-by: Jussi Hallila <jussi@hallila.com>
* Rename types file to not conflict with hardcoded types.d.ts.
Signed-off-by: Jussi Hallila <jussi@hallila.com>