Awx: API Pagination broken on complex workflow visualizer

Created on 3 Jul 2019  路  3Comments  路  Source: ansible/awx

ISSUE TYPE
  • Bug Report
SUMMARY

Line 139 on awx/ui/client/src/templates/templates.service.js contains a forward-slash in getWorkflowJobTemplateNodes that is interpreted as part of the pagesize integer (and thereby throwing an exception) when a complex workflow spans multiple pages of workflow nodes.
I think the bug may have been introduced when 'page_size=200' was added to the querystring in commit 700860e040ab7d2e944cad445f564c0822b9c45e.

ENVIRONMENT
  • AWX version: 6.0.0
  • AWX install method: docker on linux
  • Ansible version: 2.8.1
  • Operating System: Ubuntu 18.04
  • Web Browser: Google Chrome 75.0.3770.100 64bit
STEPS TO REPRODUCE
  1. Create a workflow with more than 200 nodes.
  2. View in workflow visualiser
EXPECTED RESULTS

Workflow graphically rendered

ACTUAL RESULTS

An error is displayed and the workflow is not rendered.
"Call to /api/v2/workflow_job_templates/171/workflow_nodes/?page_size=200/&page=1 failed. GET returned status: 500. A server error has occurred."

ADDITIONAL INFORMATION

In theory, removing the forward-slash should fix this (and does in my own limited tests).
i.e. line 139 becomes "url += '&page=' + page;"

help wanted medium escape regression bug

All 3 comments

@pebbledavec thanks for creating this issue and pinpointing the line of code causing the bug.

I believe the code change you've proposed here should fix the bug you've identified - how do you feel about opening a PR to update that url string? You're almost there! We'd be happy to review it and merge it in.

@pebbledavec Hey there!

Any news on this one? Do you still want to get this one across the finish line?

Should be able to get it done in my lunch break today. Thanks for the reminder!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

agaffney picture agaffney  路  3Comments

marshmalien picture marshmalien  路  3Comments

shortsteps picture shortsteps  路  3Comments

artmakh picture artmakh  路  3Comments

cs35-owncloud picture cs35-owncloud  路  3Comments