Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPO] Minor improvements to logging around fetching sites during configuration validation #2478

Open
ppf2 opened this issue Apr 30, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@ppf2
Copy link
Member

ppf2 commented Apr 30, 2024

�[38;20m[FMWK][15:30:34][DEBUG] [Connector id: tzvvFY8Bgk_UrIqefRTC, index name: test-es-sharepoint-connector] Validating configuration�[0m
�[38;20m[FMWK][15:30:34][DEBUG] 'Fetch drive item permissions' was not validated because its dependencies were not met.�[0m
�[38;20m[FMWK][15:30:34][DEBUG] 'Fetch unique page permissions' was not validated because its dependencies were not met.�[0m
�[38;20m[FMWK][15:30:34][DEBUG] 'Fetch unique list item permissions' was not validated because its dependencies were not met.�[0m
�[38;20m[FMWK][15:30:34][DEBUG] 'Fetch unique list permissions' was not validated because its dependencies were not met.�[0m
�[38;20m[FMWK][15:30:35][DEBUG] [Connector id: tzvvFY8Bgk_UrIqefRTC, index name: test-es-sharepoint-connector] Fetching url: https://login.microsoftonline.com/common/userrealm/?user=cj@site2.onmicrosoft.com&api-version=2.1&checkForMicrosoftAccount=false�[0m
�[38;20m[FMWK][15:30:35][DEBUG] [Connector id: tzvvFY8Bgk_UrIqefRTC, index name: test-es-sharepoint-connector] Calling Sharepoint Endpoint: https://login.microsoftonline.com/common/userrealm/?user=cj@site2.onmicrosoft.com&api-version=2.1&checkForMicrosoftAccount=false�[0m
�[38;20m[FMWK][15:30:35][DEBUG] [Connector id: tzvvFY8Bgk_UrIqefRTC, index name: test-es-sharepoint-connector] Fetching url: https://graph.microsoft.com/v1.0/sites/?$filter=siteCollection%2Froot%20ne%20null&$select=siteCollection,webUrl�[0m
�[38;20m[FMWK][15:30:35][DEBUG] [Connector id: tzvvFY8Bgk_UrIqefRTC, index name: test-es-sharepoint-connector] Calling Sharepoint Endpoint: https://graph.microsoft.com/v1.0/sites/?$filter=siteCollection%2Froot%20ne%20null&$select=siteCollection,webUrl�[0m
�[38;20m[FMWK][15:30:38][DEBUG] [Connector id: tzvvFY8Bgk_UrIqefRTC, index name: test-es-sharepoint-connector] Looking up individual sites: ['TestSharepoint']�[0m
�[38;20m[FMWK][15:30:38][DEBUG] [Connector id: tzvvFY8Bgk_UrIqefRTC, index name: test-es-sharepoint-connector] Requesting site 'TestSharepoint' by relative path in parent site: site1.sharepoint.com�[0m
�[38;20m[FMWK][15:30:38][DEBUG] [Connector id: tzvvFY8Bgk_UrIqefRTC, index name: test-es-sharepoint-connector] Fetching url: https://graph.microsoft.com/v1.0/sites/site1.sharepoint.com:/sites/TestSharepoint�[0m
�[38;20m[FMWK][15:30:38][DEBUG] [Connector id: tzvvFY8Bgk_UrIqefRTC, index name: test-es-sharepoint-connector] Calling Sharepoint Endpoint: https://graph.microsoft.com/v1.0/sites/site1.sharepoint.com:/sites/TestSharepoint�[0m
�[33;20m[FMWK][15:30:39][WARNING] [Connector id: tzvvFY8Bgk_UrIqefRTC, index name: test-es-sharepoint-connector] Could not look up site 'TestSharepoint' by relative path in parent site: site1.sharepoint.com�[0m
�[38;20m[FMWK][15:30:39][DEBUG] [Connector id: tzvvFY8Bgk_UrIqefRTC, index name: test-es-sharepoint-connector] Looking up individual sites: ['TestSharepoint']�[0m
�[38;20m[FMWK][15:30:39][DEBUG] [Connector id: tzvvFY8Bgk_UrIqefRTC, index name: test-es-sharepoint-connector] Requesting site 'TestSharepoint' by relative path in parent site: site2.sharepoint.com�[0m
�[38;20m[FMWK][15:30:39][DEBUG] [Connector id: tzvvFY8Bgk_UrIqefRTC, index name: test-es-sharepoint-connector] Fetching url: https://graph.microsoft.com/v1.0/sites/site2.sharepoint.com:/sites/TestSharepoint�[0m
�[38;20m[FMWK][15:30:39][DEBUG] [Connector id: tzvvFY8Bgk_UrIqefRTC, index name: test-es-sharepoint-connector] Calling Sharepoint Endpoint: https://graph.microsoft.com/v1.0/sites/site2.sharepoint.com:/sites/TestSharepoint�[0m
�[38;20m[FMWK][15:30:39][DEBUG] [Connector id: tzvvFY8Bgk_UrIqefRTC, index name: test-es-sharepoint-connector] Looking up individual sites: ['TestSharepoint']�[0m
�[38;20m[FMWK][15:30:39][DEBUG] [Connector id: tzvvFY8Bgk_UrIqefRTC, index name: test-es-sharepoint-connector] Requesting site 'TestSharepoint' by relative path in parent site: site3.sharepoint.com�[0m
�[38;20m[FMWK][15:30:39][DEBUG] [Connector id: tzvvFY8Bgk_UrIqefRTC, index name: test-es-sharepoint-connector] Fetching url: https://graph.microsoft.com/v1.0/sites/site3.sharepoint.com:/sites/TestSharepoint�[0m
�[38;20m[FMWK][15:30:39][DEBUG] [Connector id: tzvvFY8Bgk_UrIqefRTC, index name: test-es-sharepoint-connector] Calling Sharepoint Endpoint: https://graph.microsoft.com/v1.0/sites/site3.sharepoint.com:/sites/TestSharepoint�[0m
�[33;20m[FMWK][15:30:41][WARNING] [Connector id: tzvvFY8Bgk_UrIqefRTC, index name: test-es-sharepoint-connector] Could not look up site 'TestSharepoint' by relative path in parent site: site3.sharepoint.com�[0m
�[38;20m[FMWK][15:30:41][DEBUG] [Connector id: tzvvFY8Bgk_UrIqefRTC, index name: test-es-sharepoint-connector] Looking up individual sites: ['TestSharepoint']�[0m
�[38;20m[FMWK][15:30:41][DEBUG] [Connector id: tzvvFY8Bgk_UrIqefRTC, index name: test-es-sharepoint-connector] Requesting site 'TestSharepoint' by relative path in parent site: site4.sharepoint.com�[0m
�[38;20m[FMWK][15:30:41][DEBUG] [Connector id: tzvvFY8Bgk_UrIqefRTC, index name: test-es-sharepoint-connector] Fetching url: https://graph.microsoft.com/v1.0/sites/site4.sharepoint.com:/sites/TestSharepoint�[0m
�[38;20m[FMWK][15:30:41][DEBUG] [Connector id: tzvvFY8Bgk_UrIqefRTC, index name: test-es-sharepoint-connector] Calling Sharepoint Endpoint: https://graph.microsoft.com/v1.0/sites/site4.sharepoint.com:/sites/TestSharepoint�[0m
�[38;20m[FMWK][15:30:41][DEBUG] Cleaning up orphaned idle jobs�[0m

A few suggestions on improvement the logging above:

  1. What is happening above is that the Connector has found 4 possible hosts for the specified tenant. The user has configured a single site collection to sync (TestSharepoint). Because the Connector doesn't know which one of the possible hosts contain the specified site, it proceeds to check against all four hosts. It can be helpful to add an initial DEBUG line that describes what's happening here before we proceed to write out the granular "Fetching, Calling Sharepoint Endpoint, Looking up individual sites" messages.
  2. It is certainly possible for a site to be not part of an identified host, so the current WARNING level logging when it cannot "Could not look up site" can be misleading. Should that just be another DEBUG logging entry? It can also be helpful to word this message from:
Could not look up site 'TestSharepoint' by relative path in parent site: site3.sharepoint.com

To

Could not find site 'TestSharepoint' by relative path in parent site: site3.sharepoint.com

Look up could be interpreted as the look up call itself failing.

  1. Right now, it appears that we only write a WARNING (suggestion above to change to DEBUG) when it cannot find the site in the parent site/host. It will be helpful to also write a "success" message when it is able to find the site within a host, or produce a summary report after the validation that shows the list of hosts the next sync will fetch from along with their respective list of sites it can find.

Thx!

@ppf2 ppf2 added the enhancement New feature or request label Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant