Skip to content

Commit d31a1e3

Browse files
committed
feedback - rename DAPR_WF_DISABLE_DETECTION with DAPR_WF_DISABLE_DETERMINISTIC_DETECTION
Signed-off-by: Filinto Duran <[email protected]>
1 parent 776253a commit d31a1e3

File tree

8 files changed

+12
-12
lines changed

8 files changed

+12
-12
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,12 +348,12 @@ export DAPR_GRPC_PORT=50001
348348

349349
Configure async workflow behavior and debugging:
350350

351-
- `DAPR_WF_DISABLE_DETECTION` - Disable non-determinism detection (set to `true`)
351+
- `DAPR_WF_DISABLE_DETERMINISTIC_DETECTION` - Disable non-determinism detection (set to `true`)
352352

353353
Example:
354354

355355
```sh
356-
export DAPR_WF_DISABLE_DETECTION=false
356+
export DAPR_WF_DISABLE_DETERMINISTIC_DETECTION=false
357357
```
358358

359359
### Async workflow authoring

durabletask/aio/ASYNCIO_ENHANCEMENTS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,12 +143,12 @@ Why enable detection (briefly):
143143
### Performance Impact
144144
- `"off"`: Zero overhead (recommended for production)
145145
- `"best_effort"/"strict"`: ~100-200% overhead due to Python tracing
146-
- Global disable: Set `DAPR_WF_DISABLE_DETECTION=true` environment variable
146+
- Global disable: Set `DAPR_WF_DISABLE_DETERMINISTIC_DETECTION=true` environment variable
147147

148148
## Environment Variables
149149

150150
- `DAPR_WF_DEBUG=true` / `DT_DEBUG=true` - Enable debug logging, operation tracking, and non-determinism warnings
151-
- `DAPR_WF_DISABLE_DETECTION=true` - Globally disable non-determinism detection
151+
- `DAPR_WF_DISABLE_DETERMINISTIC_DETECTION=true` - Globally disable non-determinism detection
152152

153153
## Developer Mode
154154
## Workflow Metadata and Headers (Async Only)

durabletask/aio/ASYNCIO_INTERNALS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ async def my_async_orch(ctx, _):
209209
...
210210
```
211211
- Debug gating (best_effort only): set `DAPR_WF_DEBUG=true` (or `DT_DEBUG=true`) to enable full detection; otherwise a no‑op tracer is used to minimize overhead.
212-
- Global disable (regardless of mode): set `DAPR_WF_DISABLE_DETECTION=true` to force `OFF` behavior without changing code.
212+
- Global disable (regardless of mode): set `DAPR_WF_DISABLE_DETERMINISTIC_DETECTION=true` to force `OFF` behavior without changing code.
213213

214214
What warnings/errors look like:
215215
- Warning (`BEST_EFFORT`):
@@ -240,7 +240,7 @@ Quick mapping of alternatives:
240240
Troubleshooting tips:
241241
- Seeing repeated warnings? They are deduplicated per callsite; different files/lines will warn independently
242242
- Unexpected strict errors during replay? Confirm you are not creating background tasks (`asyncio.create_task`) or performing I/O in the orchestrator
243-
- Need to quiet a test temporarily? Use `sandbox_mode=SandboxMode.OFF` for that orchestrator or `DAPR_WF_DISABLE_DETECTION=true` during the run
243+
- Need to quiet a test temporarily? Use `sandbox_mode=SandboxMode.OFF` for that orchestrator or `DAPR_WF_DISABLE_DETERMINISTIC_DETECTION=true` during the run
244244

245245
## Integration with Generator Runtime
246246

durabletask/aio/context.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def __init__(self, base_ctx: dt_task.OrchestrationContext):
9090
self._sandbox_mode: Optional[str] = None
9191

9292
# Performance optimization: Check if detection should be globally disabled
93-
self._detection_disabled = os.getenv("DAPR_WF_DISABLE_DETECTION") == "true"
93+
self._detection_disabled = os.getenv("DAPR_WF_DISABLE_DETERMINISTIC_DETECTION") == "true"
9494

9595
# Core properties from base context
9696
@property

durabletask/aio/sandbox.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
from .errors import NonDeterminismWarning, SandboxViolationError
3636

3737
# Capture environment variable at module load to avoid triggering non-determinism detection
38-
_DISABLE_DETECTION = os.getenv("DAPR_WF_DISABLE_DETECTION") == "true"
38+
_DISABLE_DETECTION = os.getenv("DAPR_WF_DISABLE_DETERMINISTIC_DETECTION") == "true"
3939

4040

4141
class SandboxMode(str, Enum):

tests/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ export DAPR_WF_DEBUG=true
116116
export DT_DEBUG=true
117117

118118
# Disable non-determinism detection globally
119-
export DAPR_WF_DISABLE_DETECTION=true
119+
export DAPR_WF_DISABLE_DETERMINISTIC_DETECTION=true
120120
```
121121

122122
## Running Specific Test Suites

tests/aio/test_context.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ def test_detection_disabled_property(self):
468468
from unittest.mock import patch
469469

470470
# Test with environment variable
471-
with patch.dict(os.environ, {"DAPR_WF_DISABLE_DETECTION": "true"}):
471+
with patch.dict(os.environ, {"DAPR_WF_DISABLE_DETERMINISTIC_DETECTION": "true"}):
472472
disabled_ctx = AsyncWorkflowContext(self.mock_base_ctx)
473473
assert disabled_ctx._detection_disabled == True
474474

tests/aio/test_sandbox.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ async def dummy():
612612

613613
@pytest.mark.asyncio
614614
async def test_env_disable_detection_allows_create_task(self):
615-
"""DAPR_WF_DISABLE_DETECTION=true forces mode off; create_task allowed."""
615+
"""DAPR_WF_DISABLE_DETERMINISTIC_DETECTION=true forces mode off; create_task allowed."""
616616
import durabletask.aio.sandbox as sandbox_module
617617
from durabletask.aio import AsyncWorkflowContext
618618

@@ -632,7 +632,7 @@ async def quick():
632632
assert await t == "ok"
633633

634634
def test_sandbox_scope_global_disable_env_var(self):
635-
"""Test that DAPR_WF_DISABLE_DETECTION environment variable works."""
635+
"""Test that DAPR_WF_DISABLE_DETERMINISTIC_DETECTION environment variable works."""
636636
import durabletask.aio.sandbox as sandbox_module
637637

638638
original_random = random.random

0 commit comments

Comments
 (0)