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

RetryOptions with retryTimeoutInMilliseconds exceeded stops orchestration #629

Open
jnsvd opened this issue Mar 12, 2025 · 0 comments
Open

Comments

@jnsvd
Copy link

jnsvd commented Mar 12, 2025

Describe the bug
When calling an activity with RetryOptions, if the maximum allowed amount of time spent retrying is exceeded, the orchestration stops. No exception is thrown that can be caught.

Investigative information

  • Durable Functions extension version: Extension Bundle [4.0.0, 5.0.0)
  • durable-functions npm module version: 3.1.0
  • Language (JavaScript/TypeScript) and version: JavaScript
  • Node.js version: v21.7.3

To Reproduce

Activity code:

const df = require('durable-functions');

const handler = async (input, context) => {
  await new Promise((resolve) => setTimeout(resolve, 3000));
  throw new Error('Simulated error after some time');
};

df.app.activity('activity', {
  handler
});

Orchestration code:

const df = require('durable-functions');

const retryOptions = new df.RetryOptions(1_500, 4);
retryOptions.retryTimeoutInMilliseconds = 10_000;

const handler = function* (context) {
  try {
    yield context.df.callActivityWithRetry('activity', retryOptions);
    context.info('Activity succeeded');
  } catch (e) {
    context.info('Activity failed');    
  } finally {
    context.info('Done');
  }
};

df.app.orchestration('orchestration', handler);

Nothing will be logged when running this orchestration: the code doesn't reach the context.info('Activity succeeded'); statement, nor is an exception thrown.

Expected behavior
An exception should be thrown.

Actual behavior
No exception thrown, no value yielded from the callActivityWithRetry. Basically the orchestration is 'stuck' (but it's still in a Running state when queried through the instance API).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant