From 42bde12f046202a1cb3f1a1af23c2b8b8d727d45 Mon Sep 17 00:00:00 2001 From: Adam Harvey Date: Wed, 16 Aug 2023 12:21:24 -0400 Subject: [PATCH 1/6] chore: Add backend logging if posts fail Signed-off-by: Adam Harvey --- plugins/entity-feedback-backend/src/service/router.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/entity-feedback-backend/src/service/router.ts b/plugins/entity-feedback-backend/src/service/router.ts index ea759c1639..4953c531b8 100644 --- a/plugins/entity-feedback-backend/src/service/router.ts +++ b/plugins/entity-feedback-backend/src/service/router.ts @@ -134,6 +134,9 @@ export async function createRouter( const user = await identity.getIdentity({ request: req }); const rating = req.body.rating; if (!user || !rating) { + logger.warn( + `Can't save rating because there is not enough info: user=${user}, rating=${rating}`, + ); res.status(400).end(); return; } @@ -188,6 +191,7 @@ export async function createRouter( const { response, comments, consent } = req.body; if (!user) { + logger.warn(`Could not identify user to save responses, user=${user}`); res.status(400).end(); return; } From 740155e8e976dd424b4b80f56436e0a33af46212 Mon Sep 17 00:00:00 2001 From: Adam Harvey Date: Wed, 16 Aug 2023 12:22:03 -0400 Subject: [PATCH 2/6] chor: Add changeset Signed-off-by: Adam Harvey --- .changeset/poor-years-appear.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/poor-years-appear.md diff --git a/.changeset/poor-years-appear.md b/.changeset/poor-years-appear.md new file mode 100644 index 0000000000..d5b53a7051 --- /dev/null +++ b/.changeset/poor-years-appear.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-entity-feedback-backend': patch +--- + +Improve backend logging if method calls fail From 4e0e9b2a488e14b68b2dcd71645e1557f96572b5 Mon Sep 17 00:00:00 2001 From: Adam Harvey Date: Wed, 16 Aug 2023 12:29:51 -0400 Subject: [PATCH 3/6] chore: Clarify identify requirement Signed-off-by: Adam Harvey --- plugins/entity-feedback-backend/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/entity-feedback-backend/README.md b/plugins/entity-feedback-backend/README.md index 99489e28b2..49a8ce20e0 100644 --- a/plugins/entity-feedback-backend/README.md +++ b/plugins/entity-feedback-backend/README.md @@ -4,6 +4,10 @@ Welcome to the entity-feedback backend plugin! ## Installation +Note: this plugin requires authentication and identity configured so Backstage can identify +which user has rated the entity. If you are using the guest identity provider which comes +out of the box, this plugin will not work when you test it. + ### Install the package ```bash From 5e2e06db747aa6865c724adfaaf79063c957874a Mon Sep 17 00:00:00 2001 From: Adam Harvey Date: Wed, 16 Aug 2023 12:30:36 -0400 Subject: [PATCH 4/6] chore: Add changeset Signed-off-by: Adam Harvey --- .changeset/few-nails-smile.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/few-nails-smile.md diff --git a/.changeset/few-nails-smile.md b/.changeset/few-nails-smile.md new file mode 100644 index 0000000000..6b5a08c97d --- /dev/null +++ b/.changeset/few-nails-smile.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-entity-feedback': patch +--- + +Improve README to identify that Backstage identity is required to be configured From 6093d001cf6c47f58e30bcf1e9dabdc37fdc9edc Mon Sep 17 00:00:00 2001 From: Adam Harvey Date: Wed, 16 Aug 2023 12:32:38 -0400 Subject: [PATCH 5/6] chore: Clarify identity requirement Signed-off-by: Adam Harvey --- plugins/entity-feedback/README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/plugins/entity-feedback/README.md b/plugins/entity-feedback/README.md index fdfa4761d6..c405bd4083 100644 --- a/plugins/entity-feedback/README.md +++ b/plugins/entity-feedback/README.md @@ -36,7 +36,11 @@ This plugin allows you give and view feedback on entities available in the Backs ## Setup -The following sections will help you get the Entity Feedback plugin setup and running +The following sections will help you get the Entity Feedback plugin setup and running. + +Note: this plugin requires authentication and identity configured so Backstage can identify +which user has rated the entity. If you are using the guest identity provider which comes +out of the box, this plugin will not work when you test it. ### Backend @@ -133,4 +137,4 @@ const groupPage = ( ); ``` -Note: For a full example of this you can look at [this EntityPage](../../packages/app/src/components/catalog/EntityPage.tsx) +Note: For a full example of this you can look at [this EntityPage](../../packages/app/src/components/catalog/EntityPage.tsx). From 828f5a67af457d6bd62e2f23f62a94311e525544 Mon Sep 17 00:00:00 2001 From: Adam Harvey Date: Wed, 16 Aug 2023 12:33:40 -0400 Subject: [PATCH 6/6] chore: Simplify wording Signed-off-by: Adam Harvey --- .changeset/few-nails-smile.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/few-nails-smile.md b/.changeset/few-nails-smile.md index 6b5a08c97d..2fad9a0b40 100644 --- a/.changeset/few-nails-smile.md +++ b/.changeset/few-nails-smile.md @@ -2,4 +2,4 @@ '@backstage/plugin-entity-feedback': patch --- -Improve README to identify that Backstage identity is required to be configured +Improve README to note that Backstage identity is required to be configured