Fix/4139 sharepoint license error spam - #4255
Conversation
|
…led (elastic#4139) The scheduling loop logs an ERROR every ~30s when a connector supports DLS but the Elasticsearch license is not Platinum. This is misleading when the user has not enabled access control sync at all. Only check the license when access control sync scheduling is actually enabled by the user. If it's disabled, skip silently.
689ab90 to
a0e6949
Compare
|
Sorry for the mixed commits.(english is not my first language) that was a branch-management mistake on my end. I've force-pushed the branch to contain only the actual fix (1 commit, 2 files, +71 −1 lines). What changed: The guard connector.access_control_sync_scheduling.get("enabled", False) now runs before the license check, so the "Minimum required Elasticsearch license: 'platinum'…" error is no longer logged every ~30s on Basic licenses when the user never enabled access-control sync. New: Added regression test test_connector_scheduled_access_control_sync_with_sync_disabled — it fails without the fix (license gets checked, error logged) and passes with it (has_active_license_enabled.assert_not_awaited()). The #4139 scenario is now automated. Please re-review thanks! |
Closes https://github.com/elastic/connectors-py/issues/###
What
Only check the Elasticsearch license for access control sync scheduling when the user has actually enabled access control sync — not just because the connector supports DLS.
Closes #4139
Why
The scheduling loop calls
document_level_security_enabled()which returnsTruefor any connector that supports DLS (e.g. SharePoint Online). On a Basic license this logs an ERROR every ~30s:This is misleading when the user never enabled access control sync. The error should only appear when someone explicitly enables it without having the right license.
Fix
Added
connector.access_control_sync_scheduling.get("enabled", False)as an additional condition before entering the license check.Checklist
Release Note