Functions | Variables
python_utils.upload_test_results Namespace Reference

Functions

def _get_build_metadata (test_results)
 
def _insert_rows_with_retries (bq, bq_table, bq_rows)
 
def upload_interop_results_to_bq (resultset, bq_table)
 
def upload_results_to_bq (resultset, bq_table, extra_fields)
 

Variables

string _DATASET_ID = 'jenkins_test_results'
 
string _DESCRIPTION = 'Test results from master job run on Jenkins'
 
int _EXPIRATION_MS = 365 * 24 * 60 * 60 * 1000
 
list _INTEROP_RESULTS_SCHEMA
 
string _PARTITION_TYPE = 'DAY'
 
string _PROJECT_ID = 'grpc-testing'
 
list _RESULTS_SCHEMA
 
 gcp_utils_dir
 

Function Documentation

◆ _get_build_metadata()

def python_utils.upload_test_results._get_build_metadata (   test_results)
private
Add Kokoro build metadata to test_results based on environment
  variables set by Kokoro.

Definition at line 71 of file upload_test_results.py.

◆ _insert_rows_with_retries()

def python_utils.upload_test_results._insert_rows_with_retries (   bq,
  bq_table,
  bq_rows 
)
private
Insert rows to bq table. Retry on error.

Definition at line 88 of file upload_test_results.py.

◆ upload_interop_results_to_bq()

def python_utils.upload_test_results.upload_interop_results_to_bq (   resultset,
  bq_table 
)
Upload interop test results to a BQ table.

  Args:
  resultset: dictionary generated by jobset.run
  bq_table: string name of table to create/upload results to in BQ

Definition at line 145 of file upload_test_results.py.

◆ upload_results_to_bq()

def python_utils.upload_test_results.upload_results_to_bq (   resultset,
  bq_table,
  extra_fields 
)
Upload test results to a BQ table.

  Args:
  resultset: dictionary generated by jobset.run
  bq_table: string name of table to create/upload results to in BQ
  extra_fields: dict with extra values that will be uploaded along with the results

Definition at line 108 of file upload_test_results.py.

Variable Documentation

◆ _DATASET_ID

string python_utils.upload_test_results._DATASET_ID = 'jenkins_test_results'
private

Definition at line 31 of file upload_test_results.py.

◆ _DESCRIPTION

string python_utils.upload_test_results._DESCRIPTION = 'Test results from master job run on Jenkins'
private

Definition at line 32 of file upload_test_results.py.

◆ _EXPIRATION_MS

int python_utils.upload_test_results._EXPIRATION_MS = 365 * 24 * 60 * 60 * 1000
private

Definition at line 34 of file upload_test_results.py.

◆ _INTEROP_RESULTS_SCHEMA

list python_utils.upload_test_results._INTEROP_RESULTS_SCHEMA
private
Initial value:
1 = [
2  ('job_name', 'STRING', 'Name of Jenkins/Kokoro job'),
3  ('build_id', 'INTEGER', 'Build ID of Jenkins/Kokoro job'),
4  ('build_url', 'STRING', 'URL of Jenkins/Kokoro job'),
5  ('test_name', 'STRING',
6  'Unique test name combining client, server, and test_name'),
7  ('suite', 'STRING',
8  'Test suite: cloud_to_cloud, cloud_to_prod, or cloud_to_prod_auth'),
9  ('client', 'STRING', 'Client language'),
10  ('server', 'STRING', 'Server host name'),
11  ('test_case', 'STRING', 'Name of test case'),
12  ('result', 'STRING', 'Test result: PASSED, TIMEOUT, FAILED, or SKIPPED'),
13  ('timestamp', 'TIMESTAMP', 'Timestamp of test run'),
14  ('elapsed_time', 'FLOAT', 'How long test took to run'),
15 ]

Definition at line 54 of file upload_test_results.py.

◆ _PARTITION_TYPE

string python_utils.upload_test_results._PARTITION_TYPE = 'DAY'
private

Definition at line 35 of file upload_test_results.py.

◆ _PROJECT_ID

string python_utils.upload_test_results._PROJECT_ID = 'grpc-testing'
private

Definition at line 36 of file upload_test_results.py.

◆ _RESULTS_SCHEMA

list python_utils.upload_test_results._RESULTS_SCHEMA
private
Initial value:
1 = [
2  ('job_name', 'STRING', 'Name of Jenkins job'),
3  ('build_id', 'INTEGER', 'Build ID of Jenkins job'),
4  ('build_url', 'STRING', 'URL of Jenkins job'),
5  ('test_name', 'STRING', 'Individual test name'),
6  ('language', 'STRING', 'Language of test'),
7  ('platform', 'STRING', 'Platform used for test'),
8  ('config', 'STRING', 'Config used for test'),
9  ('compiler', 'STRING', 'Compiler used for test'),
10  ('iomgr_platform', 'STRING', 'Iomgr used for test'),
11  ('result', 'STRING', 'Test result: PASSED, TIMEOUT, FAILED, or SKIPPED'),
12  ('timestamp', 'TIMESTAMP', 'Timestamp of test run'),
13  ('elapsed_time', 'FLOAT', 'How long test took to run'),
14  ('cpu_estimated', 'FLOAT', 'Estimated CPU usage of test'),
15  ('cpu_measured', 'FLOAT', 'Actual CPU usage of test'),
16  ('return_code', 'INTEGER', 'Exit code of test'),
17 ]

Definition at line 37 of file upload_test_results.py.

◆ gcp_utils_dir

python_utils.upload_test_results.gcp_utils_dir
Initial value:
1 = os.path.abspath(
2  os.path.join(os.path.dirname(__file__), '../../gcp/utils'))

Definition at line 26 of file upload_test_results.py.



grpc
Author(s):
autogenerated on Fri May 16 2025 03:03:42