> The documentation sounds like it's a global switch though? This is really a per-function property…
It is a global switch per cluster, yes. Agree that it should be a per-function property, and we're working towards that. It's currently in beta.
> What benefit AI gives here — especially in this form, hidden in the RPC layer — I don't see at all. If I want AI to help me identify which functions are retryable, I'd rather have it do that in my editor by visibly sticking the "retry" attribute on the function. That way I can fix it if it mis-guesses.
I think you're mistaking "identifying functions" with "identifying failures". The AI does not identify which functions are retryable. That's your job as a developer. The AI helps with figuring out which *failures* are retryable.
You can't potentially account for all retryable cases in your code. Some exceptions happen in underlying libraries, database drivers and OS level that you might not have see before.
It is a global switch per cluster, yes. Agree that it should be a per-function property, and we're working towards that. It's currently in beta.
> What benefit AI gives here — especially in this form, hidden in the RPC layer — I don't see at all. If I want AI to help me identify which functions are retryable, I'd rather have it do that in my editor by visibly sticking the "retry" attribute on the function. That way I can fix it if it mis-guesses.
I think you're mistaking "identifying functions" with "identifying failures". The AI does not identify which functions are retryable. That's your job as a developer. The AI helps with figuring out which *failures* are retryable.
You can't potentially account for all retryable cases in your code. Some exceptions happen in underlying libraries, database drivers and OS level that you might not have see before.
ECONNRESET? Yes ECONNREFUSED? Yes 429? Yes 400? No DatabaseDeadlockError? Yes PGPoolConnExhausted? Yes
> Also: what do you do if with your RPC implementation the guess is wrong and a function is retried when it really shouldn't be? What's the fix?
Good question. If there's a function that you definitely can't afford to retry, there's an idempotence helper [1]
[1] https://docs.differential.dev/advanced/idempotency/
edit: typo