Commit Graph

161 Commits

Author SHA1 Message Date
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
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 a42a142c2f Reduce log fatigue during startup.
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
2021-08-31 15:24:04 +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 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
Fredrik Adelöw 923491eece run prettier formatting
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2021-08-09 11:54:38 +02:00
Dominik Henneke eabf5bb598 Merge remote-tracking branch 'upstream/master' into feat/relative-ref-tmp 2021-07-21 15:12:52 +02:00
Dominik Henneke ed6092f76a Handle and forward errors from the DocsBuilder instantiation to the user
Signed-off-by: Dominik Henneke <dominik.henneke@sda-se.com>
2021-07-21 12:42:24 +02:00
Dominik Henneke d32d01e5bc Introduce the annotation backstage.io/techdocs-ref: <relative-target> as an alias for backstage.io/techdocs-ref: dir:<relative-target>
Signed-off-by: Dominik Henneke <dominik.henneke@sda-se.com>
2021-07-16 10:16:32 +02:00
Jussi Hallila 9266b80ab3 Implement DefaultTechDocsCollator
* Implements a collator for tech docs.
   * Retrieves mkdocs created search index for entities that have documentation configured
* Registers collator to expose tech docs content to be searchable
* Adds pagination to example search
* Modifies example search to contain tech docs
   * Displays docs results with link to docs and the entity name as title.
* Creates a reusable type filter to be located in the search package.
* Add tests for type filter

Signed-off-by: Jussi Hallila <jussi@hallila.com>
2021-07-15 13:14:25 +02:00
Dominik Henneke 386e95b94c Add missing comment
Signed-off-by: Dominik Henneke <dominik.henneke@sda-se.com>
2021-07-13 16:56:30 +02:00
Dominik Henneke 246b1797e5 Merge remote-tracking branch 'upstream/master' into feat/techdocs-build-logs
Signed-off-by: Dominik Henneke <dominik.henneke@sda-se.com>
2021-07-13 16:49:33 +02:00
Eric Peterson 5176099c79 Allow either out-of-the-box or recommended configurations in TechDocs createRouter
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
2021-07-12 16:41:39 +02:00
Dominik Henneke 221b3080f9 Fix warning
Signed-off-by: Dominik Henneke <dominik.henneke@sda-se.com>
2021-07-09 14:38:50 +02:00
Dominik Henneke 800445cca0 Move the logging one level up to send all logs and exceptions to the user
With this change, only failed builds are logged to the backend logger

Signed-off-by: Dominik Henneke <dominik.henneke@sda-se.com>
2021-07-09 14:33:54 +02:00
Dominik Henneke 380a519b2d Add a warning to the deprecated non-eventsource sync endpoint
Signed-off-by: Dominik Henneke <dominik.henneke@sda-se.com>
2021-07-07 09:47:13 +02:00
Dominik Henneke 9b98328e99 Move the synchronization code into a dedicated class and still support non-eventstream responses
Signed-off-by: Dominik Henneke <dominik.henneke@sda-se.com>
2021-07-06 18:57:37 +02:00
Dominik Henneke f1200f44c8 Rewrite the /sync/:namespace/:kind/:name to return an event-stream
Signed-off-by: Dominik Henneke <dominik.henneke@sda-se.com>
2021-07-05 14:20:41 +02:00
Joe Porpeglia 709589a839 Rename service catalog to software catalog, excluding blog posts
Signed-off-by: Joe Porpeglia <josephp@spotify.com>
2021-06-21 11:48:43 -04: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
Dominik Henneke 2b9d30b153 Fix minor issues from the review comments
Signed-off-by: Dominik Henneke <dominik.henneke@sda-se.com>
2021-06-17 10:23:41 +02:00
Dominik Henneke fea7fa0ba6 Return a 304 Not Modified from the /sync/:namespace/:kind/:name endpoint if nothing was built
Signed-off-by: Dominik Henneke <dominik.henneke@sda-se.com>
2021-06-17 10:23:00 +02:00
Patrik Oldsberg d458690f5c Merge pull request #5754 from TejasQ/tejask/3333
TechDocs: Support configurable working directory as temp dir
2021-06-16 18:54:47 +02:00
Tejas Kumar 20d9c7d384 Address review comments
Signed-off-by: Tejas Kumar <tejask@spotify.com>
2021-06-16 10:09:06 +02:00
Fredrik Adelöw 3108ff7bfd Make yarn dev for backends respect the PLUGIN_PORT env var
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2021-06-14 14:46:19 +02:00
Tejas Kumar d93a3f9853 Refactor to use optional string
Signed-off-by: Tejas Kumar <tejask@spotify.com>
2021-05-20 16:34:04 +02:00
Tejas Kumar a345a2e019 Use backend.workingDir for techdocs
Signed-off-by: Tejas Kumar <tejask@spotify.com>
2021-05-20 16:32:31 +02:00
Tejas Kumar d2329e7486 Use stringifyEntityRef in place of deprecated
Signed-off-by: Tejas Kumar <tejask@spotify.com>
2021-05-20 16:23:13 +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
Oliver Sand cba5944fcd Change the response status of metadata endpoints in case a documentation is not available to 404 NOT FOUND
Signed-off-by: Oliver Sand <oliver.sand@sda-se.com>
2021-04-07 16:55:39 +02:00
Chongyang Adrian, Ke aaeb7ecf3c TechDocs: show outdated docs and asnyc build new
Signed-off-by: Chongyang Adrian, Ke <ftt.adrian.ke@grabtaxi.com>
2021-03-25 10:26:11 +08:00
Himanshu Mishra 8fdb4d8e00 techdocs: backend responds with an error if publisher type is not supported
Signed-off-by: Himanshu Mishra <himanshu@orkohunter.net>
2021-03-12 11:40:12 +01:00
Himanshu Mishra 75941ca364 techdocs: techdocs_metadata.json could be missing, ignore the error
Signed-off-by: Himanshu Mishra <himanshu@orkohunter.net>
2021-03-12 11:30:00 +01:00
Himanshu Mishra 11242ac41e Apply suggestions from code review
Co-authored-by: Adam Harvey <adam.harvey@dxc.com>
Signed-off-by: Himanshu Mishra <himanshu@orkohunter.net>
2021-03-12 08:55:17 +01:00
Himanshu Mishra 784d39894a techdocs: Replace res.send with res.json
Signed-off-by: Himanshu Mishra <himanshu@orkohunter.net>
2021-03-12 01:32:59 +01:00
Himanshu Mishra cf1b10f651 techdocs: When builder is set to local
1. Do not check for updates if a check has been done in last 60 seconds
2. Use stored etag from techdocs_metadata.json instead of in-memory storage
3. Enable re-building docs when in a mix of basic and recommended setup i.e. local builder with external storage

Signed-off-by: Himanshu Mishra <himanshu@orkohunter.net>
2021-03-12 01:11:08 +01:00
Fredrik Adelöw 8686eb38cf Introduce the @backstage/errors package.
Encode thrown errors in the backend as a JSON payload using a facility in that package, and render helpful frontend displays of those errors.

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2021-03-11 14:31:21 +01:00
Fredrik Adelöw 702b837b8b Remove all dot-folder imports everywhere
We aren't supposed to import from '.' or '../..' etc; point to the actual node being imported instead. I did allow e.g. '../../bigfolder' however. Going all the way to the individual file could be done too, but is a matter of taste perhaps.

Also ran Organize Imports on all the touched files :)

No changeset since there are no functional changes at all - only the imports changed

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2021-03-10 13:43:59 +01:00
dependabot[bot] 7616988312 chore(deps): bump knex from 0.21.18 to 0.95.1
Bumps [knex](https://github.com/knex/knex) from 0.21.18 to 0.95.1.
- [Release notes](https://github.com/knex/knex/releases)
- [Changelog](https://github.com/knex/knex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/knex/knex/commits)

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2021-03-08 10:26:45 +01:00
Himanshu Mishra ea3d406038 Merge pull request #4714 from erdoganoksuz/feature/OpenStackSwiftPublisher 2021-03-05 07:57:36 +00:00
Adam Harvey 26e23b2c7d Refactor logging
Signed-off-by: Adam Harvey <adam.harvey@dxc.com>
2021-03-04 14:23:01 -05:00
erdoganoksuz e36ef00fd0 router case added and hasDocsBeenGenerated fixed
Signed-off-by: Mert Can Bilgiç <mert.bilgic@trendyol.com>
2021-03-03 11:46:12 +03:00
Patrik Oldsberg ae30b916df Merge pull request #4731 from erikxiv/fix/techdocs-static-url
Techdocs static docs should use external url
2021-03-01 19:26:25 +01:00
Patrik Oldsberg 570d310c90 Merge pull request #4621 from nhidtran/enhancement/4423
Enhancement/4423: remove the usage of res.send() for res.json()
2021-03-01 17:54:09 +01:00
Erik Larsson 74534a0f8c Move auth token to contrib 2021-03-01 12:29:59 +01:00