Commit Graph

382 Commits

Author SHA1 Message Date
Himanshu Mishra 1e7427d3c7 example-backend: log info about create-app and update readme
Signed-off-by: Himanshu Mishra <himanshu@orkohunter.net>
2021-06-21 15:42:12 +02:00
Himanshu Mishra 66557e61cb example-backend: use a shared root logger inside main
Signed-off-by: Himanshu Mishra <himanshu@orkohunter.net>
2021-06-21 15:28:59 +02:00
Fredrik Adelöw a88073c29a Update copyright headers
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2021-06-18 20:26:42 +02:00
Patrik Oldsberg 05c98f1f79 Merge branch 'master' into add-support-for-plugin-specific-db 2021-06-15 17:49:50 +02:00
Johan Haals a0f2f63374 Merge pull request #5901 from backstage/jhaals/legacy-catalog
Catalog: Make the new processing engine the default
2021-06-15 11:40:53 +02:00
Johan Haals f68632411b catalog: Reuse builder for next/legacy catalog
Co-authored-by: Patrik Oldsberg <poldsberg@gmail.com>
Signed-off-by: Johan Haals <johan.haals@gmail.com>
2021-06-14 16:10:18 +02:00
github-actions[bot] 4a93128245 Version Packages 2021-06-10 12:18:06 +00:00
Minn Soe 2976f3bae3 refactor: rename and deprecate database manager
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>
2021-06-10 11:14:40 +01:00
Minn Soe 772dbdb511 feat: add database manager with per plugin config
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>
2021-06-10 11:14:40 +01:00
Eric Peterson 5c9c34dee9 Merge pull request #5927 from backstage/iameap/search-alpha-release
[Search] Initial, Alpha Release
2021-06-09 19:21:15 +02:00
Fredrik Adelöw 4f8cf50fe5 Update past the broken gitbeaker version
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2021-06-08 09:14:07 +02:00
Eric Peterson 0a032c55ce Fix bug causing search to be empty initially.
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
2021-06-04 20:09:28 +02:00
Camila Belo 9f31301bc8 fix: reset Lunr refresh interval
Signed-off-by: Camila Belo <camilaibs@gmail.com>
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
2021-06-03 16:28:05 +02:00
Eric Peterson 455b97b127 Make type(s) readonly properties of Collator/Decorator classes
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
2021-06-03 16:28:05 +02:00
Emma Indal 720fd2f360 prettier
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
2021-06-03 16:28:04 +02:00
Johan Haals 8650112701 Catalog: Enable new processing engine
Signed-off-by: Johan Haals <johan.haals@gmail.com>
2021-06-03 11:13:17 +02:00
github-actions[bot] b5a0d1c5d7 Version Packages 2021-05-27 10:23:15 +00:00
dependabot[bot] 3ef3485b01 chore(deps): bump @gitbeaker/node from 28.2.0 to 29.2.0
Bumps [@gitbeaker/node](https://github.com/jdalrymple/gitbeaker) from 28.2.0 to 29.2.0.
- [Release notes](https://github.com/jdalrymple/gitbeaker/releases)
- [Changelog](https://github.com/jdalrymple/gitbeaker/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jdalrymple/gitbeaker/compare/28.2.0...29.2.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-20 12:30:26 +00:00
github-actions[bot] df31bdca8f Version Packages 2021-05-12 09:39:51 +00:00
Eric Peterson 6e0be00e1d Wrap cache clients in a Backstage-specific CacheClient to handle key normalization and error handling + allow us the freedom to move away from cache-manager in the future if necessary.
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
2021-05-09 15:24:47 +02:00
Eric Peterson 93ff8275dd WIP store-agnostic cache manager.
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
2021-05-09 15:24:40 +02:00
Johan Haals 0bfcc4323a Merge pull request #5587 from backstage/mob/wire-locationservice
catalog/next: Wire API with locationStore, fix filtering
2021-05-06 13:30:28 +02:00
github-actions[bot] d397eb470f Version Packages 2021-05-06 08:25:18 +00:00
Johan Haals 1f1511e768 catalog/next: Wire API with locationStore, fix filtering
Co-authored-by: Ben Lambert <ben@blam.sh>
Co-authored-by: Fredrik Adelöw <freben@users.noreply.github.com>
Signed-off-by: Johan Haals <johan.haals@gmail.com>
2021-05-05 16:38:14 +02:00
Dominik Henneke 42f2adadc8 Merge pull request #5415 from SDA-SE/feat/rundocker-api
Refactor the runDockerContainer function to a ContainerRunnerApi interface
2021-05-05 12:00:40 +02:00
Johan Haals 45ca6c7699 Refactor StateManager into the ProcessingEngine
And add some tests

Co-authored-by: Ben Lambert <ben@blam.sh>
Signed-off-by: Johan Haals <johan.haals@gmail.com>
2021-05-04 09:39:00 +02:00
Dominik Henneke e0bfd3d448 Refactor the runDockerContainer function to a ContainerRunner interface.
Signed-off-by: Dominik Henneke <dominik.henneke@sda-se.com>
2021-05-03 14:16:28 +02:00
Fredrik Adelöw 2b59ff4299 Merge pull request #5556 from backstage/dependabot/npm_and_yarn/octokit/auth-app-3.4.0
chore(deps): bump @octokit/auth-app from 2.10.5 to 3.4.0
2021-05-03 12:58:55 +02:00
Fredrik Adelöw 38ca051682 The default @octokit/rest dependency was bumped to "^18.5.3".
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2021-05-03 11:15:22 +02:00
Fredrik Adelöw b99ac3f6e1 Minor composability etc docs changes
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2021-05-02 22:13:05 +02:00
Eric Peterson a99e0bc42c [Search] Improvements to DefaultCatalogCollator (#5491)
* 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>
2021-04-29 11:38:21 +02:00
Patrik Oldsberg cfdc972ea2 Merge pull request #5454 from RoadieHQ/docker/fix-dockerfile
[docker] Fix error in docker build
2021-04-28 10:58:38 +02:00
Emma Indal 50b15bfeb3 imports and exports
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
2021-04-26 16:44:32 +02:00
Emma Indal 9dff1a9839 use scheduler and fix tests
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
2021-04-26 16:43:58 +02:00
Martina Iglesias Fernandez 43db3d6892 [docker] Fix error in docker build
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>
2021-04-26 10:06:51 +02:00
Emma Indal cdda9c671d move refresh loop to builder and use configured refreshInterval
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
2021-04-23 15:03:32 +02:00
github-actions[bot] 034998d537 Version Packages 2021-04-22 13:19:35 +00:00
Emma Indal b9b2b4b766 [Search] Lunr search engine support (#5290)
* 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>
2021-04-22 15:03:10 +02:00
alde e7d2fb93f0 Create code-coverage plugin
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>
2021-04-21 12:58:18 +02:00
Patrik Oldsberg df8e6f1dc4 Merge pull request #5372 from backstage/mob/catalog-refactor
Initial iteration of the next software catalog
2021-04-20 11:44:44 +02:00
Johan Haals ec43f706c7 Copy migrations to migrationsv2 before migration
Co-authored-by: Fredrik Adelöw <freben@users.noreply.github.com>
Co-authored-by: Patrik Oldsberg <poldsberg@gmail.com>
Signed-off-by: Johan Haals <johan.haals@gmail.com>
2021-04-19 10:53:57 +02:00
Johan Haals 8f6a17c04c Add experimental option to start the new catalog
Signed-off-by: Johan Haals <johan.haals@gmail.com>
2021-04-14 10:47:10 +02:00
Dominik Henneke d541d9fd07 Include review comments
Signed-off-by: Dominik Henneke <dominik.henneke@sda-se.com>
2021-04-12 18:50:15 +02:00
Patrik Oldsberg da2281df89 Merge pull request #5088 from ntgussoni/fix/DOCS-remove_add_for_copy
[DOCS/CLI, DOCKER] Fixes untar not happening under certain conditions
2021-04-08 12:48:56 +02:00
github-actions[bot] 8e00ab7e63 Version Packages 2021-03-31 12:21:12 +00:00
Ben Lambert 80e92b8f48 Merge pull request #5034 from lunarway/feature/catalog-mode
Add readonly mode to catalog-backend
2021-03-26 15:13:56 +01:00
Crevil f1b2c1d2c2 Add readonly mode to catalog
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>
2021-03-25 20:59:33 +01:00
github-actions[bot] 844da89090 Version Packages 2021-03-25 17:46:13 +00:00
Eric Peterson bb378ac6f2 Merge pull request #4515 from backstage/iameap/search-indexer
[Search] Foundation: plugins and types
2021-03-25 13:15:33 +01:00
Nicolas Torres 2ae8cf4608 Fixes untar not happening under certain occasions
Signed-off-by: Nicolas Torres <nicolast@backbase.com>
2021-03-25 09:00:10 +01:00