-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
π fix: eliminate zombie jobs (#96)
* π¨ [chore] create chainEndpoint constant This commit moves the hard-coded network chains endpoint into a `chainEndpoint` constant for better visibility and configurability. * β¨ Feat: add manuscript state machine Added a Manuscript State Detector which can be instanciated in the ListJobs() function for sake of identifying manuscript state with accuracy and finality. The state machine executes a series of elaborate looks at container status and flink logs to update to one of five states: RUNNING, INITIALIZING, FAILED, STOPPED, and UNKNOWN (rare). This is the grounds for more advanced manuscript detection from the CLI. * β»οΈ [chore] refactor listjobs to accomodate state machine This commit adds new logic to jobs_manuscipt that allows for the detection of manuscripts by using `manuscript_state.go` * π‘ [chore] add comments to state machine Recognizing that there is a lot of complicated logic in the state detector, I added comments explaining its general operation throughout. * π Fix: enhance manuscript state detection Within the DetectState method, manuscripts previously defaulted to initializing state, despite surviving all previous checks. Now, if a manuscript survives all checks it will display as `RUNNING` in the jobs list. * π¦Ί [chore] add graphQL check to state detector This adds as an additional state check - the checkGraphQLEndpoint function which hits the local endpoint to determine healthiness and ensure it is live before returning RUNNING. If it is determined not to be live, but survive all other checks, the manuscript will return INITIALIZING status. * π [chore] add additional help documentation for cli `list` cmd This commit adds additional status indicators to the long help text of the list command. * β¨ [feat] add alias `ls` to cli `list` command This commit adds an alias, `ls` to the list command. * π¦Ί [chore] add guard rails for cli init This commit adds additional guard rails to fix broken functionality of `init` command that was affecting the jobs list. Previously, a person could init and partially overwrite an existing manuscript. Now, extensive checks are in place to prevent that from happening: manuscript is looked for in the directory of the manuscript path, the manuscript is already running, the manuscript is in the config file. * β¨ [feat] enhance `manuscript-cli list` cmd This commit adds new functionality to manuscript-cli list. It now accepts a directory as an argument. If no directory is specified it looks in the default directory for users. It also shows STOPPED jobs by looking at the manuscript yamls in the subdirectories of the specified directory and showing ALL manuscripts. This makes it more informative and usable.
- Loading branch information
1 parent
db496fc
commit a9bdbdb
Showing
6 changed files
with
419 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.