Commit Graph

420 Commits

Author SHA1 Message Date
blam 9458ea5f5d chore: fixing tests with new breaking change
Signed-off-by: blam <ben@blam.sh>
2021-06-23 11:07:13 +02:00
dependabot[bot] d3b6c6c12a chore(deps): bump msw from 0.21.2 to 0.29.0
Bumps [msw](https://github.com/mswjs/msw) from 0.21.2 to 0.29.0.
- [Release notes](https://github.com/mswjs/msw/releases)
- [Changelog](https://github.com/mswjs/msw/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mswjs/msw/compare/v0.21.2...v0.29.0)

---
updated-dependencies:
- dependency-name: msw
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-23 04:45:44 +00: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
github-actions[bot] 36e5a82e9b Version Packages 2021-06-17 08:08:44 +00:00
Minn Soe 78830d3b7e fix: limit helpers from db manager connections
Signed-off-by: Minn Soe <contributions@minn.io>
2021-06-15 18:21:12 +01:00
Minn Soe 1753dae28a fix: limit database manager exports and update changeset
Signed-off-by: Minn Soe <contributions@minn.io>
2021-06-15 17:50:25 +01:00
Patrik Oldsberg a4a96e424a backend-common: restore informative error message for database check
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2021-06-15 17:51:34 +02:00
Patrik Oldsberg 05c98f1f79 Merge branch 'master' into add-support-for-plugin-specific-db 2021-06-15 17:49:50 +02:00
Patrik Oldsberg e5cdf0560f backend-common: clarify DB connection error
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2021-06-15 11:56:08 +02:00
github-actions[bot] 4a93128245 Version Packages 2021-06-10 12:18:06 +00:00
Minn Soe f1a9108c53 refactor: add defaultNameOverride and reorganize
Signed-off-by: Minn Soe <contributions@minn.io>
2021-06-10 11:14:40 +01:00
Minn Soe 214efffe3a refactor: move database connector interface
Signed-off-by: Minn Soe <contributions@minn.io>
2021-06-10 11:14:40 +01:00
Minn Soe dc75c78cd7 refactor: split up database manager private methods
Signed-off-by: Minn Soe <contributions@minn.io>
2021-06-10 11:14:40 +01:00
Minn Soe 5a3ce34072 refactor: migrate from deprecated database manager
Changes:
- Swaps out `SingleConnectionDatabaseManager` to `DatabaseManager`
  across the repo.
- Updates `backend-test-utils` to generate test plugin names prefixed
  with db to satisfy plugin naming constraint, e.g. 0 becomes db0.

Signed-off-by: Minn Soe <contributions@minn.io>
2021-06-10 11:14:40 +01: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 ef1d705b76 fix: make plugin database getDatabaseName private
Signed-off-by: Minn Soe <contributions@minn.io>
2021-06-10 11:14:40 +01:00
Minn Soe a9c4f0531f fix: sqlite3 memory typo and drop leading asterisk doc
Signed-off-by: Minn Soe <contributions@minn.io>
2021-06-10 11:14:40 +01:00
Minn Soe 2ff816060d fix: ensure underlying connector promise passed up
Signed-off-by: Minn Soe <contributions@minn.io>
2021-06-10 11:14:40 +01:00
Minn Soe 4e0fdcb968 test: add coverage for existing manager behaviour
Signed-off-by: Minn Soe <contributions@minn.io>
2021-06-10 11:14:40 +01:00
Minn Soe 630b75798a fix: return type of ensureDatabaseExists and run api-report
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
Fredrik Adelöw 2e7d86c131 unbreak windows builds
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2021-06-09 11:15:54 +02:00
Fredrik Adelöw 5623e30cdc Merge pull request #5920 from goober/bugfix/keep-executable-permissions-on-downloaded-archives
Download tar.gz archives for Bitbucket
2021-06-08 15:26:46 +02:00
Tim Hansen 92963779b5 Remove default upgrade-insecure-requests
Co-authored-by: Mike Lewis <mtlewis@users.noreply.github.com>
Co-authored-by: Himanshu Mishra <himanshu@orkohunter.net>
Signed-off-by: Tim Hansen <timbonicus@gmail.com>
2021-06-04 10:20:02 -06:00
Mathias Åhsberg eda9dbd5fa Download tar.gz archives for Bitbucket
Signed-off-by: Mathias Åhsberg <mathias.ahsberg@resurs.se>
2021-06-04 12:46:42 +00:00
github-actions[bot] 18285453eb Version Packages 2021-05-20 11:48:46 +00:00
Eric Peterson 023c75404d Update Public API
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
2021-05-19 16:57:18 +02:00
Eric Peterson f2d9f5ecb9 Move error handler to CacheManager from Client.
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
2021-05-19 10:50:58 +02:00
Eric Peterson 6f6ebd248f Prettier
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
2021-05-19 10:50:58 +02:00
Eric Peterson 3839c2d9bc Add an onError handler to getClient options
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
2021-05-19 10:50:58 +02:00
Eric Peterson 96e3be74c2 Minor fixes from last round of review.
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
2021-05-19 10:50:57 +02:00
Fredrik Adelöw 8bedbcac26 Merge pull request #5599 from adrianke77/techdocs-gitlab-url-reader-compare-commit-sha-for-filepath-only
GitlabUrlReader to check for modified with SHA of only commits that modify filepath
2021-05-18 08:52:39 +02:00
Chongyang Adrian, Ke b57db403ac use UrlSearchParams
Signed-off-by: Chongyang Adrian, Ke <ftt.adrian.ke@grabtaxi.com>
2021-05-18 10:35:40 +08:00
jrusso1020 14ed269407 feedback
Signed-off-by: jrusso1020 <jrusso@brex.com>
2021-05-17 09:52:00 -04:00
Chongyang Adrian, Ke 5001de9088 GitlabUrlReader compare SHA commits for filepath if given
Signed-off-by: Chongyang Adrian, Ke <ftt.adrian.ke@grabtaxi.com>
2021-05-17 09:57:08 +08:00
jrusso1020 65e6c45410 Remove circular dependencies
In reference to issue #5563 this does the initial work to remove
all the circular dependencies that we have encountered while
building backstage using bazel. The next step will be to implement
a method to catch these circular dependencies before they get
merged in

Signed-off-by: jrusso1020 <jrusso@brex.com>
2021-05-15 11:17:05 -06:00
github-actions[bot] df31bdca8f Version Packages 2021-05-12 09:39:51 +00:00
Fredrik Adelöw dd8a0df53a Merge pull request #5625 from backstage/freben/mysql-prep
Prep work for mysql support in backend-common
2021-05-12 10:00:18 +02:00
Eric Peterson a8c70b3ae4 Maybe not THAT transparent.
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
2021-05-10 18:45:31 +02:00
Fredrik Adelöw f9fb4a205e Prep work for mysql support in backend-common
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2021-05-10 11:30:11 +02:00
Eric Peterson 6e2b9a92d6 Updating backend-common API
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
2021-05-09 18:16:24 +02:00
Eric Peterson 03ae33c064 Prettier
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
2021-05-09 18:08:57 +02:00
Eric Peterson 38e943da0c Implement a NoStore cache backend, and do not provide a cache backend by default.
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
2021-05-09 17:52:06 +02:00
Eric Peterson d6936dcbde Swap out cache-manager for Keyv implementation.
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
2021-05-09 17:11:04 +02:00
Eric Peterson 884c2bd54f Update docs to reflect changes
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
2021-05-09 15:25:34 +02:00
Eric Peterson 7ff6a75575 Add an onError config to enable plugin devs to catch and handle underlying client errors
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
2021-05-09 15:25:34 +02:00
Eric Peterson 368a5158cc Return an explicit undefined on no data.
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
2021-05-09 15:25:34 +02:00
Eric Peterson b71c230beb Refactor CacheManager.fromConfig
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
2021-05-09 15:25:34 +02:00
Eric Peterson cc60475127 Clarify default TTL behavior.
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
2021-05-09 15:25:34 +02:00
Eric Peterson b73dc5f46e Clean up some types
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
2021-05-09 15:25:34 +02:00