Skip to content

fix: improve condition handling and event emission for failed steps#607

Open
jumski wants to merge 1 commit into02-06-fix_fixed_decrements_for_remaining_depsfrom
02-06-cover_more_edge_cases
Open

fix: improve condition handling and event emission for failed steps#607
jumski wants to merge 1 commit into02-06-fix_fixed_decrements_for_remaining_depsfrom
02-06-cover_more_edge_cases

Conversation

@jumski
Copy link
Contributor

@jumski jumski commented Feb 6, 2026

Improved Condition Handling and Task Failure Management

This PR enhances the condition handling and task failure management in PGFlow with several key improvements:

  1. Added default values for condition handling modes:

    • whenUnmet defaults to 'skip'
    • whenExhausted defaults to 'fail'
  2. Improved failure handling for unmet conditions:

    • Added realtime event broadcasting for step and run failures
    • Implemented automatic archiving of queued messages when a run fails due to unmet conditions
  3. Enhanced task failure handling:

    • Made task failure handling more robust and idempotent for replayed failures
    • Fixed the order of operations in skip-cascade scenarios to ensure proper propagation
    • Added proper handling of taskless map steps after dependency skips
  4. Added comprehensive test coverage:

    • Tests for condition evaluation failure events
    • Tests for message archiving on failure
    • Tests for idempotent task failure handling
    • Tests for proper downstream step activation after skips

These changes improve the reliability and observability of workflow execution, particularly in failure scenarios.

@changeset-bot
Copy link

changeset-bot bot commented Feb 6, 2026

⚠️ No Changeset found

Latest commit: a347e8c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor Author

jumski commented Feb 6, 2026

@nx-cloud
Copy link

nx-cloud bot commented Feb 6, 2026

View your CI Pipeline Execution ↗ for commit a347e8c

Command Status Duration Result
nx run edge-worker:test:integration ✅ Succeeded 6m 30s View ↗
nx run client:e2e ✅ Succeeded 3m 48s View ↗
nx affected -t verify-exports --base=origin/mai... ✅ Succeeded 4s View ↗
nx affected -t build --configuration=production... ✅ Succeeded 4s View ↗
nx affected -t lint typecheck test --parallel -... ✅ Succeeded 2m 32s View ↗
nx run core:pgtap ✅ Succeeded 2m 31s View ↗
nx run cli:e2e ✅ Succeeded 5s View ↗
nx run edge-worker:e2e ✅ Succeeded 48s View ↗

☁️ Nx Cloud last updated this comment at 2026-02-13 19:57:10 UTC

@jumski jumski force-pushed the 02-06-cover_more_edge_cases branch 2 times, most recently from 0852217 to 9db59ea Compare February 13, 2026 16:08
@jumski jumski force-pushed the 02-06-cover_more_edge_cases branch from 9db59ea to a347e8c Compare February 13, 2026 19:46
@github-actions
Copy link
Contributor

🔍 Preview Deployment: Website

Deployment successful!

🔗 Preview URL: https://pr-607.pgflow.pages.dev

📝 Details:

  • Branch: 02-06-cover_more_edge_cases
  • Commit: 6b334a9496f8fb8d5897475221b37a0e930f0cd7
  • View Logs

_Last updated: _

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant