Commit Graph

290 Commits

Author SHA1 Message Date
Patrik Oldsberg de48939447 Merge pull request #7461 from backstage/rugvip/errors
[PRFC] errors: add isError, assertError and ErrorLike type
2021-10-20 13:07:49 +02:00
Patrik Oldsberg f316d05889 Merge pull request #7649 from backstage/rugvip/noglobals
techdocs-common: avoid global type declarations
2021-10-19 12:53:46 +02:00
Camila Belo dfd03b5aa6 chore(techdocs-common): bump default docker image
A new release of `techdocs-container` has been published and as recommended [here](https://github.com/backstage/techdocs-container#release) the default container image used by the Techdocs Generator has been changed.

Signed-off-by: Camila Belo <camilaibs@gmail.com>
2021-10-18 18:38:23 +02:00
Patrik Oldsberg b81299a332 techdocs-common: avoid global type declarations
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2021-10-17 15:25:57 +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
Emma Indal 156421c59a [TechDocs] Update default techdocs docker image to latest version (#7448)
* 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>
2021-10-05 13:57:55 +02:00
Eric Peterson 7f8f1f2689 Clean up documentation.
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
2021-09-29 15:55:20 +02:00
Eric Peterson e92f0f728b Lock TechDocs generation to specific container version.
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
2021-09-29 15:42:36 +02:00
Crevil b0e5325e7b Use warn log level
Signed-off-by: Crevil <bjoern.soerensen@gmail.com>
2021-09-28 21:02:04 +02:00
Crevil 593db0864d Expand Techdocs not found error handling
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>
2021-09-28 14:08:28 +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
Eric Peterson dc152e0da6 Merge pull request #6773 from SDA-SE/feat/techdocs-repo-url
[Techdocs] Set the correct edit_uri or repo_url for documentation pages that are hosted on GitHub and GitLab
2021-09-01 19:11:29 +02:00
Eric Peterson b894b4cfb9 Explicit assertion for linting.
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
2021-08-31 10:25:40 +02:00
Eric Peterson 31d4a456bf Update local publisher reader to respect case configs on read.
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
2021-08-30 20:00:01 +02:00
Eric Peterson dd35e9e59f Make local publisher respect case expectations/configs.
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
2021-08-30 18:36:23 +02:00
Jussi Hallila 30ed662a35 Implement in-context search bar for tech docs. (#6651)
* 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>
2021-08-27 12:21:48 +02:00
Dominik Henneke 67ba7e088a Only write the updated mkdocs.yml file if the content was updated
Signed-off-by: Dominik Henneke <dominik.henneke@sda-se.com>
2021-08-27 09:00:37 +02:00
Dominik Henneke 8b0f6f860f Set the correct edit_uri or repo_url for documentation pages that are hosted on GitHub and GitLab
Signed-off-by: Dominik Henneke <dominik.henneke@sda-se.com>
2021-08-27 09:00:37 +02:00
Camila Belo 38b9bd9c63 Fix test describes
Signed-off-by: Camila Belo <camilaibs@gmail.com>
2021-08-26 13:26:55 +02:00
Camila Belo b281d3a7f9 apply review suggestions
Signed-off-by: Camila Belo <camilaibs@gmail.com>
2021-08-26 13:08:11 +02:00
Camila Loiola 5f37569058 fix: force using posix path for cloud storages
Co-authored-by: Emma Indal <emma.indahl@gmail.com>
Co-authored-by: Otto Sichert
<git@ottosichert.de>

Signed-off-by: Camila Loiola <camilaibs@gmail.com>
2021-08-26 12:53:10 +02:00
Mert Can Bilgiç 58452cdb72 OpenStack Swift SDK changed from "pkgcloud" to Trendyol's own OpenStack Swift SDK (#6839) 2021-08-25 22:16:10 +02:00
Eric Peterson 0d48fccb46 Merge branch 'master' into techdocs-common/case-sensitive-migration
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
2021-08-12 16:28:40 +02:00
Camila Belo 7d58b5331a fix(techdocs-common): adjust azure storage test
Signed-off-by: Camila Belo <camilaibs@gmail.com>
2021-08-12 15:24:39 +02:00
Eric Peterson 52547371fb Merge branch 'master' into techdocs-common/case-sensitive-migration
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
2021-08-12 11:27:43 +02:00
Eric Peterson 0c58dd73d0 Merge pull request #6488 from backstage/feat/techdocs-deleted-pages
Remove stale TechDocs artifacts after publishing new version
2021-08-10 18:46:24 +02:00
Eric Peterson c2d6c8054d Publish should not be blocked on inability to list
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
2021-08-09 14:38:33 +02:00
Fredrik Adelöw 923491eece run prettier formatting
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2021-08-09 11:54:38 +02:00
Camila Belo 9181e8c6e0 tests(techdocs-common): add globals and types for mocked files
Signed-off-by: Camila Belo <camilaibs@gmail.com>
2021-08-09 09:36:42 +02:00
Camila Belo 759f15a14a test(techdocs-common): refactor storage files mock
Signed-off-by: Camila Belo <camilaibs@gmail.com>
2021-08-07 22:00:38 +02:00
Camila Belo bf4ab56750 feat(techdocs-common): add legacy casing config for all providers
Co-authored-by: Eric Peterson <ericpeterson@spotify.com>
Signed-off-by: Camila Belo <camilaibs@gmail.com>
2021-08-06 11:05:31 +02:00
Camila Belo a7a55632d3 test(techdocs-common): fix failing tests for all providers
Co-authored-by: Eric Peterson <ericperterson@spotify.com>
Signed-off-by: Camila Belo <camilaibs@gmail.com>
2021-08-05 15:33:10 +02:00
Camila Belo a72470c193 feat(techdocs-common): lowercase entity triplet path for Azure
Signed-off-by: Camila Belo <camilaibs@gmail.com>
2021-08-04 12:12:14 +02:00
Camila Belo 1fb4b4eb44 feat(techdocs-common): lowercase entity triplet path for AWS
Signed-off-by: Camila Belo <camilaibs@gmail.com>
2021-08-04 12:12:14 +02:00
Camila Belo af8e1d1b6d feat(techdocs-common): lowercase entity triplet path for GCS
Signed-off-by: Camila Belo <camilaibs@gmail.com>
2021-08-04 12:12:00 +02:00
Camila Belo 822240373e refactor(techdocs-common): use continuation token for listing blob files
Co-authored-by: Eric Peterson <ericpeterson@spotify.com>
Signed-off-by: Camila Belo <camilaibs@gmail.com>
2021-08-03 17:16:42 +02:00
Camila Belo 5486071aa8 test(techdocs-common): cover bulkStorageOperation helper
Signed-off-by: Camila Belo <camilaibs@gmail.com>
2021-08-03 11:52:19 +02:00
Camila Belo 7eef84a040 test(techdocs-common): cover getCloudPathForLocalPath helper
Signed-off-by: Camila Belo <camilaibs@gmail.com>
2021-08-03 10:28:15 +02:00
Camila Belo ab9b315e2a test(techdocs-common): cover getStaleFiles helper
Signed-off-by: Camila Belo <camilaibs@gmail.com>
2021-08-03 09:34:12 +02:00
Camila Belo 9cf37164b1 test(techdocs-common): cover stale files deletion for Azure
Signed-off-by: Camila Belo <camilaibs@gmail.com>
2021-08-03 09:34:12 +02:00
Camila Belo 5386bcc989 test(techdocs-common): cover stale files deletion for AWS
Signed-off-by: Camila Belo <camilaibs@gmail.com>
2021-08-03 09:34:12 +02:00
Camila Belo da705a74e0 test(techdocs-common): cover stale files deletion for GCS
Signed-off-by: Camila Belo <camilaibs@gmail.com>
2021-08-03 09:34:12 +02:00
Camila Belo caf519f69c fix(techdocs): make aws and gcs tests pass
Co-authored-by: Eric Peterson <ericpeterson@spotify.com>
Signed-off-by: Camila Belo <camilaibs@gmail.com>
2021-08-03 09:34:12 +02:00
Camila Belo 6f9e155973 fix(techdocs): make azure tests pass
Co-authored-by: Eric Peterson <ericpeterson@spotify.com>
Signed-off-by: Camila Belo <camilaibs@gmail.com>
2021-08-03 09:34:12 +02:00
Camila Belo fedf69a396 fix(techdocs): remove unused imported module
Signed-off-by: Camila Belo <camilaibs@gmail.com>
2021-08-03 09:34:12 +02:00
Camila Belo 064f8d2487 feat(techdocs): delete stale files when publishing to Azure
Signed-off-by: Camila Belo <camilaibs@gmail.com>
2021-08-03 09:34:12 +02:00
Otto Sichert 06b507283b WIP: Remove stale TechDOcs files from AWS
Signed-off-by: Otto Sichert <git@ottosichert.de>
2021-08-03 09:34:12 +02:00
Otto Sichert be87bc0584 Remove stale TechDocs artifacts after publishing new version for GCS
Co-authored-by: Camila Belo <camilaibs@gmail.com>
Co-authored-by: Eric Peterson <ericpeterson@spotify.com>
Signed-off-by: Otto Sichert <git@ottosichert.de>
2021-08-03 09:34:12 +02:00
Eric Peterson 8ef28f5dbc Remove all legacy preparer code and dependencies.
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
2021-07-28 18:45:51 +02:00
Eric Peterson aa4c00f4be Merge pull request #6634 from backstage/mob/yaml-support
[TechDocs] Add support for mkdocs.yaml
2021-07-28 16:18:05 +02:00