[app_dart] Differentiate 404s from other HTTP exceptions on GitHub files#1150
Conversation
There was a problem hiding this comment.
Looking at the prod logs, I'm not sure devicelab/manifest.yaml and *_builders.json use the null response. I opt to make it a hard failure, but I can come back and fix them to return default responses if needed.
There was a problem hiding this comment.
In what situation would this happen? And should we trigger some sort of alert if we hit this?
There was a problem hiding this comment.
This would only happen during a GitHub CDN outage (which we haven't faced issues with). The implementers of this function don't catch this error, so it would surface as an increased error rate in cocoon (we already use error tracking dashboards)
There was a problem hiding this comment.
What happens if NotFoundException?
There was a problem hiding this comment.
If NotFoundException, we should create an empty config. This case is expected when we remove the existing configs (devicelab/manifest.yaml, *_builders.json) or when a release branch is created without .ci.yaml.
There was a problem hiding this comment.
What happens if NotFoundException?
There was a problem hiding this comment.
Do we want to add a try catch block to unblock this API in case of exception?
There was a problem hiding this comment.
Same for line 191 final YamlMap yaml = await loadDevicelabManifest(commit);
There was a problem hiding this comment.
We retry HttpExceptions. I added back the fails safes for *_builder.json and .ci.yaml to not fail if we can't load those configs with logging to see how common it is.
There was a problem hiding this comment.
this is actually the format that githubFileContent expects.
There was a problem hiding this comment.
I updated the format as if everything passes a leading slash, githubFileContent should just add it.
|
This pull request is not suitable for automatic merging in its current state.
|
cf1f495 to
d35d384
Compare
|
This has been at 50% of prod traffic for 4 hours, and I haven't seen any issues (other than unrelated auth warnings #1158). The |
remoteFileContenttogithubFileContentmanifest.yaml404s, return default response.ci.yamland store it in cache for future useIssues
flutter/flutter#76140