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

Warn instead of failing when asset check fails #273

Merged
merged 2 commits into from
May 17, 2024
Merged

Warn instead of failing when asset check fails #273

merged 2 commits into from
May 17, 2024

Conversation

trotzig
Copy link
Contributor

@trotzig trotzig commented May 16, 2024

Sometimes we get network errors when making requests. Most endpoints are retried but the assets-data check is only performed once. When it fails with a non-404 response, the execution halts. We can improve this by instead assuming the assets are not there and continue as if we had a
404. I've added a warning log just to make sure we surface this issue.

Sometimes we get network errors when making requests. Most endpoints are
retried but the assets-data check is only performed once. When it fails
with a non-404 response, the execution halts. We can improve this by
instead assuming the assets are not there and continue as if we had a
404. I've added a warning log just to make sure we surface this issue.
@@ -94,7 +94,13 @@ async function uploadStaticPackage({
return assetsDataRes.path;
} catch (e) {
if (e.statusCode !== 404) {
throw e;
logger.warn(
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we need to make this change in more places, like domRunner.js

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You are right.

We had asset upload code in two places, and I only patched one of them
in my initial attempt. Bringing them in closer will make it easier to
refactor and we avoid duplicated code.
@trotzig trotzig merged commit 5127f6d into master May 17, 2024
3 checks passed
@trotzig trotzig deleted the assets-504 branch May 17, 2024 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants