Comments (6)
@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.
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.
Why only try reloading once? What's the concern with always trying to reload it on invalid token error?
from github-codebuild-logs.
Just trying to avoid an infinite loop of it failing and reloading.
from github-codebuild-logs.
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.
@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)
- IAM permission error if custom log group is set in CodeBuild config HOT 3
- Support CodeBuild projects that only write logs to S3 HOT 1
- S3 presigned URLs are sometimes broken HOT 11
- Add CodeBuild project name and commit ID to PR statement HOT 1
- Builds not created by PRs result in an error HOT 3
- Add optional HidePreviousComments option which defaults to false HOT 5
- Add update instructions in README HOT 2
- add readme reference to codebuild GitHub action
- Add ability to disable posting comment on SUCCEEDED builds
- CodeBuild projects for public repos do not appear to always have auth info HOT 6
- AttributeError: 'NoneType' object has no attribute 'get'
- Update README and Application Settings to inform about public builds in AWS CodeBuild
- Never a PR Build HOT 5
- Change `DeletePreviousComment` to an int HOT 2
- Deployment fails with "AWS::Events::Rule does not support attribute {Arn}" error HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from github-codebuild-logs.