-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Add more logging for confluence perm-sync + handle case where permiss… #4586
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
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
This PR enhances logging and error handling in Confluence permission synchronization, focusing on better visibility and secure defaults when permissions cannot be determined.
- Added detailed logging in
doc_sync.py
for space permissions and document restrictions with elevated log levels for better visibility - Implemented secure fallback in
doc_sync.py
to make documents inaccessible when permissions cannot be determined - Added handling in
doc_sync.py
for documents that exist in DB but are no longer accessible in Confluence - Enhanced error messages in
doc_sync.py
with specific details about permission-related issues - Elevated log levels in
group_sync.py
from debug to info for user processing and group assignment visibility
2 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile
@@ -17,7 +17,7 @@ def _build_group_member_email_map( | |||
) -> dict[str, set[str]]: | |||
group_member_emails: dict[str, set[str]] = {} | |||
for user in confluence_client.paginated_cql_user_retrieval(): | |||
logger.debug(f"Processing groups for user: {user}") | |||
logger.info(f"Processing groups for user: {user}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: Consider keeping this as debug level since it could be very noisy in production with many users
dfb9d3d
to
8925869
Compare
…ions are removed from the access token
97a7a50
to
ae7ac7a
Compare
.get("user", {}) | ||
.get("displayName", "Unknown User") | ||
) | ||
# NOTE: needs to be done this weird way because sometime we get back `None` for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small teams fix
…ions are removed from the access token.
Also has:
Fixes https://linear.app/danswer/issue/DAN-1932/permission-sync-500
Description
[Provide a brief description of the changes in this PR]
How Has This Been Tested?
[Describe the tests you ran to verify your changes]
Backporting (check the box to trigger backport action)
Note: You have to check that the action passes, otherwise resolve the conflicts manually and tag the patches.