-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Chore: Sync fuzzer: Re-use the same CLI process for commands run on the same client #12913
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
Chore: Sync fuzzer: Re-use the same CLI process for commands run on the same client #12913
Conversation
each command This commit is an attempt to improve sync fuzzer performance and work around random failures. It's currently failing after a few steps of the sync fuzzer due to a "Master key not loaded" error.
I'm not sure why this wasn't caught by the linter during commit...
Some of the changes to |
['--exit-early', 'Allow the command to exit while the server is still running. The server will still stop when the app exits. Valid only for the `start` subcommand.'], | ||
['--quiet', 'Log less information to the console. More verbose logs will still be available through log-clipper.txt.'], |
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.
['--exit-early', 'Allow the command to exit while the server is still running. The server will still stop when the app exits. Valid only for the `start` subcommand.'], | |
['--quiet', 'Log less information to the console. More verbose logs will still be available through log-clipper.txt.'], | |
['--exit-early', _('Allow the command to exit while the server is still running. The server will still stop when the app exits. Valid only for the `start` subcommand.')], | |
['--quiet', _('Log less information to the console. More verbose logs will still be available through log-clipper.txt.')], |
These commands are mostly intended for debugging. However, since they have help text, it may make sense to allow the help text to be localized.
Summary
Note
The changes included in this pull request were originally made as a part of #12741, to help debug fuzzer failures.
This pull request adjusts how commands are run by the sync fuzzer.
yarn start-no-build
(with arguments specifying the command), which starts an instance of the CLI application.This pull request updates the fuzzer to run all commands for a
Client
in the same CLI application process, including the web clipper.To simplify debugging, this pull request also adjusts the fuzzer's behavior when an issue is detected:
Client
to the foreground when the fuzzer stops.See #12741.
Supporting changes
Client.sync
is now retried after a delay on failure.batch
CLI command, when the file name is set to-
, has been updated to accept input from stdin.Client
object to start a single background CLI application and communicate with it throughprocess.stdin
andprocess.stdout
.server
CLI command has been updated to support--exit-early
and--quiet
options.server
command starts the webclipper API server.--exit-early
option allows the command to return while the server is still running. This allows the API server to be started from the main CLI process, without blocking other commands from running.--quiet
option prevents the webclipper logger from sending warning, debug, and info-level to stdout. This log information is still sent tolog-clipper.txt
.--quiet
flag, the webclipper logs would be included in the output of thebatch
command. The fuzzer reads this output to determine, for example, the content of notes.