Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
77c4996
Merge branch 'main' into 'enterprise'
aarthy-dk Jun 24, 2025
5aff0e0
fix(test runs): sample the source data lookup DataFrame
luis-dk Jun 24, 2025
d406e7b
misc(test runs): limit result history in issue PDF report
luis-dk Jun 24, 2025
7fdb57d
Merge branch 'source-lookup-limit' into 'enterprise'
Jun 24, 2025
2d2dc39
misc: apply limit to hygiene issue report
luis-dk Jun 25, 2025
c48bd3a
misc: set limit to source data lookups in ui dialog
luis-dk Jun 25, 2025
6b18d79
Merge branch 'more-source-data-limit' into 'enterprise'
Jun 25, 2025
aff987a
fix(source-data): bug when sampling dataframe
aarthy-dk Jun 25, 2025
303af12
Merge branch 'fix-source-limit' into 'enterprise'
Jun 25, 2025
3f48615
fix(logo): prevent logo resize
aarthy-dk Jun 24, 2025
325569b
feat: add help menu, support mailto, and upgrade notification
aarthy-dk Jun 24, 2025
b298a31
Merge branch 'help-menu' into 'enterprise'
Jun 26, 2025
5aabcbd
feat(project-dashboard): redesign cards layout
aarthy-dk Jun 26, 2025
4e206cf
feat: Adding duplicated rows test and hygiene issues; Tuning test sel…
rboni-dk Jun 27, 2025
75a46ad
Merge branch 'project-dashboard' into 'enterprise'
Jun 27, 2025
58159e4
refactor(table groups): implement page as vanjs components
luis-dk Jun 24, 2025
9c8d167
Merge branch 'table-groups-refactor' into 'enterprise'
Jun 30, 2025
84711e7
misc: Fixing the test result page for the Dupe_Rows test
rboni-dk Jun 30, 2025
af3d648
misc(analytics): add usage counts to login event
aarthy-dk Jul 1, 2025
e4d3d14
feat(version): get latest release versions from s3
aarthy-dk Jul 1, 2025
0182c5c
Merge branch 'usage-events' into 'enterprise'
Jul 2, 2025
99c1b83
feat(telemetry): Capturing failed logins; Persistent instance ID
rboni-dk Jul 2, 2025
c81bf9d
Merge branch 'enterprise' of gitlab.com:dkinternal/testgen/dataops-te…
rboni-dk Jul 3, 2025
99513b6
misc: Addressing code review feedback
rboni-dk Jul 3, 2025
d3e37cd
refactor(table groups): lock the schema field when profiling or tests…
luis-dk Jul 2, 2025
d37fd44
Merge branch 'more-table-groups-enhancements' into 'enterprise'
Jul 7, 2025
abf56e5
Merge branch 'enterprise' of gitlab.com:dkinternal/testgen/dataops-te…
rboni-dk Jul 7, 2025
b6557a6
Merge branch 'ricardo/dupe-rows-new-hyg' into 'enterprise'
Jul 7, 2025
aef8d1a
refactor(flavor-service): update connect args and templated variables
aarthy-dk Jun 20, 2025
f502fdf
feat(test-definitions): align matching attributes for aggregate tests
aarthy-dk Jun 24, 2025
91d7121
feat(tests): add aggregate balance percent and range tests
aarthy-dk Jun 30, 2025
52e3983
Merge branch 'enterprise' of gitlab.com:dkinternal/testgen/dataops-te…
rboni-dk Jul 7, 2025
9d37db6
misc: Addressing code review feedback
rboni-dk Jul 7, 2025
8a85e58
Merge branch 'agg-balance-tolerance' into 'enterprise'
Jul 7, 2025
72f8692
fix(source-data): preserve sort order when sampling
aarthy-dk Jul 3, 2025
b6d5741
fix(snowflake): upgrade python connector to fix certificate error
aarthy-dk Jul 4, 2025
87c0692
fix(docker): missing arg for support email
aarthy-dk Jul 4, 2025
b44fb46
fix(table-groups): handle connections with no flavor code
aarthy-dk Jul 4, 2025
bd89a33
Merge branch 'misc-fixes' into 'enterprise'
Jul 7, 2025
cb5cda4
fix(test runs): hide score if no tests were run
luis-dk Jun 30, 2025
009d3fb
feat(test suites): warn users before unlocking a test definition
luis-dk Jun 30, 2025
d878004
refactor(test runs): allow deleting multiple test runs
luis-dk Jul 2, 2025
435aa22
refactor(test definitions): display profiling and generation date
luis-dk Jul 2, 2025
ea88bbb
refactor(test results): style and arrangement of elements in result d…
luis-dk Jul 2, 2025
efd9d71
Merge branch 'tests-improvements' into 'enterprise'
Jul 7, 2025
2f6a969
Merge branch 'enterprise' of gitlab.com:dkinternal/testgen/dataops-te…
rboni-dk Jul 7, 2025
8af6f77
Merge branch 'telemetry-improvements' into 'enterprise'
Jul 7, 2025
9c846e1
fix(upgrade): drop views before altering table
aarthy-dk Jul 7, 2025
4a623ef
Merge branch 'upgrade-fix' into 'enterprise'
Jul 8, 2025
8a72804
fix: Inserting the Test Run record earlier in the process
rboni-dk Jul 8, 2025
806116d
Merge branch 'fix-late-run-update' into 'enterprise'
Jul 8, 2025
a43194e
fix: Allowing literal underscores in the table group pattern fields
rboni-dk Jul 9, 2025
d064811
feat(tests): Support moving and copying test definition to same suite…
diogodk Jul 7, 2025
d5e50dc
Merge branch 'TG-899' into 'enterprise'
Jul 10, 2025
3ae5fb2
Merge branch 'enterprise' of gitlab.com:dkinternal/testgen/dataops-te…
rboni-dk Jul 10, 2025
4565f3c
Merge branch 'fix-tg-pattern' into 'enterprise'
Jul 10, 2025
e72b2b4
fix(data-catalog): add commas when displaying numbers
aarthy-dk Jul 9, 2025
c98b12e
fix(data-catalog): column tags not updated when table fully selected
aarthy-dk Jul 9, 2025
fa3c125
feat(data-catalog): add test count and dropdown options for export
aarthy-dk Jul 9, 2025
e68f67d
feat(export): add dropdown options to test definitions and result pages
aarthy-dk Jul 9, 2025
4beff73
fix(sort): close popover on apply
aarthy-dk Jul 9, 2025
5fcf9d3
fix: misc styling improvements
aarthy-dk Jul 9, 2025
bc9a54e
feat(schedules): add schedule dialogs to table groups and test suites…
aarthy-dk Jul 9, 2025
56d2d0d
fix(tests): flag invalid tests and display Error details in test results
aarthy-dk Jul 10, 2025
773e771
fix: Do not generate Required Entity tests for empty tables
rboni-dk Jul 10, 2025
70c0288
Merge branch 'export-dialog' into 'enterprise'
Jul 11, 2025
2aba7f0
feat: allow deleting profiling runs
luis-dk Jul 11, 2025
ac251af
Merge branch 'delete-profiling-runs' into 'enterprise'
Jul 11, 2025
c481d0d
misc: upgrade Streamlit from 1.44.1 to 1.46.1
luis-dk Jul 9, 2025
c770e15
feat: allow filtering by partial column name
luis-dk Jul 9, 2025
afd791a
Merge branch 'column-partial-filter' into 'enterprise'
Jul 14, 2025
633c64f
fix(grid): change to current selection not reflected
aarthy-dk Jul 11, 2025
add3610
fix(issue-report): error status in test history breaks export
aarthy-dk Jul 11, 2025
f944f59
Merge branch 'fix-grid' into 'enterprise'
Jul 14, 2025
3d1d469
fix: Allowing literal underscores in the table group pattern fields
rboni-dk Jul 11, 2025
5fa85cf
Merge branch 'enterprise' of gitlab.com:dkinternal/testgen/dataops-te…
rboni-dk Jul 15, 2025
bd671d3
Merge branch 'fix-tg-pattern-2' into 'enterprise'
Jul 15, 2025
e603901
Merge branch 'enterprise' of gitlab.com:dkinternal/testgen/dataops-te…
rboni-dk Jul 15, 2025
79b1981
Merge branch 'fix-req-entity-test' into 'enterprise'
Jul 15, 2025
a089c96
fix(profiling): don't apply sample ratio to date_days_present
aarthy-dk Jul 14, 2025
cfe80a1
fix(table-groups): sampling incorrectly displayed
aarthy-dk Jul 14, 2025
8a41d6c
fix(select): handle none values in run dialogs
aarthy-dk Jul 14, 2025
c914376
fix(connections): stop connection form from re-rendering needlessly
luis-dk Jul 15, 2025
a6e9a8a
Merge branch 'qa-fixes' into 'enterprise'
Jul 15, 2025
3d3191b
fix: Fixing hygiene issues lookup queries
rboni-dk Jul 15, 2025
bc88cd5
Merge branch 'fix-hi-lookup' into 'enterprise'
Jul 15, 2025
4d0b330
fix(grid): dialogs on grids close abruptly
aarthy-dk Jul 15, 2025
aa6007e
fix: misc styling improvements
aarthy-dk Jul 15, 2025
2820c07
Merge branch 'qa-fixes' into 'enterprise'
Jul 15, 2025
44a23a0
release: 4.1.3 -> 4.12.6
aarthy-dk Jul 16, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion deploy/charts/testgen-app/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.0.0
version: 1.0.1

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
2 changes: 0 additions & 2 deletions deploy/charts/testgen-app/templates/_environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@
value: {{ .Values.testgen.trustTargetDatabaseCertificate | ternary "yes" "no" | quote }}
- name: TG_EXPORT_TO_OBSERVABILITY_VERIFY_SSL
value: {{ .Values.testgen.observabilityVerifySsl | ternary "yes" "no" | quote }}
- name: TG_DOCKER_RELEASE_CHECK_ENABLED
value: {{ .Values.testgen.releaseCheck | ternary "yes" "no" | quote }}
{{- end -}}

{{- define "testgen.hookEnvironment" -}}
Expand Down
1 change: 0 additions & 1 deletion deploy/charts/testgen-app/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ testgen:
uiPassword:
trustTargetDatabaseCertificate: false
observabilityVerifySsl: true
releaseCheck: true
labels:

cliHooks:
Expand Down
5 changes: 5 additions & 0 deletions deploy/docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,16 @@ variable "TESTGEN_VERSION" {}
variable "TESTGEN_DOCKER_HUB_REPO" {
default = "datakitchen/dataops-testgen"
}
variable "TESTGEN_SUPPORT_EMAIL" {
default = "open-source-support@datakitchen.io"
}

target "testgen-release" {
args = {
TESTGEN_VERSION = "${TESTGEN_VERSION}"
TESTGEN_BASE_LABEL = "${TESTGEN_BASE_LABEL}"
TESTGEN_DOCKER_HUB_REPO = "${TESTGEN_DOCKER_HUB_REPO}"
TESTGEN_SUPPORT_EMAIL = "${TESTGEN_SUPPORT_EMAIL}"
}
context = "."
dockerfile = "deploy/testgen.dockerfile"
Expand All @@ -31,6 +35,7 @@ target "testgen-qa" {
TESTGEN_VERSION = "${TESTGEN_VERSION}"
TESTGEN_BASE_LABEL = "${TESTGEN_BASE_LABEL}"
TESTGEN_DOCKER_HUB_REPO = "${TESTGEN_DOCKER_HUB_REPO}"
TESTGEN_SUPPORT_EMAIL = "${TESTGEN_SUPPORT_EMAIL}"
}
context = "."
dockerfile = "deploy/testgen.dockerfile"
Expand Down
4 changes: 3 additions & 1 deletion deploy/testgen.dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
ARG TESTGEN_BASE_LABEL=v6
ARG TESTGEN_BASE_LABEL=v7

FROM datakitchen/dataops-testgen-base:${TESTGEN_BASE_LABEL} AS release-image

# Args have to be set in current build stage: https://github.com/moby/moby/issues/37345
ARG TESTGEN_VERSION
ARG TESTGEN_DOCKER_HUB_REPO
ARG TESTGEN_SUPPORT_EMAIL

ENV PYTHONPATH=/dk/lib/python3.12/site-packages
ENV PATH=$PATH:/dk/bin
Expand All @@ -24,6 +25,7 @@ RUN chown -R testgen:testgen /var/lib/testgen /dk/lib/python3.12/site-packages/s

ENV TESTGEN_VERSION=${TESTGEN_VERSION}
ENV TESTGEN_DOCKER_HUB_REPO=${TESTGEN_DOCKER_HUB_REPO}
ENV TESTGEN_SUPPORT_EMAIL=${TESTGEN_SUPPORT_EMAIL}
ENV TG_RELEASE_CHECK=docker

USER testgen
Expand Down
1 change: 0 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ x-common-variables: &common-variables
TG_METADATA_DB_HOST: postgres
TG_TARGET_DB_TRUST_SERVER_CERTIFICATE: yes
TG_EXPORT_TO_OBSERVABILITY_VERIFY_SSL: no
TG_DOCKER_RELEASE_CHECK_ENABLED: yes


services:
Expand Down
6 changes: 0 additions & 6 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,9 +282,3 @@ default: `dataset`

When exporting to your instance of Observabilty, the key sent to the events API to identify the components.
default: `default`

#### `TG_DOCKER_RELEASE_CHECK_ENABLED`

Enables calling Docker Hub API to fetch the latest released image tag. The fetched tag is displayed in the UI menu.

default: `yes`
5 changes: 2 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "dataops-testgen"
version = "4.1.3"
version = "4.12.6"
description = "DataKitchen's Data Quality DataOps TestGen"
authors = [
{ "name" = "DataKitchen, Inc.", "email" = "info@datakitchen.io" },
Expand Down Expand Up @@ -40,7 +40,7 @@ dependencies = [
"requests_extensions==1.1.3",
"numpy==1.26.4",
"pandas==2.1.4",
"streamlit==1.44.1",
"streamlit==1.46.1",
"streamlit-extras==0.3.0",
"streamlit-aggrid==0.3.4.post3",
"plotly_express==0.4.1",
Expand All @@ -61,7 +61,6 @@ dependencies = [

# Pinned to match the manually compiled libs or for security
"pyarrow==18.1.0",
"snowflake-connector-python==3.13.1",
"matplotlib==3.9.2",
"scipy==1.14.1",
"jinja2==3.1.6",
Expand Down
9 changes: 8 additions & 1 deletion testgen/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
LOG = logging.getLogger("testgen")

APP_MODULES = ["ui", "scheduler"]
VERSION_DATA = version_service.get_version()


@dataclass
Expand All @@ -69,7 +70,13 @@ def invoke(self, ctx: Context):

@click.group(
cls=CliGroup,
help=f"This version: {settings.VERSION} \n\nLatest version: {version_service.get_latest_version()} \n\nSchema revision: {get_schema_revision()}"
help=f"""
{VERSION_DATA.edition} {VERSION_DATA.current or ""}

{f"New version available! {VERSION_DATA.latest}" if VERSION_DATA.latest != VERSION_DATA.current else ""}

Schema revision: {get_schema_revision()}
"""
)
@click.option(
"-v",
Expand Down
35 changes: 24 additions & 11 deletions testgen/commands/queries/execute_tests_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,30 @@ def __init__(self, strProjectCode, strFlavor, strTestSuiteId, strTestSuite, minu

def _AssembleDisplayParameters(self):

lst_parms = ["column_name", "skip_errors", "baseline_ct", "baseline_unique_ct", "baseline_value",
"baseline_value_ct", "baseline_sum", "baseline_avg", "baseline_sd", "subset_condition",
"groupby_names", "having_condition", "window_date_column", "window_days",
"match_column_names", "match_subset_condition", "match_schema_name", "match_table_name",
"match_groupby_names", "match_having_condition",
]
lst_parms = [
"column_name",
"skip_errors",
"baseline_ct",
"baseline_unique_ct",
"baseline_value",
"baseline_value_ct",
"baseline_sum",
"baseline_avg",
"baseline_sd",
"lower_tolerance",
"upper_tolerance",
"subset_condition",
"groupby_names",
"having_condition",
"window_date_column",
"window_days",
"match_column_names",
"match_subset_condition",
"match_schema_name",
"match_table_name",
"match_groupby_names",
"match_having_condition",
]
str_parms = "; ".join(f"{key}={self.dctTestParms[key]}"
for key in lst_parms
if key.lower() in self.dctTestParms and self.dctTestParms[key] not in [None, ""])
Expand Down Expand Up @@ -107,11 +125,6 @@ def GetTestsNonCAT(self, booClean):

return strQ

def AddTestRecordtoTestRunTable(self):
strQ = self._ReplaceParms(read_template_sql_file("ex_write_test_record_to_testrun_table.sql", "execution"))

return strQ

def PushTestRunStatusUpdateSQL(self):
# Runs on DK DB
strQ = self._ReplaceParms(read_template_sql_file("ex_update_test_record_in_testrun_table.sql", "execution"))
Expand Down
4 changes: 2 additions & 2 deletions testgen/commands/queries/generate_tests_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ def GetTestTypesSQL(self, booClean):

return strQuery

def GetTestDerivationQueriesAsList(self, booClean):
def GetTestDerivationQueriesAsList(self, template_directory, booClean):
# This assumes the queries run in no particular order,
# and will order them alphabetically by file name
lstQueries = sorted(
get_template_files(mask=r"^.*sql$", sub_directory="gen_funny_cat_tests"), key=lambda key: str(key)
get_template_files(mask=r"^.*sql$", sub_directory=template_directory), key=lambda key: str(key)
)
lstTemplate = []

Expand Down
1 change: 1 addition & 0 deletions testgen/commands/queries/profiling_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ def ReplaceParms(self, strInputString):
strInputString = strInputString.replace("{CONTINGENCY_COLUMNS}", self.contingency_columns)
strInputString = strInputString.replace("{CONTINGENCY_MAX_VALUES}", self.contingency_max_values)
strInputString = strInputString.replace("{PROCESS_ID}", str(self.process_id))
strInputString = strInputString.replace("{SQL_FLAVOR}", self.flavor)
strInputString = replace_templated_functions(strInputString, self.flavor)

return strInputString
Expand Down
25 changes: 18 additions & 7 deletions testgen/commands/queries/refresh_data_chars_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class CRefreshDataCharsSQL:
sql_flavor: str
table_group_schema: str
table_group_id: str

max_query_chars: int
profiling_table_set: str
profiling_include_mask: str
Expand All @@ -37,20 +37,31 @@ def _replace_params(self, sql_query: str) -> str:
sql_query = sql_query.replace("{RUN_DATE}", self.run_date)
sql_query = sql_query.replace("{SOURCE_TABLE}", self.source_table)
return sql_query

def _get_mask_query(self, mask: str, is_include: bool) -> str:
sub_query = ""
if mask:
sub_query += " AND (" if is_include else " AND NOT ("
is_first = True
escape = ""
if self.sql_flavor.startswith("mssql"):
escaped_underscore = "[_]"
elif self.sql_flavor == "snowflake":
escaped_underscore = "\\\\_"
escape = "ESCAPE '\\\\'"
elif self.sql_flavor == "redshift":
escaped_underscore = "\\\\_"
else:
escaped_underscore = "\\_"
for item in mask.split(","):
if not is_first:
sub_query += " OR "
sub_query += "(c.table_name LIKE '" + item.strip() + "')"
item = item.strip().replace("_", escaped_underscore)
sub_query += f"(c.table_name LIKE '{item}' {escape})"
is_first = False
sub_query += ")"
return sub_query

def GetDDFQuery(self) -> str:
# Runs on Project DB
sql_query = self._replace_params(
Expand All @@ -67,18 +78,18 @@ def GetDDFQuery(self) -> str:
sql_query = sql_query.replace("{TABLE_CRITERIA}", table_criteria)

return sql_query

def GetRecordCountQueries(self, schema_tables: list[str]) -> list[str]:
count_queries = [
f"SELECT '{item}', COUNT(*) FROM {item}"
for item in schema_tables
]
return chunk_queries(count_queries, " UNION ALL ", self.max_query_chars)

def GetDataCharsUpdateQuery(self) -> str:
# Runs on DK Postgres Server
return self._replace_params(read_template_sql_file("data_chars_update.sql", sub_directory="data_chars"))

def GetStagingDeleteQuery(self) -> str:
# Runs on DK Postgres Server
return self._replace_params(read_template_sql_file("data_chars_staging_delete.sql", sub_directory="data_chars"))
23 changes: 17 additions & 6 deletions testgen/commands/run_execute_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
WriteListToDB,
date_service,
)
from testgen.common.database.database_service import empty_cache
from testgen.common.database.database_service import ExecuteDBQuery, empty_cache

from .run_execute_cat_tests import run_cat_test_queries
from .run_refresh_data_chars import run_refresh_data_chars_queries
Expand All @@ -26,6 +26,17 @@
LOG = logging.getLogger("testgen")


def add_test_run_record(test_run_id, test_suite_id, test_time, process_id):
query = f"""
INSERT INTO test_runs(id, test_suite_id, test_starttime, process_id)
(SELECT '{test_run_id}':: UUID as id,
'{test_suite_id}' as test_suite_id,
'{test_time}' as test_starttime,
'{process_id}' as process_id);
"""
ExecuteDBQuery("DKTG", query)


def run_test_queries(dctParms, strTestRunID, strTestTime, strProjectCode, strTestSuite, minutes_offset=0, spinner=None):
booErrors = False
error_msg = ""
Expand All @@ -38,11 +49,6 @@ def run_test_queries(dctParms, strTestRunID, strTestTime, strProjectCode, strTes
clsExecute.process_id = process_service.get_current_process_id()
booClean = False

# Add a record in Test Run table for the new Test Run
strTestRunQuery = clsExecute.AddTestRecordtoTestRunTable()
lstTestRunQuery = [strTestRunQuery]
RunActionQueryList("DKTG", lstTestRunQuery)

try:
# Retrieve non-CAT Queries
LOG.info("CurrentStep: Retrieve Non-CAT Queries")
Expand Down Expand Up @@ -131,6 +137,11 @@ def run_execution_steps(
LOG.info("CurrentStep: Retrieving TestExec Parameters")
test_exec_params = RetrieveTestExecParms(project_code, test_suite)

# Add a record in Test Run table for the new Test Run
add_test_run_record(
test_run_id, test_exec_params["test_suite_id"], test_time, process_service.get_current_process_id()
)

LOG.info("CurrentStep: Assigning Connection Parms")
AssignConnectParms(
test_exec_params["project_code"],
Expand Down
7 changes: 4 additions & 3 deletions testgen/commands/run_generate_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ def run_test_gen_queries(strTableGroupsID, strTestSuite, strGenerationSet=None):

LOG.info("CurrentStep: Compiling Test Gen Queries")

lstFunnyTemplateQueries = clsTests.GetTestDerivationQueriesAsList(booClean)
lstFunnyTemplateQueries = clsTests.GetTestDerivationQueriesAsList("gen_funny_cat_tests", booClean)
lstQueryTemplateQueries = clsTests.GetTestDerivationQueriesAsList("gen_query_tests", booClean)
lstGenericTemplateQueries = []

# Delete old Tests
Expand Down Expand Up @@ -102,15 +103,15 @@ def run_test_gen_queries(strTableGroupsID, strTestSuite, strGenerationSet=None):
LOG.info("TestGen CAT Queries were compiled")

# Make sure delete, then generic templates run before the funny templates
lstQueries = [strDeleteQuery, *lstGenericTemplateQueries, *lstFunnyTemplateQueries]
lstQueries = [strDeleteQuery, *lstGenericTemplateQueries, *lstFunnyTemplateQueries, *lstQueryTemplateQueries]

if lstQueries:
LOG.info("Running Test Generation Template Queries")
RunActionQueryList("DKTG", lstQueries)
message = "Test generation completed successfully."
else:
message = "No TestGen Queries were compiled."

MixpanelService().send_event(
"generate-tests",
source=settings.ANALYTICS_JOB_SOURCE,
Expand Down
3 changes: 2 additions & 1 deletion testgen/commands/run_launch_db_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ def _get_params_mapping() -> dict:
"PROJECT_USER": settings.PROJECT_DATABASE_USER,
"PROJECT_PORT": settings.PROJECT_DATABASE_PORT,
"PROJECT_HOST": settings.PROJECT_DATABASE_HOST,
"PROJECT_PW_ENCRYPTED": EncryptText(settings.PROJECT_DATABASE_PASSWORD),
"PROJECT_HTTP_PATH": "",
"PROJECT_SCHEMA": settings.PROJECT_DATABASE_SCHEMA,
"PROFILING_TABLE_SET": settings.DEFAULT_PROFILING_TABLE_SET,
"PROFILING_INCLUDE_MASK": settings.DEFAULT_PROFILING_INCLUDE_MASK,
Expand All @@ -54,7 +56,6 @@ def _get_params_mapping() -> dict:
"TEST_SUITE_DESCRIPTION": settings.DEFAULT_TEST_SUITE_DESCRIPTION,
"MAX_THREADS": settings.PROJECT_CONNECTION_MAX_THREADS,
"MAX_QUERY_CHARS": settings.PROJECT_CONNECTION_MAX_QUERY_CHAR,
"PROJECT_PW_ENCRYPTED": EncryptText(settings.PROJECT_DATABASE_PASSWORD),
"OBSERVABILITY_API_URL": settings.OBSERVABILITY_API_URL,
"OBSERVABILITY_API_KEY": settings.OBSERVABILITY_API_KEY,
"OBSERVABILITY_COMPONENT_KEY": settings.OBSERVABILITY_DEFAULT_COMPONENT_KEY,
Expand Down
Loading
Loading