Skip to content

Commit

Permalink
Merge pull request #364 from splunk/INFRA-33165-suppress-internal-err…
Browse files Browse the repository at this point in the history
…or-not-related-to-TA

INFRA-33165-suppress-internal-error-not-related-to-TA
  • Loading branch information
nariyanibhargav authored Jul 14, 2021
2 parents 4a394a5 + 1297662 commit f02fba4
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 15 deletions.
20 changes: 7 additions & 13 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,26 +151,20 @@ workflows:
build:
jobs:
- splunk-app-test/test_aio:
name: test-splunk-8-1
splunk_version: "8.1"
name: test-splunk-8-2
splunk_version: "8.2"
filters:
branches:
only: /.*/
- splunk-app-test/test_aio:
name: test-splunk-8-0
splunk_version: "8.0"
filters:
branches:
only: /.*/
- splunk-app-test/test_aio:
name: test-splunk-7-3
splunk_version: "7.3"
name: test-splunk-8-1
splunk_version: "8.1"
filters:
branches:
only: /.*/
- splunk-app-test/test_aio:
name: test-splunk-7-2
splunk_version: "7.2"
name: test-splunk-8-0
splunk_version: "8.0"
filters:
branches:
only: /.*/
Expand All @@ -185,7 +179,7 @@ workflows:
- test-splunk-8-0
context:
- gdi-github

publish:
jobs:
- publish-pypi:
Expand Down
16 changes: 15 additions & 1 deletion pytest_splunk_addon/.ignore_splunk_internal_errors
Original file line number Diff line number Diff line change
@@ -1,2 +1,16 @@
message_key="INPUT_CSV:INVALID_LOOKUP_TABLE_TYPE" message=The lookup table 'dmc_assets' requires a .csv or KV store lookup definition.
message_key="" message=DAG Execution Exception: Search has been cancelled
message_key="" message=DAG Execution Exception: Search has been cancelled
app="cloud-monitoring-console-summarizer"
app="skynet-rest"
app="cloud_administration"
app="splunk_monitoring_console"
app="splunk_instance_monitoring"
app="splunk_instrumentation"
message_key="" message=Error in 'lookup' command: Could not construct lookup 'splunk_upgrade_prereq_es_installable_apps.csv, app, OUTPUT, es_managed'. See search.log for more details.
app="search" sid="*" message_key="" message=[*] Failed to create a bundles setup with server name '*'. Using peer's local bundles to execute the search, results might not be correct.
app="search" sid="*" message_key="" message=[*] [subsearch]: Failed to create a bundles setup with server name '*'. Using peer's local bundles to execute the search, results might not be correct.
app="search" sid="*" message_key="" message=NOT requires an argument
app="search" sid="*" message_key="" message=Failed to get latest bucketMap from NOAH err="'Failed Dependency'"
ERROR SavedSplunker - savedsearch_id="nobody;cloud-monitoring-console-summarizer;splunk-svc", message="Error in 'eval' command: Failed to parse the provided arguments. Usage: eval dest_key = expression.". No actions executed
SavedSplunker - savedsearch_id="nobody;splunk_instance_monitoring;SIM SS - Splunk Apps Manifest", message="Error in 'lookup' command: Could not construct lookup 'splunk_upgrade_prereq_es_installable_apps.csv, app, OUTPUT, es_managed'. See search.log for more details.". No actions executed
ERROR SearchMessages - orig_component="SearchStatusEnforcer" app="search" sid="*" message_key="" message=Error in 'noah' command: operation='get_latest_bucket_map' failed with err='Failed Dependency'
12 changes: 12 additions & 0 deletions pytest_splunk_addon/splunk.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,12 @@ def pytest_addoption(parser):
dest="ignore_addon_errors",
help=("Path to file where list of addon related errors are suppressed."),
)
group.addoption(
"--ignore-errors-not-related-to-addon",
action="store",
dest="ignore_errors_not_related_to_addon",
help=("Path to file where list of errors not related to addon are suppressed."),
)
group.addoption(
"--requirement-test",
action="store",
Expand Down Expand Up @@ -353,6 +359,12 @@ def ignore_internal_errors(request):
if os.path.exists(addon_error_file_path):
with open(addon_error_file_path, "r") as addon_errors:
error_list.extend([each_error.strip() for each_error in addon_errors.readlines()])
if request.config.getoption("ignore_errors_not_related_to_addon"):
file_path = request.config.getoption("ignore_errors_not_related_to_addon")
if os.path.exists(file_path):
with open(file_path, "r") as non_ta_errors:
error_list.extend([each_error.strip() for each_error in non_ta_errors.readlines()])

yield error_list


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class FieldTestTemplates(object):
@pytest.mark.splunk_searchtime_internal_errors
def test_splunk_internal_errors(self, splunk_search_util, ignore_internal_errors, record_property, caplog):
search = """
search index=_internal CASE(ERROR)
search index=_internal log_level=ERROR
sourcetype!=splunkd_ui_access
AND sourcetype!=splunk_web_access
AND sourcetype!=splunk_web_service
Expand Down

0 comments on commit f02fba4

Please sign in to comment.