backstage / community-plugins

Community plugins for Backstage
Apache License 2.0
142 stars 144 forks source link

🐛 Confluence: API Request Fails When Spaces Array is Empty #1221

Open eiriksanderfjeld opened 1 week ago

eiriksanderfjeld commented 1 week ago

Plugin Name

search-backend-module-confluence-collator

📜 Description

The search-backend-module-confluence-collator plugin encounters an issue where the API request fails if the spaces array is empty and the query parameter is non-empty. This issue occurs in the getDocuments method of the ConfluenceCollatorFactory.ts file.

👍 Expected behavior

The plugin should handle the case where the spaces array is empty and the query parameter is non-empty, constructing a valid query that does not cause the API request to fail.

👎 Actual Behavior with Screenshots

When the spaces array is empty and the query parameter is non-empty, the constructed query is invalid, leading to a failed API request.

👟 Reproduction steps

I have installed the latest version of the confluences plugins, and are authenticating with token. When spaces are empty, the query will fail with an non-ok response from Confluence.

📃 Provide the context for the Bug.

No response

👀 Have you spent some time to check if this bug has been raised before?

🏢 Have you read the Code of Conduct?

Are you willing to submit PR?

No, but I'm happy to collaborate on a PR with someone else

fjudith commented 1 day ago

Thank you for reporting this bug @eiriksanderfjeld .

I'm taking the resolution of this bug.