Skip to content

UN-4128 [FIX] Stop the pipeline/ETL list page from 500ing - #2291

Merged
kirtimanmishrazipstack merged 4 commits into
mainfrom
UN-4128-pipeline-list-serializer-crash
Sep 18, 2026
Merged

kirtimanmishrazipstack merged 4 commits into
mainfrom
UN-4128-pipeline-list-serializer-crash

Conversation

@kirtimanmishrazipstack

Copy link
Copy Markdown
Contributor

What

  • The Pipeline/ETL list page returns a 500 error instead of the list.

Why

  • A recent change scopes the "workflow" field on a pipeline to only the workflows you actually own, so you can't schedule a colleague's workflow by guessing its ID. It checked "is there an instance at all" to decide when to apply that scoping — but a list request hands it the whole list, not a single pipeline, so that check let a list slip through and crash.

How

  • The check now confirms the instance is actually one Pipeline, not just non-empty — isinstance(self.instance, Pipeline) in place of self.instance is not None. Detail and update requests are unaffected; only the list request was ever passing a non-Pipeline value here.

Can this PR break any existing features? If yes, please list possible items. If no, please explain why. (PS: Admins do not merge the PR without this section filled)

  • No — this narrows a check that was too permissive. Every request that used to reach this code and work correctly (create, detail, update) still does; only the list request, which used to crash, now works too.

Database Migrations

  • None.

Env Config

  • None.

Relevant Docs

  • None.

Related Issues or PRs

Dependencies Versions

  • None.

Notes on Testing

  • Reproduced directly: serializing a pipeline queryset with many=True raised AttributeError: 'list' object has no attribute 'workflow_id' on main; confirmed it no longer does with this fix. Manually verified against a local ETL pipeline list page.

Screenshots

Checklist

I have read and understood the Contribution Guidelines.

🤖 Generated with Claude Code

https://claude.ai/code/session_018KZLGSa3oWxgVJdFqvRUQX

…ing guard

PipelineSerializer.get_fields() (UN-2868, #2273) scopes the workflow field
to the requester's own workflows, guarding the single-instance case with
`self.instance is not None`. On a list request DRF hands the child
serializer of a many=True ListSerializer the whole queryset as
self.instance, not one row -- `is not None` let that through and
`.workflow_id` crashed on a list.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018KZLGSa3oWxgVJdFqvRUQX
@greptile-apps

greptile-apps Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

via Greptile

RetriggerConfidence Score: 5/5

The PR appears safe to merge; the collection crash is narrowly fixed and directly covered without weakening single-pipeline workflow scoping.

Summary

This PR prevents pipeline and ETL list serialization from treating a collection as a single Pipeline.

  • Restricts the existing workflow-queryset carve-out to serializers bound to an actual Pipeline.
  • Preserves workflow selection for detail and update requests.
  • Adds direct coverage for list-valued instances, many=True construction, and single-instance behavior.

Reviews (4) · Last reviewed commit: "Merge branch 'main' into UN-4128-pipelin..."

Comment thread backend/pipeline_v2/serializers/crud.py
Covers the AttributeError DRF's paginated list GET triggers when
self.instance is a list instead of a Pipeline or None.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Greptile asked for a test that exercises PipelineSerializer(queryset,
many=True) directly instead of hand-setting self.instance. DRF's
many_init passes the same instance to the child, so both paths already
caught the regression, but this removes any doubt.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown
Contributor

Unstract test results

Per-group results

Status Group Tier Passed Failed Errors Skipped Duration (s)
e2e-api-deployment e2e 3 0 0 0 26.9
e2e-coowners e2e 1 0 0 0 1.6
e2e-etl e2e 1 0 0 0 14.5
e2e-login e2e 2 0 0 0 1.3
e2e-prompt-studio e2e 1 0 0 0 4.6
e2e-smoke e2e 2 0 0 0 1.3
e2e-workflow e2e 1 0 0 0 20.2
frontend unit 0 1 0 0 0.0
integration-backend integration 598 0 0 26 33.8
integration-connectors integration 1 0 0 7 5.1
integration-workers integration 153 5 0 1 34.4
ui e2e 0 1 0 0 0.0
unit-backend unit 1282 0 0 1 45.8
unit-connectors unit 63 0 0 0 10.0
unit-core unit 115 0 0 0 2.1
unit-platform-service unit 15 0 0 0 2.7
unit-rig unit 120 0 0 0 4.7
unit-runner unit 5 0 0 0 3.0
unit-sdk1 unit 543 0 0 0 31.5
unit-workers unit 1347 0 0 1 125.7
TOTAL 4253 7 0 36 369.1

Critical paths

⚠️ Critical paths not yet covered

  • workflow-execution-fan-out — Multi-file workflow execution fans out to file-processing workers and rejoins. (declared coverage: no groups declared)
✅ Covered critical paths
  • auth-login — covered by e2e-login
  • adapter-register-llm — covered by integration-backend
  • workflow-author — covered by integration-backend
  • co-owner-manage — covered by integration-backend, e2e-coowners
  • workflow-create-execute — covered by e2e-workflow
  • api-deployment-provision — covered by integration-backend
  • api-deployment-auth — covered by integration-backend
  • api-deployment-run — covered by e2e-api-deployment
  • mcp-server-auth — covered by integration-backend
  • mcp-platform-auth — covered by integration-backend
  • platform-key-whoami — covered by integration-backend
  • prompt-studio-author — covered by integration-backend
  • prompt-studio-fetch-response — covered by e2e-prompt-studio
  • connector-register-test — covered by integration-backend
  • pipeline-etl-execute — covered by e2e-etl
  • usage-aggregate-read — covered by integration-backend
  • usage-token-tracking — covered by e2e-api-deployment
  • callback-result-delivery — covered by e2e-api-deployment

@kirtimanmishrazipstack
kirtimanmishrazipstack merged commit 58d695d into main Sep 18, 2026
10 checks passed
@kirtimanmishrazipstack
kirtimanmishrazipstack deleted the UN-4128-pipeline-list-serializer-crash branch September 18, 2026 11:14
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.

2 participants