fix(AI-3664): migrate flow integration tests off legacy Orchestrator to Conditional Flows - #653
Conversation
|
@claude review |
There was a problem hiding this comment.
Pull request overview
This PR updates the flow-related integration tests to avoid creating legacy Orchestrator (keboola.orchestrator) flows, which are now rejected in the pooled integtest project, by migrating those scenarios to Conditional Flows (keboola.flow). It also bumps the project version to reflect the patch-level change.
Changes:
- Replaced legacy-flow creation coverage in flow integtests with Conditional Flow creation (including adding a second conditional-flow fixture for tests that need two flows).
- Updated scheduler integtests to operate on a Conditional Flow instead of a legacy Orchestrator flow.
- Bumped
keboola-mcp-serverversion from1.74.3to1.74.4(and synceduv.lock).
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| uv.lock | Updates the editable package version to 1.74.4 to match the project bump. |
| pyproject.toml | Bumps project version to 1.74.4. |
| integtests/tools/flow/conftest.py | Replaces the legacy-flow fixture with a second conditional-flow fixture (initial_cf2). |
| integtests/tools/flow/test_tools.py | Removes legacy-flow create test, adjusts update/list/lifecycle tests to use Conditional Flows. |
| integtests/tools/flow/test_scheduler.py | Switches scheduler tooling test to target a Conditional Flow (keboola.flow). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@claude review |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 5 changed files in this pull request and generated no new comments.
Suppressed comments (1)
integtests/tools/flow/test_tools.py:833
- The cleanup code swallows deletion failures but logs only the exception message, which drops the traceback and makes CI flakes hard to diagnose. Prefer logging with
exc_info=True(orLOG.exception) when catching broadException.
except Exception as e:
LOG.warning(f'Failed to delete {flow_type} flow {flow_id}: {e}')
keboola-pr-reviewer-bot
left a comment
There was a problem hiding this comment.
reviewer could not complete: reviewer model call errored (subtype=success, api_status=400) after 1/18 turn(s).
Retry with @keboola-pr-reviewer review once the underlying issue clears.
ReviewVerified the diff, the branch state vs What the PR doesIntegration Tests were red on Diagnosis is right and the fix works — Integration Tests pass on 3.10/3.11/3.12. Net −192 lines, and The Must fix1. Version bump collides with Both sides make the identical edit, so git merges it cleanly with no conflict — and this PR ends up shipping no version bump at all, which the "every PR must bump Should fix2. Legacy Deleting the cases rather than skipping them means that coverage never comes back and nobody notices. Two reasonable options:
Either way, worth a line in the PR body saying which — right now the deletion reads as incidental. 3. Flow leak in first_result = await create_conditional_flow(...)
assert isinstance(first_result, FlowToolOutput)
assert first_result.success is True
...
created_flows.append((CONDITIONAL_FLOW_COMPONENT_ID, first_result.configuration_id))If any of those asserts fails, the flow was already created in the shared project but never registered for deletion. Nits4. @pytest_asyncio.fixture
def create_test_cf(mcp_client, configs, keboola_client):
@asynccontextmanager
async def _create(name: str) -> AsyncGenerator[FlowToolOutput, None]:
... # single copy of the create/yield/delete body
return _create5. 6. Worth taking the suppressed Copilot comment. 7. Comment rot. "Legacy Orchestrator flow creation is disabled on the test project" describes a transient platform state in a permanent place. Reference AI-3664 or the platform decision instead, so the comment doesn't become misleading if the project config changes. 8. VerdictGood to go after the version bump is corrected to 1.74.5 (must-fix #1). #2 and #3 are worth resolving before merge but neither blocks unblocking CI — given that Integration Tests are currently red for everyone, landing this quickly with #1 fixed and #2/#3 as immediate follow-ups is a defensible call. 🤖 Reviewed with Claude Code |
jordanrburger
left a comment
There was a problem hiding this comment.
Approving — correct root-cause fix and Integration Tests are green on all three Python versions.
Please still bump to 1.74.5 before merging (main already took 1.74.4 via #650, so as-is this PR ships no version bump) and re-run uv lock. The rest of my review comment — the lost legacy create_flow coverage and the flow-leak window in test_flow_lifecycle_integration — is fine as follow-up given CI is red for everyone right now.
…nditional Flows
The pooled integtest project now rejects legacy Orchestrator (keboola.orchestrator)
flow creation with a 403 ("Creation of new Flows is disabled. Please use
Conditional Flows instead."), breaking Integration Tests CI for every PR.
- conftest.py: initial_lf fixture (created via legacy create_flow) replaced with
initial_cf2, a second Conditional Flow instance.
- test_tools.py: removed test_create_and_retrieve_flow (legacy-only duplicate of
test_create_and_retrieve_conditional_flow), dropped legacy parametrize cases from
test_update_flow, switched test_get_flows_list and test_flow_lifecycle_integration
to use two Conditional Flow instances instead of one legacy + one conditional.
- test_scheduler.py: test_scheduler_lifecycle_tooling now schedules against a
Conditional Flow instead of a legacy Orchestrator flow.
test_get_flow_schema and test_create_legacy_flow_invalid_structure are unchanged
since they never hit the disabled create endpoint (GET-only / client-side
validation respectively).
- test_update_flow: drop the flow_type parametrize axis (every case was already Conditional Flow only) instead of leaving a param that no longer drives flow_id selection — avoids a latent flow_type/configuration_id mismatch if a legacy case were ever added back. - test_flow_lifecycle_integration: wrap flow creation/assertions in try/finally so created flows are always cleaned up, even if an assertion fails mid-test (previously a failure could leak flows into the project).
Main already took 1.74.4 via #650; re-bump to avoid shipping this PR with no version change.
4949f09 to
41dc8ca
Compare
Rebased onto main after #653 merged carrying 1.74.5, which is the version this branch previously set. The identical bump was dropped as already-applied during the rebase, so the branch is re-bumped to 1.74.6 to stay strictly above main. uv.lock carries only the version line change: the locally available uv (0.12.1) re-resolves some dependency environment markers differently from the uv that generated main's lock in #653, so a full 'uv lock' would have reverted that unrelated marker churn. 'uv sync --frozen --extra dev --extra tests' -- the check CI actually runs -- succeeds against this lock. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GKKhNMuwHvtoTFt5hUVpLj
|
🚀 Shipped in release |
Description
Linear: AI-3664
Change Type
Summary
Integration Tests started failing on all 3 Python versions on
main(discovered via PR #652 CI,unrelated to that PR's actual change). Root cause: the pooled integtest project now rejects
legacy Orchestrator flow creation:
The last successful CI run on
mainwas 3 days prior — this is a platform-side change to theshared test project, not a code regression, but it breaks Integration Tests for every PR right
now.
This PR migrates every flow integration test that actually creates a legacy Orchestrator
(
keboola.orchestrator) flow via the real API to create a Conditional Flow (keboola.flow)instead:
conftest.py:initial_lffixture (legacycreate_flow) →initial_cf2, a second ConditionalFlow instance.
test_tools.py: removedtest_create_and_retrieve_flow(legacy-only, was a duplicate oftest_create_and_retrieve_conditional_flow), dropped legacy parametrize cases fromtest_update_flow, switchedtest_get_flows_listandtest_flow_lifecycle_integrationto usetwo Conditional Flow instances instead of one legacy + one conditional.
test_scheduler.py:test_scheduler_lifecycle_toolingnow schedules against a Conditional Flow.Left unchanged (don't hit the disabled create endpoint):
test_get_flow_schema(GET-only) andtest_create_legacy_flow_invalid_structure(client-side validation, raises before any API call).No RFC — this is a test fix, not new behavior (per
CONTRIBUTING.mdRFC table).Testing
Streamable-HTTPtransports)Optional testing
canary-orionMCP (Streamable-HTTP)canary-orioncanary-orionChecklist