Skip to content

Temporarily deprecate workflow support (#23) - #26

Open
willwebster5 wants to merge 8 commits into
masterfrom
chore/deprecate-workflows
Open

Temporarily deprecate workflow support (#23)#26
willwebster5 wants to merge 8 commits into
masterfrom
chore/deprecate-workflows

Conversation

@willwebster5

Copy link
Copy Markdown
Owner

Summary

Temporarily deprecates talonctl workflow support so the tool stops crashing on workflows, while preserving the provider code for a future tested rewrite. Addresses the immediate breakage in #23.

Why

The workflow provider was non-functional (verified against FalconPy Workflows v1.6.1):

  • apply_delete called delete_definition(...)no delete method exists on the Workflows class; the CrowdStrike Workflows API does not expose workflow-definition deletion.
  • requires_replacement() forced REPLACE (delete + recreate) for every change and apply_update() hard-raised — so with no delete, no workflow change was deployable; apply crashed mid-wave.
  • _fetch_all_remote_workflows called get_definitions(...) — also non-existent → sync/drift raised AttributeError. (search_definitions already returns full models, so that batch loop was never needed.)
  • update_definition exists but 500s on a naive compiled-model round-trip; the correct payload shape is unknown and can't be validated without live-tenant access.

A partial-but-crashing provider is worse than an honestly-unavailable one, hence temporary deprecation rather than a rushed, untestable fix.

What changed

  • Discovery (template_discovery.py): "workflow" moved to a new DEPRECATED_RESOURCE_TYPES. Workflow templates are still scanned, emit a clear deprecation warning, and are excluded from results — so no "workflow" key reaches validate/plan/apply/sync/drift.
  • Provider dispatch (provider_adapter.py): workflow provider unregistered.
  • Drift: "workflow" removed from FETCHABLE_TYPES.
  • init: no longer scaffolds resources/workflows/.
  • Provider + example kept with deprecation notices documenting the exact API findings for a future rewrite.
  • Docs: README/CLAUDE.md "seven → six" resource types, CHANGELOG entry, provider docs.

Behavior after this change

A project that still contains workflow templates gets a one-time warning and the templates are ignored; all other resource types proceed normally. No command crashes — even with an explicit --resources=workflow (downstream consumers all use .get() / iterate discovered results).

WARNING ... workflow support is temporarily deprecated (see issue #23) — workflow template(s) will be ignored by validate/plan/apply/sync/drift.
workflow in results: False

Testing

  • pytest tests/799 passed; ruff format --check . and ruff check . clean.
  • New discovery test asserts workflow templates warn + are excluded.
  • Removed two tests that mocked non-existent SDK methods (get_definitions, delete_definition) — they passed only via Mock auto-attributes, codifying the bug.
  • This environment has no live NGSIEM API access, so all changes were verified offline.

Not in scope

A working update path (needs live-tenant testing of the update_definition 500 and possibly a CrowdStrike support ticket) and disable-as-destroy semantics via workflow_definition_action — these belong to the future un-deprecation work.

🤖 Generated with Claude Code

willwebster5 and others added 8 commits June 19, 2026 18:09
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…od tests (#23)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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