Joe Porpeglia
f911a60baf
Update api-report
...
Signed-off-by: Joe Porpeglia <josephp@spotify.com >
2022-01-18 12:43:35 -05:00
Joe Porpeglia
cd3c5b132e
Update package exports to align with ADR004
...
Signed-off-by: Joe Porpeglia <josephp@spotify.com >
2022-01-18 12:43:35 -05:00
Joe Porpeglia
ccaa50511f
Make getCacheKey sync
...
Signed-off-by: Joe Porpeglia <josephp@spotify.com >
2022-01-18 12:43:35 -05:00
Joe Porpeglia
63e8b8605e
Disable catalog permission middleware unless permission.enabled = true
...
Signed-off-by: Joe Porpeglia <josephp@spotify.com >
2022-01-18 12:43:35 -05:00
Joe Porpeglia
17ebcb09cd
Refactor router tests
...
Adds a `createApp` helper instead of creating the express app in `beforeEach`. This allows tests to mock behavior of router creation, like toggling certain middleware based on config values.
Signed-off-by: Joe Porpeglia <josephp@spotify.com >
2022-01-18 12:43:35 -05:00
Joe Porpeglia
f1918143e5
Compute cache keys from tokens instead of user entity refs
...
Signed-off-by: Joe Porpeglia <josephp@spotify.com >
2022-01-18 12:43:35 -05:00
Joe Porpeglia
e9857d0b82
Remove 403 handling logic
...
Signed-off-by: Joe Porpeglia <josephp@spotify.com >
2022-01-18 12:43:35 -05:00
Joe Porpeglia
d9afa2e882
Add tests to verify /static/docs behavior
...
Signed-off-by: Joe Porpeglia <josephp@spotify.com >
2022-01-18 12:43:35 -05:00
Joe Porpeglia
c2f54048d1
Use catalog: prefix for catalog entity cache
...
Signed-off-by: Joe Porpeglia <josephp@spotify.com >
2022-01-18 12:43:35 -05:00
Joe Porpeglia
413c9fab08
Cancel cache read if it takes too long
...
Signed-off-by: Joe Porpeglia <josephp@spotify.com >
2022-01-18 12:43:35 -05:00
Joe Porpeglia
f5598677bf
Set cache value asynchronously
...
Signed-off-by: Joe Porpeglia <josephp@spotify.com >
2022-01-18 12:43:35 -05:00
Joe Porpeglia
45f37c9835
Use CachedEntityLoader in techdocs router
...
Signed-off-by: Joe Porpeglia <josephp@spotify.com >
2022-01-18 12:43:35 -05:00
Joe Porpeglia
7dcc6b1fe6
Add CachedEntityLoader for techdocs
...
Signed-off-by: Joe Porpeglia <josephp@spotify.com >
2022-01-18 12:43:35 -05:00
Joe Porpeglia
b76fec242d
Verify access to related catalog entities for all techdocs api routes
...
Signed-off-by: Joe Porpeglia <josephp@spotify.com >
Co-authored-by: Nataliya Issayeva <nissayeva@users.noreply.github.com >
2022-01-18 12:43:35 -05:00
Fredrik Adelöw
5333451def
Got rid of the last brace-typed and hyphen-less params etc
...
Signed-off-by: Fredrik Adelöw <freben@gmail.com >
2022-01-10 09:48:12 +01:00
Erik Larsson
da676a49ab
fixes api auth bug in techdocs backend
...
Signed-off-by: Erik Larsson <erik.larsson@schibsted.com >
2021-12-22 22:16:49 +01:00
Eric Peterson
8c25c3ea5b
Allow TechDocs cache in recommended deployment mode.
...
Signed-off-by: Eric Peterson <ericpeterson@spotify.com >
2021-12-21 12:02:45 +01:00
Fredrik Adelöw
dcd1a0c3f4
Do not unpack arguments directly on exported items
...
Signed-off-by: Fredrik Adelöw <freben@gmail.com >
2021-12-07 19:42:10 +01:00
Eric Peterson
ef600b3c8c
Review feedback.
...
Signed-off-by: Eric Peterson <i.am@eric.pe >
2021-12-05 16:50:09 -06:00
Eric Peterson
6e9e82b99d
Review feedback.
...
Signed-off-by: Eric Peterson <i.am@eric.pe >
2021-11-28 13:40:51 -07:00
Eric Peterson
e0930f578e
en-US lowercase locale
...
Signed-off-by: Eric Peterson <ericpeterson@spotify.com >
2021-11-28 13:16:04 -07:00
Eric Peterson
ef04b09f75
Make cache readTimeout configurable.
...
Signed-off-by: Eric Peterson <ericpeterson@spotify.com >
2021-11-28 13:16:04 -07:00
Eric Peterson
da0867f952
Account for legacy path casing in cache invalidation.
...
Signed-off-by: Eric Peterson <ericpeterson@spotify.com >
2021-11-28 13:16:04 -07:00
Eric Peterson
8cf4684a4e
Remove cache invalidation endpoint from middleware.
...
Signed-off-by: Eric Peterson <ericpeterson@spotify.com >
2021-11-28 13:16:04 -07:00
Eric Peterson
a3909d2c2f
Invalidate stale cache entries on read for external builder config when cache is enabled.
...
Signed-off-by: Eric Peterson <ericpeterson@spotify.com >
2021-11-28 13:16:04 -07:00
Eric Peterson
d011fd61ea
Ensure DocsSynchronizer has access to cache client.
...
Signed-off-by: Eric Peterson <ericpeterson@spotify.com >
2021-11-28 13:16:04 -07:00
Eric Peterson
74ccd66e26
Add tests for cache middleware. Do not cache non-200 responses.
...
Signed-off-by: Eric Peterson <ericpeterson@spotify.com >
2021-11-28 13:16:04 -07:00
Eric Peterson
a16dce0433
Tests for TechDocsCache class
...
Signed-off-by: Eric Peterson <ericpeterson@spotify.com >
2021-11-28 13:16:04 -07:00
Eric Peterson
693db1da54
Review feedback.
...
Signed-off-by: Eric Peterson <ericpeterson@spotify.com >
2021-11-28 13:16:04 -07:00
Eric Peterson
790f02c898
Improve types/documentation.
...
Signed-off-by: Eric Peterson <ericpeterson@spotify.com >
2021-11-28 13:16:04 -07:00
Eric Peterson
0a44eb7d52
Initial implementation of TechDocs cache in backend plugin
...
Signed-off-by: Eric Peterson <ericpeterson@spotify.com >
2021-11-28 13:16:03 -07:00
Eric Peterson
3e443e8e31
Express middleware for reading/writing data to cache.
...
Signed-off-by: Eric Peterson <ericpeterson@spotify.com >
2021-11-28 13:13:30 -07:00
MT Lewis
456bcce6ca
Merge pull request #7943 from backstage/natasha/b2b-auth
...
Support backend to backend authentication
2021-11-26 15:31:52 +00:00
MT Lewis
87f1b59ff9
techdocs-backend: update TokenManager mock in collator test suite
...
Signed-off-by: MT Lewis <mtlewis@users.noreply.github.com >
2021-11-26 12:16:38 +00:00
Fredrik Adelöw
b055a6addc
Align on usage of cross-fetch vs node-fetch in frontend vs backend packages
...
Signed-off-by: Fredrik Adelöw <freben@gmail.com >
2021-11-25 13:05:08 +01:00
Mike Lewis
4b6de2f872
backend-common: remove 'Server' from TokenManager method names
...
Signed-off-by: Mike Lewis <mtlewis@users.noreply.github.com >
2021-11-23 18:12:28 +00:00
Mike Lewis
8a001f8202
backend-common: TokenManager throws for invalid tokens rather than returning boolean
...
Signed-off-by: Mike Lewis <mtlewis@users.noreply.github.com >
2021-11-23 17:55:47 +00:00
Nataliya Issayeva
f04f38dbcd
Fix collator tests
...
Signed-off-by: Nataliya Issayeva <nissayeva@users.noreply.github.com >
2021-11-18 07:57:53 -08:00
Joe Porpeglia
2a320c21b4
Pass auth token from document collators
...
Co-authored-by: Nataliya Issayeva <nissayeva@users.noreply.github.com >
Co-authored-by: Tim Hansen <timbonicus@gmail.com >
Signed-off-by: Joe Porpeglia <josephp@spotify.com >
2021-11-18 07:55:25 -08:00
Oliver Sand
106a5dc3ad
Restore original casing for kind, namespace and name in DefaultTechDocsCollator
...
Signed-off-by: Oliver Sand <oliver.sand@sda-se.com >
2021-10-27 14:30:40 +02:00
Johan Haals
f1e96dc5b1
chore/cli: Replace msw with setupRequestMockHandlers
...
Signed-off-by: Johan Haals <johan.haals@gmail.com >
2021-10-26 10:54:47 +02:00
Patrik Oldsberg
82a7349d29
Merge pull request #7640 from kuangp/refactor/searchResultTitles
...
refactor(search): display entity title for result items if defined
2021-10-21 00:21:34 +02:00
Patrik Oldsberg
36e67d2f24
more strict error type checking in most packages and backend plugins
...
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com >
2021-10-17 15:09:05 +02:00
Phil Kuang
177401b571
refactor(search): display entity title for result items if defined
...
Signed-off-by: Phil Kuang <pkuang@factset.com >
2021-10-15 14:44:50 -04:00
Patrik Oldsberg
d0d78ebc7c
Merge pull request #7181 from backstage/rugvip/descriptions
...
Add package descriptions + separate table for plugins in API reference
2021-09-15 17:25:27 +02:00
Jussi Hallila
9fb0503c15
Tweak lowecasing, export Optios type
...
Signed-off-by: Jussi Hallila <jussi@hallila.com >
2021-09-15 15:31:03 +02:00
Patrik Oldsberg
8142a8ecb2
packages,plugins: add package documentation
...
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com >
2021-09-14 18:47:53 +02:00
Jussi Hallila
65a2d67735
Modify fromConfig to actually use the config. Update api-reports.
...
Signed-off-by: Jussi Hallila <jussi@hallila.com >
2021-09-13 09:54:12 +02:00
Jussi Hallila
f7c06bcadd
Add some more casing changes.
...
Modify DefaultTechDocsCollator to have a static constructor method.
Signed-off-by: Jussi Hallila <jussi@hallila.com >
2021-09-09 11:57:14 +02:00
Jussi Hallila
6f45fc7990
Modify TechDocsCollator to be aware of new urls
...
* Add boolean constructor param to define if to use legacy paths
* Swap urls to match new pattern
* Add few tests
Signed-off-by: Jussi Hallila <jussi@hallila.com >
2021-09-03 16:00:00 +02:00