Repository navigation
Fix/process utilities - #777
Open
jaen15marcos wants to merge 3 commits into
Open
jaen15marcos wants to merge 3 commits into
jaen15marcos wants to merge 3 commits into
Conversation
The script split its whole command line on '-', so any value with a dash in it (a path such as /opt/torq-prod/...) broke every argument after it, and .sys.bglaunch started a process with a broken -p. It now reads each -flag and the words after it up to the next flag, and builds the same start line as before. tests/bglaunchprocess waited a fixed 2 seconds after launching its second process and then looked it up in discovery, where it was not yet registered. The test process registers with discovery during its own start-up, while it runs the tests, and discovery's register calls back into the registering process (.servers.addw) and waits for the answer. Until the test process next called discovery, discovery could not accept the new process's connection, and that next call was the lookup itself. The suite now asks discovery until the process is there (up to 10 seconds). That process listens on a port of its own choosing (-p 0W), so discovery was the only way the suite could find it, and under a connection limit, such as KDB-X's free licence, TorQ turns discovery off (DataIntellectTech#727) and the last eight rows failed. With discovery off, the suite's processes now write their port to a file in KDBLOG when they start, and the suite finds the process there; run.sh removes the files. The suite also checks that each launch and kill is logged as successful, through TorQ's logging hook (.lg.ext). Its two checks that a killed process's pid is no longer in use list the user's processes by user id (ps -u $(id -u)): with USER unset, ps -u printed only its header, and the checks passed without checking anything.
… .os.md create parent folders; fix stp/stripe - When discovery connects to a process it asks for .servers.getdetails, and a process started without TorQ's handlers (every tickerlogreplay process, by default) does not have it. The fallback then sent back a null procname and proctype, and discovery replaced the process.csv entry with one named after the script (torq.q) and with no type, so nothing could find the process by type afterwards. That only happens when discovery reaches the process after it is already listening, so it depended on start-up timing. The fallback now sends .proc.procname and .proc.proctype, which every TorQ process sets whether or not it loads the handlers. - .os.md ran mkdir without -p, so it failed whenever the parent folder did not exist yet. stp/stripe writes its results to tests/stp/results/stripe/, and in a fresh checkout, or when it runs on its own, tests/stp/results is not there yet. Windows' mkdir already creates the parents. - stp/stripe began with cd $HOME/TorQ/deploy/TorQ/latest and sourced setenv.sh from there, so it only ran on the machine it was written on. Like every other run.sh it now expects the environment to be set. Its RDBs subscribe with -.rdb.subfiltered 1, which reads rdbsub/rdbsub<n>.csv, and neither TorQ nor the Starter Pack has those files any more (the Starter Pack's rdb.q used to write them); the suite now has its own, one per RDB, as docs/utilities.md describes, and points each RDB at its file. Two checks read .rdb.procnum, which the Starter Pack no longer defines; they now take the RDB's number from its name, as rdb.q does. After restarting two RDBs the suite reopened their handles before they were up; it now waits for each (up to 30 seconds). It replayed the logs on the restarted RDBs by sending "-11!`" joined to the log path, which q cannot parse when the path has a dash in it; it now sends the path itself. The last check slept one second after each of five batches (up to 100,000 rows); it now waits until each batch has arrived (up to 30 seconds).
wssub called sub, which builds a table schema, and the monitor's start subscribes lmchart, a function, so it stopped with 'type and start never returned its data. wssub now registers the handle against each name as sub does for a table, without building a schema, and ` still subscribes every value. tests/monitor is a new suite which starts a monitor and calls start, as its web page does on every connection. The checks: start runs; calling it twice leaves one subscription each; each subscription is the handle and ` (all syms), as the original wssub registers for a table; wssub ` subscribes every value; an unknown name is still rejected.
Are the ones still failing verified and are all the tests touched in this PR now passing? |
Contributor
Author
Yes, basically all the test pass now when merged together, but merging this PR alone will go the test failures go from 618/848 -> 672/888. |
This branch has not been deployed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
.os.md creates missing parent folders.
Testing: as above, master 618 of 848, master with this PR 672 of 888.