-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cylc review: URL encode links #3125
Conversation
Appears to fix the issue for #3121. Added to next release, but we can push to 7.8.3 if it's better. Tried to fix it as I found the bug and it was included for 7.8.x series 👍 |
Added @sadielbartholomew as one of the reviewers as she should be aware of what was the issue about. Happy to anyone else step in as second reviewer 👍 |
But looks like I will have to edit this PR to include a fix for slashes, as Jinja2 developers decided against escaping the slash. Which caused issues in Ansible and other tools. One example was automatic generated passwords with slash that were not correctly escaped 😞 Will include a fix for the slash in a few minutes. |
Good for 7.8.2. If @sadielbartholomew can review by early next week (we need to get the release out by May 1, I think. |
No problem, otherwise I think it would just go to 7.8.3 or maybe postponed to Cylc 8 (not sure how common are suites with these special characters) |
Manual tests passed for me. @sadielbartholomew added another commit with more changes. It may require further time to test, so feel free to push to after 7.8.2 (i.e. remove next-release milestone, set to 7.8.3 or later I think). I registered suites with names such as:
And I used two And the other suite I quickly wrote to have a task with some special characters too, which required adding
Hope that helps testing and reproducing the issues. Cheers |
Sorry @kinow, I have been very busy with user support, but I'm reviewing this now. Thanks for your patience. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- cylc review: Links broken when suites names contain URL encoded names #3121 re-recreated & tested as fixed on this branch;
- cylc review: Server 404 error when trying Display Options for suites contain special characters #3119 ditto (including with
/
characters); - I agree with the approach & the code changes are logical.
Well spotted for these bugs! FYI, I have now got clarification on the task & suite names we consider valid (which does include the %
character), & I will shortly amend the scope of my PR #3117 to:
- make this explicit in the documentation;
- make validate consistent, to report agreed (in)valid names as (in)valid;
- ensure the set of all valid names function properly, with respect to:
- suite (runtime) behaviour;
- Cylc Review.
Thanks Sadie! Happy to close this one if #3117 will supersede it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I'm interpreting @sadielbartholomew's approval of this PR literally! Merging... |
Oh, I hadn't seen her approval, only the comment (replied around 5AM after the fire alarm sounded in my building until near 6AM 😴 ) |
Damn, that sucks! |
Close #3121
Close #3119
Use Jinja2's
urlencode
filter instead of replacing characters individually. Tested with Cylc suites "cylc1" and "%63ylc1". Links working as below.EDIT: added another close #3119 as it appears to fix both issues 👍