Skip to content

[bug]: identity.CacheDirectory caches context.Canceled/context.DeadlineExceeded errors #1346

@arushibandi

Description

@arushibandi

I'm using the identity.DefaultDirectory() and noticed that I was seeing failed lookups due to context cancelled. This also seemed to coincide with logins/oauth redirect flows or refreshed. Restarting my process fixed this. After digging in, it seems that this is because the CacheDirectory caches all errors, not filtering for context cancelled / deadline exceeded. I verified this with a test and have a fix here: #1345

(Oops I didn't realize that opened a PR directly to the official repo, was trying to make a PR to my fork! Also this is my first time creating an issue in a repo so sorry if I broke any guidelines!)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions