Skip to content
ken farmer edited this page Sep 23, 2015 · 11 revisions

Setup Checks Objectives - mostly about performance

  • Identify the next partition for a set of checks to run against - just once, rather than in each check
  • Identify whether or not to run checks at all - if no data has changed since the last run
  • Prepare data for faster processing by table checks - perhaps by aggregating it, or extracting changed data from a large non-partitioned table into a smaller table

Setup Check Requirements

  • Must be in check_dir
  • Filename must start with 'setup_'
  • Must be identified within registry file for table with a check_type of 'setup'

Runner to Setup Interface:

  • Env Vars provided by runner:
    • hapinsp_instance
    • hapinsp_database
    • hapinsp_table
    • hapinsp_tablecustom_internal_rc_prior
    • hapinsp_tablecustom_[setup var name]_prior

Setup to Runner Interface:

  • Example JSON struct printed by setup:
    • { "rc": "?", "table_status": "inactive", "hapinsp_tablecustom_[setup var name]": "foo", "hapinsp_tablecustom_[setup_var_name]": "bar" }
  • JSON fields:
    • table_status - must be either 'active' or 'inactive'. If 'inactive', then the runner will not run any checks for this table.
    • hapinsp_tablecustom_* - the runner will export these as environmental variables. They'll persist until the end of testing for this table, then be automatically torn-down by the runner.
Clone this wiki locally