-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[github] Improve log entries when retrieving github files #16635
Conversation
if (response.status === 200) { | ||
if (typeof response.data === "string") { | ||
return response.data; | ||
} | ||
console.warn("GithubFileProvider.getFileContent – unexpected response type.", { | ||
headers: response.headers, | ||
type: typeof response.data, | ||
log.warn("GithubFileProvider.getFileContent – unexpected response type.", { | ||
request: params, | ||
response: { | ||
headers: { | ||
"content-encoding": response.headers["content-encoding"], | ||
"content-type": response.headers["content-type"], | ||
}, | ||
type: typeof response.data, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The log here will allow us to possibly improve the response checking. We should, in theory, be able to check that the returned content-type matches the one we expected rather than having to read the response type. Reading the response type means we actually have to consume the body of the request and hence more bandwidth/work for us.
}); | ||
} | ||
return undefined; | ||
} catch (err) { | ||
log.debug(err); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There might have been a reason for the debug here (probably surfaces a ton of user errors as well), but as this has no comment... let's try. 🙂
Description
See logs here
Related Issue(s)
Fixes #
How to test
Release Notes
Documentation
Build Options:
Experimental feature to run the build with GitHub Actions (and not in Werft).
leeway-target=components:all
Run Leeway with
--dont-test
Publish Options
Installer Options
Add desired feature flags to the end of the line above, space separated
Preview Environment Options:
If enabled this will build
install/preview
If enabled this will create the environment on GCE infra
Valid options are
all
,workspace
,webapp
,ide
,jetbrains
,vscode
,ssh