cylc-flow icon indicating copy to clipboard operation
cylc-flow copied to clipboard

cylc review: Search in file rewrites file content or fails with warning

Open kinow opened this issue 6 years ago • 1 comments

I have two suites in Cylc at the moment that I am testing:

  • suite "cylc1"
  • suite "''.abc.def240"

When I run the suites, I can see the dropdown for "cylc files". Opening the suite.rc, then I am displayed with the contents of the suite.rc processed file.

Pressing "Search", without typing anything, leads to two different behaviours. Both broken in my opinion.

For the suite cylc1, it replaces the characters previously displayed.

Before:

image

After pressing Search:

image

Then for the suite with special characters, before:

image

Pressing Search:

image

I would expect to either display a warning that I need to provide a search query string, or that nothing happened.

kinow avatar Apr 23 '19 02:04 kinow

This is a very interesting issue. First there are some values that need to be URL encoded. In the end I managed to get the local code where URL in the search-form.html was a valid URL encoded URL.

However, CherryPy would refuse to find the viewsearch method in review.py. I suspected it had something to do with how CherryPy did the parsing of values and tried to match to the parameters of the function.

Turns out there are open tickets there that I believe are a blocker for us here.

  • https://github.com/cherrypy/cherrypy/issues/1581
  • https://github.com/cherrypy/cherrypy/issues/1485

Not much we can do here I think. One of the issues has in the title "Python3.4", so I wonder if that will be ever fixed in a release for Python 2.x. Also not sure about priority of that issue, as one of them dates back to 2017.

IMO, it will go away once we have Cylc Review under Tornado in Cylc 8 👍 if so the milestone here must be kept to "later".

kinow avatar Apr 25 '19 23:04 kinow