Skip to content

Conversation

@bigbitbus
Copy link
Contributor

@bigbitbus bigbitbus commented Jan 16, 2026

What does this PR do?

It allows the inference server configuration to selectively disable blocks at loading time. So any workflows containing these blocks will fail.

This is needed for some infrastructure testing work, but may have more uses like security, dev-environments etc.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Other:

Testing

  • I have tested this change locally
  • I have added/updated tests for this change

Test details:

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code where necessary, particularly in hard-to-understand areas
  • My changes generate no new warnings or errors
  • I have updated the documentation accordingly (if applicable)

Additional Context


Note

Implements configurable filtering of workflow blocks during load, preventing disabled types/patterns from being registered or discovered.

  • Parse WORKFLOW_DISABLED_BLOCK_TYPES and WORKFLOW_DISABLED_BLOCK_PATTERNS in env.py (lowercased lists)
  • Add _should_filter_block() and apply filtering in load_blocks() to remove matching blocks by block_type or identifier substrings
  • New unit tests in tests/workflows/unit_tests/core_steps/test_loader_block_filtering.py covering type and pattern filtering and feature toggle behavior
  • Add WORKFLOW_BLOCK_FILTERING.md documenting configuration, usage scenarios, deployment examples, and troubleshooting

Written by Cursor Bugbot for commit a1887f6. This will update automatically on new commits. Configure here.

@codeflash-ai
Copy link
Contributor

codeflash-ai bot commented Jan 19, 2026

⚡️ Codeflash found optimizations for this PR

📄 393% (3.93x) speedup for _should_filter_block in inference/core/workflows/core_steps/loader.py

⏱️ Runtime : 21.3 milliseconds 4.32 milliseconds (best of 111 runs)

A dependent PR with the suggested changes has been created. Please review:

If you approve, it will be merged into this PR (branch feat/selective-workflow-blocks-disabling).

Static Badge

@bigbitbus bigbitbus marked this pull request as ready for review January 19, 2026 16:51
@bigbitbus bigbitbus force-pushed the feat/selective-workflow-blocks-disabling branch from f90e453 to 19b658c Compare January 19, 2026 16:52
@bigbitbus
Copy link
Contributor Author

⚡️ Codeflash found optimizations for this PR

📄 393% (3.93x) speedup for _should_filter_block in inference/core/workflows/core_steps/loader.py

⏱️ Runtime : 21.3 milliseconds 4.32 milliseconds (best of 111 runs)

A dependent PR with the suggested changes has been created. Please review:

If you approve, it will be merged into this PR (branch feat/selective-workflow-blocks-disabling).

Static Badge

This is outdated. We changed code after the suggestion.

@bigbitbus bigbitbus force-pushed the feat/selective-workflow-blocks-disabling branch from 1a6dbbc to 4a0d099 Compare January 20, 2026 14:25
@bigbitbus bigbitbus force-pushed the feat/selective-workflow-blocks-disabling branch from 4a0d099 to edf8e8d Compare January 20, 2026 14:28
@grzegorz-roboflow
Copy link
Collaborator

bugbot review

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

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.

3 participants