-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Handle the case when MANIFEST.json is invalid JSON #10323
Conversation
I don't know how I got into this situation (probably hit ctrl-C at the wrong time) but I did and it was unclear how to get out. It presents as a ValueError with no useful info. Update the code to handle ValueError to log a warning and cause a full regen of the manifest. Also reported in https://crbug.com/822041
@@ -225,6 +225,9 @@ def load(tests_root, manifest): | |||
rv = Manifest.from_json(tests_root, json.load(f)) | |||
except IOError: | |||
return None | |||
except ValueError: |
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.
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.
I created another branch base on that suggestion.
https://github.com/fergald/web-platform-tests/tree/fergald-patch-2
Let me know what you think.
Build PASSEDStarted: 2018-04-05 00:51:04 View more information about this build on: |
This roll is mainly to include web-platform-tests/wpt#10323, which fixes a bug that `wpt manifest` would fail when the local manifest is invalid. wpt.config.json is changed to accomodate: web-platform-tests/wpt#9998 web-platform-tests/wpt#10078 Bug: 822041 Change-Id: I074afd90e32db299fc6f58b870f9b72576fab225 Reviewed-on: https://chromium-review.googlesource.com/997764 Reviewed-by: Quinten Yearsley <qyearsley@chromium.org> Commit-Queue: Robert Ma <robertma@chromium.org> Cr-Commit-Position: refs/heads/master@{#548584}
This CL contains some code health improvements as a by product of fixing issue 822041. Though the root cause of that issue was eventually fixed from upstream (web-platform-tests/wpt#10323), these improvements are still good to have. * WPTManifest raises an exception when `wpt manifest` fails instead of directy exiting the process. Subprocess invocation is simplified. * lint-test-expectations now has a --verbose flag to print debug logs, including error messages from subprocesses (i.e. `wpt manifest`). * Use the canonical configure_logging in lint-test-expectations and LoggingTestCase in its unit test. Also make the unit test stricter as PRESUBMIT.py relies on the output. Bug: 822041 Change-Id: I4724904c61b3c5b6ed3239584ed03089f2b203ce Reviewed-on: https://chromium-review.googlesource.com/998341 Reviewed-by: Quinten Yearsley <qyearsley@chromium.org> Commit-Queue: Robert Ma <robertma@chromium.org> Cr-Commit-Position: refs/heads/master@{#548632}
I don't know how I got into this situation (probably hit ctrl-C at the wrong time) but I did and it was unclear how to get out. It presents as a ValueError with no useful info.
Update the code to handle ValueError to log a warning and cause a full regen of the manifest.
Also reported in https://crbug.com/822041
This change is![Reviewable](https://camo.githubusercontent.com/23b05f5fb48215c989e92cc44cf6512512d083132bd3daf689867c8d9d386888/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)