Conversation
get_n8n_workflows read a single page and returned it as the complete inventory, so installs with more than one page of workflows silently reported the rest as not installed. The session timeout also only bounded the whole request loosely — a repeated or malformed nextCursor could keep the handler looping. Follow nextCursor across pages inside one 5-second asyncio.timeout, treat a non-string or repeated cursor as a 502, and keep the existing 401/403 API-key guidance. A failed page still returns an empty list so a partial inventory is never presented as authoritative.
tang-vu
force-pushed
the
fix/workflows-list-pagination-bounds-20260919
branch
from
September 19, 2026 04:51
0b1f3ab to
2041ce0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
get_n8n_workflowsread only the first/api/v1/workflowspage and returned it as the complete inventory — installs with >1 page silently showed the rest as not installed.nextCursoracross pages inside oneasyncio.timeout(5); a non-string or repeated cursor raises 502 instead of looping.tests/test_workflow_pagination.py; fulltest_workflows.pysuite still passes.Why this matters
The workflow catalog misrepresented installed state for any n8n instance with enough workflows to paginate — the dashboard's single source of truth for "is it installed" was silently wrong past page one.
Overlap check
workflows,pagination,nextCursor,n8n— fix(dashboard-api): validate pagination bounds on workflow executions endpoint #5181 bounds the executions endpoint pagination (different function); fix(workflows): tolerate malformed catalog records and executions payloads #5672/fix(workflows): report the workflow n8n created when activation fails #5644/fix(workflows): match n8n workflows by exact name and stop duplicate imports #5554/Add exception chaining (from e) to all raise statements in except blo… #5476 touch catalog parsing and activation, not the list fetch.Test plan
python -m pytest tests/test_workflow_pagination.py tests/test_workflows.py— 49 passed locally.