GithubHelp home page GithubHelp logo

Comments (6)

jlhood avatar jlhood commented on July 17, 2024

@mattsb42 The GitHub OAuth token is cached in memory by the app. Did you delete the old token after replacing it with a new one in secrets manager? If so, the app was probably trying to use the deleted token, resulting in the invalid token error from GitHub.

An enhancement that could be made to the app would be for GithubProxy to catch invalid token error and attempt to reinitialize the client (which would also reload the token).

from github-codebuild-logs.

mattsb42 avatar mattsb42 commented on July 17, 2024

Yes, I deleted the old token. I missed the client caching; yes, this is probably what was happening. Catching the invalid credentials error and re-loading credentials sounds like the right approach to me. We'll want to make sure we only try reloading once though.

from github-codebuild-logs.

jlhood avatar jlhood commented on July 17, 2024

Why only try reloading once? What's the concern with always trying to reload it on invalid token error?

from github-codebuild-logs.

mattsb42 avatar mattsb42 commented on July 17, 2024

Just trying to avoid an infinite loop of it failing and reloading.

from github-codebuild-logs.

honglu avatar honglu commented on July 17, 2024

Not sure if it is the same issue for you. But I found it confusing when using secrets manager console. The console defaults the secrets to be either a key-value pair or a JSON String under Plaintext. I have to just copy paste my OAuth token there in Plaintext and remove the default JSON blob. Most of the time I just use AWS CLI to store my OAuth token:

aws secretsmanager create-secret --name GitHubOAuthToken --secret-string <my oauth token>

from github-codebuild-logs.

jlhood avatar jlhood commented on July 17, 2024

@mattsb42 Just trying to avoid an infinite loop of it failing and reloading.

Oh I see. You mean only retry once per Lambda invocation. I was thinking the same thing. For a second I thought you meant ensuring it only retries once across Lambda invocations. 😅

from github-codebuild-logs.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.