Changes:
- Deprecates SingleConnectionManager and aliases to DatabaseManager.
- Simplifies database config typing in `config.d.ts`.
- Drops implementation specific assert in SingleConnectionManager test.
- Move database prefix reference and drop static property for default value.
Signed-off-by: Minn Soe <contributions@minn.io>
This commit introduces:
- a new backwards compatible database manager which allows the end-user
to set global and per plugin database configuration.
- an early iteration of a database connector interface.
- provides helper functions for each of the database connectors to
meet the new interface.
Signed-off-by: Minn Soe <contributions@minn.io>
* Add owner/lifecycle to default catalog document and allow location to be configured by integrators.
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
* Test the DefaultCatalogCollator
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
* Changeset.
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
Before:
```
Step 7/8 : RUN tar xzf bundle.tar.gz && rm bundle.tar.gz
---> Running in 91107ee4a847
tar (child): bundle.tar.gz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
```
Signed-off-by: Martina Iglesias Fernandez <martina@roadie.io>
* add lunr package
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
* add search translator type and search engine interface
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
* (wip) add support for lunr search engine
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
* lunr search engine support
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
* clean up todo comments
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
* typing and cleanups
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
* move lunr type package from dev deps to deps
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
* check if documents exist to index
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
* test fixup
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
* changeset
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
* move LunrSearchEngine.ts to /engines and add tests
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
* update imports
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
* update error message
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
* add comment to index rotation
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
* Update plugins/search-backend-node/src/types.ts
Signed-off-by: Fredrik Adelöw freben@gmail.com
Co-authored-by: Fredrik Adelöw <freben@gmail.com>
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
* Update plugins/search-backend-node/src/engines/LunrSearchEngine.ts
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
Co-authored-by: Fredrik Adelöw <freben@gmail.com>
* Update plugins/search-backend-node/src/engines/LunrSearchEngine.ts
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
Co-authored-by: Fredrik Adelöw <freben@gmail.com>
* fix imports
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
* use type assertion to specify more specific ConcreteLunrQuery type
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
* fix imports
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
* consistent naming
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
* change search engine to be parameter of constructor in indexBuilder
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
* make engine required in router options and pass it through in createRouter used in standalone server
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
* fix tests
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
* delete import
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
* add types to SearchQuery interface to make it possible to scope to specific index + test
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
* clean up tests
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
* handle case when a filter is added on a field that does not exist on all documents + test
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
Co-authored-by: Fredrik Adelöw <freben@gmail.com>
In order to use this plugin, you must set the
`backstage.io/code-coverage` annotation on your entity.
```yaml
backstage.io/code-coverage: enabled
```
There's a feature to only include files that are in SCM in the coverage
report, this is helpful to not count generated files for example. To
enable this set the `backstage.io/code-coverage` annotation to
`scm-only`.
```yaml
backstage.io/code-coverage: scm-only
```
The backend plugin provides API endpoints for submitting code-coverage
reports. Currently jacoco and cobertura are supported. These reports
are normalized to a json format that is stored in the database.
```json
// curl -X POST -H "Content-Type:text/xml" -d @cobertura.xml "localhost:7000/api/code-coverage/Component/default/entity-name?coverageType=cobertura"
{
"links": [
{
"href": "http://localhost:7000/api/code-coverage/Component/default/entity-name",
"rel": "coverage"
}
]
}
```
It also provides some additional API endpoints:
* Viewing the latest report
* Viewing a more condensed history of code coverage values
* Retrieving file contents from source-control, used by the UI
Provides a graph of code coverage change over time, as well as a file
view where you can see the highlighted lines.
Co-authored-by: nissayeva <natashaaay@gmail.com>
Signed-off-by: alde <r.dybeck@gmail.com>
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This change includes a new `mode` concept to the catalog backend. This gives us
the handle to configure catalog in a `readonly` mode as discussed in #3348.
The new `catalog.mode` field configures that catalog in either `readwrite` or
`readonly`.
- `readwrite` is the current mode that allows users to register components at
startup through `catalog.locations` and with eg. plugin `catalog-import`
- `readonly` is the new mode which, for now, disables the mutating `location`
APIs
Signed-off-by: Crevil <bjoern.soerensen@gmail.com>