yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #78261
[Bug 1824484] Re: workflow modal add_item_link is broken
Reviewed: https://review.opendev.org/652009
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=8516de8f612f243631d84b65ba113ca48d8b7e20
Submitter: Zuul
Branch: master
commit 8516de8f612f243631d84b65ba113ca48d8b7e20
Author: Adrian Turjak <adriant@xxxxxxxxxxxxxxx>
Date: Fri Apr 12 20:24:46 2019 +1200
Correctly set content-type for workflow response
The default content-type is html, and under certain
circumstances like devstack the html has some additional
comments added. Because this specific content is meant
to be parsed as json those extra html comments break the
modal.js code.
We can't set the content-type to json without rewriting parts of
modal.js, as it will will parse it into an object early and then
modal.js will fail as it attempts to parse an object into json.
Change-Id: If5a9ee7fe4273dc368dec7767a55d4467bf6a1a7
Closes-bug: #1824484
** Changed in: horizon
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1824484
Title:
workflow modal add_item_link is broken
Status in OpenStack Dashboard (Horizon):
Fix Released
Bug description:
When using add_item_link in a workflow action (like the workflow for
allocating a floating ip to an instance), the modal throws an error
and never returns to the original action.
The form view for the floating ip allocation action is returning the following:
"["f5aae610-0bed-45d7-a5e5-1cae9f3a30a7", "172.24.4.42"]<!-- F07NtaYHLrZ0M7Du -->"
Which then the modal.js code can't parse as json and just stalls:
https://github.com/openstack/horizon/blob/master/horizon/static/horizon/js/horizon.modals.js#L330
I'm not 100% sure what the hell "<!-- F07NtaYHLrZ0M7Du -->" is, or
where it is coming from, but it's something I've only just now
encountered in Devstack. I find it unlikely that Django itself does
it, so it could be something like apache.
The issue goes away when we set the content-type to text/plain. We
can't set it to json because other parts of the modal.js parse it and
then the code breaks in the same place but for different reasons...
Basically, we aren't setting content-type, so it defaults to html:
https://github.com/openstack/horizon/blob/master/horizon/forms/views.py#L195
To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1824484/+subscriptions
References