Skip to content

Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure

TypeScript

fix(workflow-recipes): retry the legacy delete before validation returns (J1)

Alfredo Lopez452de7c9323d
diff --git a/workflow-recipes/package-lock.json b/workflow-recipes/package-lock.json
index 5eb02f411..35ca72de4 100644
--- a/workflow-recipes/package-lock.json
+++ b/workflow-recipes/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "workload-recipes-controller",
- "version": "0.1.452",
+ "version": "0.1.453",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "workload-recipes-controller",
- "version": "0.1.452",
+ "version": "0.1.453",
"license": "SEE LICENSE IN LICENSE",
"dependencies": {
"@aws-sdk/client-s3": "^3.1009.0",
diff --git a/workflow-recipes/package.json b/workflow-recipes/package.json
index 91591023a..f95e71b5f 100644
--- a/workflow-recipes/package.json
+++ b/workflow-recipes/package.json
@@ -1,6 +1,6 @@
{
"name": "workload-recipes-controller",
- "version": "0.1.452",
+ "version": "0.1.453",
"description": "Workload Recipes Controller (WRC) - WorkloadRecipe lifecycle management and MCP server interface",
"main": "dist/main.js",
"engines": {
diff --git a/workflow-recipes/src/reconciler/workflowRecipeReconciler.ts b/workflow-recipes/src/reconciler/workflowRecipeReconciler.ts
index b0ce5ad75..8ce033537 100644
--- a/workflow-recipes/src/reconciler/workflowRecipeReconciler.ts
+++ b/workflow-recipes/src/reconciler/workflowRecipeReconciler.ts
@@ -1913,6 +1913,14 @@ export class WorkflowRecipeReconciler {
}
}
+ // R4-L4 / R5-J1: the validation, policy and step-limit returns and the
+ // workflow short-circuits below never reach the inner reconcile(), so a
+ // legacy mcp-servers internet policy pending a delete is retried here,
+ // before all of them (the `legacy-retry` writer). Every pass that leaves
+ // DeletePending published has then either sent the DELETE or is inside
+ // its backoff window, and the wrapper's requeue is that window.
+ await this.retryPendingLegacyNetworkPolicyDelete(recipe)
+
const limitError = validateWorkflowRecipeLimits(recipe.spec, this.config)
if (limitError) {
if (isWorkflow) await this.revokeCoordinatorGfsNetworkPolicy(recipe)
@@ -2051,11 +2059,6 @@ export class WorkflowRecipeReconciler {
await this.ensureOAuthBrokerTokenSecret(recipe)
}
- // R4-L4: the short-circuits below never reach the inner reconcile(), so
- // a legacy mcp-servers internet policy pending a delete is retried here,
- // before all of them (the `legacy-retry` writer).
- await this.retryPendingLegacyNetworkPolicyDelete(recipe)
-
if (
currentPhase === 'active' &&
awaitsTriggeredRun &&