Commit Graph

402 Commits

Author SHA1 Message Date
github-actions[bot] 3369ade8c0 Version Packages 2021-11-11 11:07:58 +00:00
Patrik Oldsberg 12eaaaba28 Merge pull request #7851 from cmpadden/publisher-object-pattern
Use Parameter Objects for Publisher Constructors
2021-11-09 20:38:37 +01:00
Andre Wanlin 7240d33df3 Also fixing for Google Storage
Signed-off-by: Andre Wanlin <awanlin@rapidrtc.com>
2021-11-03 07:30:56 -05:00
Andre Wanlin 4848c9cb20 Fixed other instances of same issue
Signed-off-by: Andre Wanlin <awanlin@rapidrtc.com>
2021-10-31 19:58:51 -05:00
Andre Wanlin 777daa10ad Fixed s3 path join to work under any os
Signed-off-by: Andre Wanlin <awanlin@rapidrtc.com>
2021-10-31 19:56:06 -05:00
Colton Padden a2d4389587 Use Parameter Objects for Publisher Constructors
Refactored Techdocs publishers to use a single parameter object as the
constructor argument to ease extendability as more options are introduced.

Updated local publisher to use `.fromConfig` for instantiation so that it
follows the same design pattern as the other publishers.

Signed-off-by: Colton Padden <colton.padden@fastmail.com>
2021-10-31 11:15:47 -04:00
Eric Peterson 6129c89a47 Bump TechDocs container to v0.3.5.
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
2021-10-29 11:48:39 +02:00
github-actions[bot] d66c5f1282 Version Packages 2021-10-28 14:06:43 +00:00
Eric Peterson cfd54b9af4 Fix TechDocs common bug (and tests) on windows.
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
2021-10-26 17:41:53 +02:00
Eric Peterson d066399739 Merge pull request #7554 from cmpadden/techdocs-storage-subfolder
Support optional bucketRootPath in GCS and S3 techdocs publishers
2021-10-25 15:34:10 +02:00
Colton Padden 109a66a7c7 make bucketRootPath the last argument to publish constructors
Signed-off-by: Colton Padden <colton.padden@fastmail.com>
2021-10-21 09:42:52 -04:00
github-actions[bot] bf5090e59d Version Packages 2021-10-21 13:28:13 +00:00
Patrik Oldsberg 1455f4e693 techdocs-common: fix helper tests on windows
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2021-10-20 23:53:29 +02:00
Camila Belo 4a7d47c020 Merge pull request #7080 from backstage/vinzscam/techdocs-use-readme-as-fallback
techdocs: use README.md as index fallback
2021-10-20 22:04:46 +02:00
Vincenzo Scamporlino 59b45a4396 Add checks for warnings
Signed-off-by: Vincenzo Scamporlino <me@vinzscam.dev>
2021-10-20 13:34:00 +02:00
Vincenzo Scamporlino 2bc10af8a4 fix comments
Signed-off-by: Vincenzo Scamporlino <me@vinzscam.dev>
2021-10-20 13:12:31 +02:00
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
Vincenzo Scamporlino bca27b3662 techdocs: use README.md as index fallback
Signed-off-by: Vincenzo Scamporlino <me@vinzscam.dev>
2021-10-19 10:47:29 +02:00
Camila Belo 7f7057eb6a docs(techdocs-common): update api reports
Signed-off-by: Camila Belo <camilaibs@gmail.com>
2021-10-18 19:39:38 +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
Colton Padden d207f6ee9e Support optional bucketRootPath in GCS and S3 techdocs publishers
- Updated app-config.yaml with additional configuration parameters:
    - techdocs.publisher.awsS3.bucketRootPath
    - techdocs.publisher.googleGcs.bucketRootPath
- Updated `fromConfig` and constructors to support additional `bucketRootPath`
  parameters.
- Updated publish method to support `bucketRootPath` in constructing destination
  file path
- Updated `fetchTechDocsMetadata` to use `bucketRootPath`
- Updated `docsRouter` to use `docsRouter` when retrieving files
    - When using both legacy casing, and a bucket root path, additional logic
      was added to prevent the root path's case from being modified as
      previously legacy casing would be applied to the first three entities of
      the URI
- Updated `hasDocsBeenGenerated` to use `bucketRootPath`
- Added additional unit tests for new configurations to updated, and new methods

Signed-off-by: Colton Padden <colton.padden@fastmail.com>
2021-10-11 10:49:40 -04:00
github-actions[bot] 97420439e1 Version Packages 2021-10-07 12:17:39 +00: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
github-actions[bot] f67e8ddcec Version Packages 2021-09-30 11:43:05 +00: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 2f9065d8fd packages,plugins: bump mock-fs to 5.1.0
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2021-09-17 23:14:20 +02:00
github-actions[bot] fff5c48429 Version Packages 2021-09-16 11:41:51 +00: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
Mathias Åhsberg 96fef17a18 chore(deps) bump git-url-parse from 11.4.4 to 11.6.0
Signed-off-by: Mathias Åhsberg <mathias.ahsberg@resurs.se>
2021-09-09 07:34:26 +00:00
github-actions[bot] 45a681aa6a Version Packages 2021-09-02 10:41:57 +00: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 9b5f0dd741 Merge pull request #6962 from backstage/fix-azure-tests
[TechdocsCommon]: Fix Cloud providers Posix Paths
2021-08-26 14:30:03 +02:00
Camila Belo 38b9bd9c63 Fix test describes
Signed-off-by: Camila Belo <camilaibs@gmail.com>
2021-08-26 13:26:55 +02:00
github-actions[bot] e7130884a0 Version Packages 2021-08-26 11:25:27 +00: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