fix(calendar): Loading calendars from service account#321
Closed
markwatson wants to merge 1 commit intoopenclaw:mainfrom
Closed
fix(calendar): Loading calendars from service account#321markwatson wants to merge 1 commit intoopenclaw:mainfrom
markwatson wants to merge 1 commit intoopenclaw:mainfrom
Conversation
…zone lookup
CalendarList.Get("primary") returns 404 for service accounts because
the SA's own primary calendar is not in its CalendarList, even though
Calendars.Get("primary") and Events.List work fine.
Switch getUserTimezone() and getCalendarLocation() to use
svc.Calendars.Get(), which works for both OAuth users and service
accounts. Update test mocks to match the new endpoint.
Contributor
Author
|
I opened this PR a little prematurely - sorry (meant to leave it as a branch in my fork). I haven't gone back and reviewed the code / validated for existing use cases with "normal" accounts. The root cause was the calendar listing by ID was failing when using a GCP service account. |
Contributor
Author
|
The root cause is that calendars on service accounts don't have a default, which is causing the TZ issues. TODO: look into if this can be configured, and it's just a user error. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note: This change needs to be rebased against upstream:main, but right now main is broken so it's tested with service accounts on v0.11.0.
use Calendars.Get instead of CalendarList.Get for timezone lookup
CalendarList.Get("primary") returns 404 for service accounts because the SA's own primary calendar is not in its CalendarList, even though Calendars.Get("primary") and Events.List work fine.
Switch getUserTimezone() and getCalendarLocation() to use svc.Calendars.Get(), which works for both OAuth users and service accounts. Update test mocks to match the new endpoint.