-
Notifications
You must be signed in to change notification settings - Fork 18
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
Clean gui info files #431
Clean gui info files #431
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #431 +/- ##
==========================================
+ Coverage 78.78% 78.98% +0.20%
==========================================
Files 12 12
Lines 1296 1318 +22
Branches 218 221 +3
==========================================
+ Hits 1021 1041 +20
- Misses 231 233 +2
Partials 44 44
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
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.
Needs a changelog entry. Otherwise ready to roll. :)
- Read Change, looks sane.
- Manually tested and found to fix bug.
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.
Tested. @wxtim do you want to have a look at my comments and approve if you're ok with them being applied?
def get_url_from_file(gui_file): | ||
with open(gui_file, "r") as f: | ||
file_content = f.read() | ||
url_extract_regex = re.compile('url=(.*?)\"') |
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.
😈 https://stackoverflow.com/a/1732454/3217306
May be better to use https://docs.python.org/3/library/html.parser.html in future?
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.
🤣
(probably OK in this context)
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.
Yeah probably only worth doing in future if it breaks at some point
Co-authored-by: Ronnie Dutta <[email protected]>
closes: #416
This fixes a bug whereby, if an existing ui-server is killed with a
kill -9
or with a system crash, jupyter server info files (which serve as a contact file) can be left behind. This is problematic as our logic (added in #370) can select the broken server for re-use which results in the gui opening at an error page, rather than the cylc gui.How to test
For reviewers to test (on master to reproduce the bug)...
cylc gui
cylc gui
(don't use the--new
option)Test again on this branch and the bug should be fixed, with a prompt asking you if you wish to remove the files (either response should result in a gui being opened correctly)
Note that this branch also changes the logic - the html open file is now no longer written to in this process, so functional testing of various gui openings (e.g. with/without
--new
andworkflow_id
) would be prudent.CONTRIBUTING.md
and added my name as a Code Contributor.setup.cfg
(andconda-environment.yml
if present).CHANGES.md
entry included if this is a change that can affect users