Skip to content
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

provider/github: Log HTTP requests and responses in DEBUG mode #14363

Merged
merged 1 commit into from
May 11, 2017

Conversation

radeksimko
Copy link
Member

This should shed some light on the intermittent failures of Github acceptance tests that we keep seeing.

Example

2017/05/10 21:54:51 [DEBUG] Github API Request Details:
---[ REQUEST ]---------------------------------------
POST /repos/*REDACTED*/test-repo/labels HTTP/1.1
Host: api.github.com
User-Agent: go-github/4
Content-Length: 32
Accept: application/vnd.github.v3+json
Content-Type: application/json
Accept-Encoding: gzip

{"name":"foo","color":"000000"}

-----------------------------------------------------
2017/05/10 21:54:52 [DEBUG] Github API Response Details:
---[ RESPONSE ]--------------------------------------
HTTP/1.1 201 Created
Content-Length: 137
Access-Control-Allow-Origin: *
Access-Control-Expose-Headers: ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval
Cache-Control: private, max-age=60, s-maxage=60
Content-Security-Policy: default-src 'none'
Content-Type: application/json; charset=utf-8
Date: Wed, 10 May 2017 19:54:52 GMT
Etag: "33ce873352f0894f03139ca05792060c"
Location: https://api.github.com/repos/*REDACTED*/test-repo/labels/foo
Server: github.com
Status: 201 Created
Strict-Transport-Security: max-age=31536000; includeSubdomains; preload
Vary: Accept, Authorization, Cookie, X-GitHub-OTP
Vary: Accept-Encoding
X-Accepted-Oauth-Scopes: 
X-Content-Type-Options: nosniff
X-Frame-Options: deny
X-Github-Media-Type: github.v3; format=json
X-Github-Request-Id: DFCB:3F97:7787E93:9426BC2:5913700C
X-Oauth-Scopes: public_repo
X-Ratelimit-Limit: 5000
X-Ratelimit-Remaining: 4998
X-Ratelimit-Reset: 1494449692
X-Served-By: 2d7a5e35115884240089368322196839
X-Xss-Protection: 1; mode=block

{"id":602417973,"url":"https://api.github.com/repos/*REDACTED*/test-repo/labels/foo","name":"foo","color":"000000","default":false}
-----------------------------------------------------

Copy link
Contributor

@paddycarver paddycarver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but because it's not necessary for the release, let's wait until after the release to merge. Cool?

@radeksimko radeksimko merged commit 23c004b into master May 11, 2017
@radeksimko radeksimko deleted the f-github-debug-logging branch May 11, 2017 11:06
@ghost
Copy link

ghost commented Apr 12, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants