Use the test_id column as the test identifier
This commit changes the failures and run_time graph commands in subunit2sql-graph to take in a test_id instead of a test.id. This is much more user friendly because it's nominally human readable. We also just landed a large database migration that changes the test.id column from a uuid string to an integer. This will break users of the script and not give them a migration path. So instead of having people rely on the internal identifier they should just use the name. Change-Id: I949a62e8beedd3b76d9d4673e658523f1a75253d
This commit is contained in:
@@ -23,7 +23,10 @@ CONF = cfg.CONF
|
|||||||
|
|
||||||
def set_cli_opts(parser):
|
def set_cli_opts(parser):
|
||||||
parser.add_argument('test_id', nargs='?',
|
parser.add_argument('test_id', nargs='?',
|
||||||
help='Test id to extract time series for'),
|
help='Test id to extract time series for. This '
|
||||||
|
'previously took a UUID from the tests.id '
|
||||||
|
'column, however this will no longer work. It '
|
||||||
|
'only works with a value from tests.test_id.'),
|
||||||
parser.add_argument('--success-graph', action='store_true',
|
parser.add_argument('--success-graph', action='store_true',
|
||||||
help='Also graph successes'),
|
help='Also graph successes'),
|
||||||
parser.add_argument('--skip-graph', action='store_true',
|
parser.add_argument('--skip-graph', action='store_true',
|
||||||
@@ -31,8 +34,8 @@ def set_cli_opts(parser):
|
|||||||
|
|
||||||
|
|
||||||
def generate_series():
|
def generate_series():
|
||||||
test_id = CONF.command.test_id
|
|
||||||
session = api.get_session()
|
session = api.get_session()
|
||||||
|
test_id = api.get_id_from_test_id(CONF.command.test_id, session)
|
||||||
test_statuses = api.get_test_status_time_series(test_id, session)
|
test_statuses = api.get_test_status_time_series(test_id, session)
|
||||||
if not CONF.title:
|
if not CONF.title:
|
||||||
test = api.get_test_by_id(test_id, session)
|
test = api.get_test_by_id(test_id, session)
|
||||||
|
@@ -27,12 +27,15 @@ matplotlib.style.use('ggplot')
|
|||||||
|
|
||||||
def set_cli_opts(parser):
|
def set_cli_opts(parser):
|
||||||
parser.add_argument('test_id', nargs='?',
|
parser.add_argument('test_id', nargs='?',
|
||||||
help='Test id to extract time series for')
|
help='Test id to extract time series for. This '
|
||||||
|
'previously took a UUID from the tests.id '
|
||||||
|
'column, however this will no longer work. It '
|
||||||
|
'only works with a value from tests.test_id.')
|
||||||
|
|
||||||
|
|
||||||
def generate_series():
|
def generate_series():
|
||||||
test_id = CONF.command.test_id
|
|
||||||
session = api.get_session()
|
session = api.get_session()
|
||||||
|
test_id = api.get_id_from_test_id(CONF.command.test_id, session)
|
||||||
run_times = api.get_test_run_time_series(test_id, session)
|
run_times = api.get_test_run_time_series(test_id, session)
|
||||||
if not CONF.title:
|
if not CONF.title:
|
||||||
test = api.get_test_by_id(test_id, session)
|
test = api.get_test_by_id(test_id, session)
|
||||||
|
Reference in New Issue
Block a user