Conversation
|
Would it be more clean to use chatgpt told it can be achieved by |
Interestingly that is the default and it doesn't seem to work (or some other issue might be at play). We've been using a manual retry for a while in dd-trace and it seems to pretty much have resolved the issue entirely (short of a full-blown npm outage). |
Do you mean that it does not try a second time, or it may try, but it does not solve the issue? Because if it's the default, and if it actually tries twice, then the equivalent of I just checked, and from what I see in logs, it respects the config given (even +1) : See the Well, whatever, if you're more confortable with the double call, I'm fine with that. |
I think it does try a second time, but it may do so with a strategy that doesn't quite work for us. I agree that the new code is technically equivalent to 4 retries, but since it's done differently, it's not quite equivalent. For example, in dd-trace-js we use yarn which doesn't retry out of the box, yet retrying manually (so effectively 2 retries total) fixed the issue entirely. This is also true of |
|
We had another occurrence of the issue, going to merge this for now to see if it makes a difference. We can re-evaluate this if it ends up not fixing the issue. |
Motivation
This is a common cause of flakiness, often with a random 500 error from npm or from an ECONNRESET. Rerunning it reduces the flakiness pretty much to 0 (or as close as we can realistically expect without rerunning many times).
Changes
Retry
npm installwhen it fails.Workflow
codeownersfile quickly.🚀 Once your PR is reviewed, you can merge it!
🛟 #apm-shared-testing 🛟
Reviewer checklist
[<language>], double-check that only<language>is impacted by the changebuild-XXX-imagelabel is present