When the Confluence connector is configured with a comma separated list of space keys and there is a trailing comma the sync job fails with the error Spaces '' are not available. Available spaces are: SP1, SP2, SP3....
The issue can be traced to the _remote_validation function where the list of spaces retrieved from Confluence is compared with the spaces configured for the connector (provided via self.spaces).
When the user configures the space keys with a trailing comma, the self.spaces array contains an item that is an empty string. That in turn results in the set(self.spaces) - set(space_keys) operation to return that empty string item and thus the error message triggers.
Technically the error is correct, the Confluence space "empty string" does not exist but the message looks odd to say the least 🙂
To Reproduce
Steps to reproduce the behavior:
Configure a Confluence connector in Elastic Enterprise Search and specify the spaces as SP1, SP2, (note the trailing comma)
Save the connector
Wait for the initial sync to complete (trigger manually if necessary)
Observe the failure
In the logs observe the error Spaces '' are not available. Available spaces are: SP1, SP2, SP3....
Bug Description
When the Confluence connector is configured with a comma separated list of space keys and there is a trailing comma the sync job fails with the error
Spaces '' are not available. Available spaces are: SP1, SP2, SP3....
The issue can be traced to the
_remote_validation
function where the list of spaces retrieved from Confluence is compared with the spaces configured for the connector (provided viaself.spaces
).When the user configures the space keys with a trailing comma, the
self.spaces
array contains an item that is an empty string. That in turn results in theset(self.spaces) - set(space_keys)
operation to return that empty string item and thus the error message triggers.Technically the error is correct, the Confluence space "empty string" does not exist but the message looks odd to say the least 🙂
To Reproduce
Steps to reproduce the behavior:
SP1, SP2,
(note the trailing comma)Spaces '' are not available. Available spaces are: SP1, SP2, SP3....
Expected behavior
The error is not triggered and the sync succeeds
Environment
Elastic 8.13.1