Skip to content

Commit

Permalink
fix: input.template should not render interval field (#799)
Browse files Browse the repository at this point in the history
  • Loading branch information
artemrys authored Jul 7, 2023
1 parent abfad62 commit 6375de1
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 31 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/build-test-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,10 @@ jobs:

test-ui:
name: test-ui Splunk ${{ matrix.splunk.version }} -m ${{ matrix.test-mark }}
if: contains(github.event.pull_request.labels.*.name, 'run-ui-tests')
if: |
github.base_ref == 'main' ||
github.ref_name == 'main' ||
contains(github.event.pull_request.labels.*.name, 'run-ui-tests')
runs-on: ubuntu-latest
continue-on-error: true
needs:
Expand Down
2 changes: 1 addition & 1 deletion splunk_add_on_ucc_framework/commands/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def _add_modular_input(
class_name = input_name.upper()
description = service.get("title")
entity = service.get("entity")
field_allow_list = frozenset(["name", "index", "sourcetype"])
field_allow_list = frozenset(["name", "interval", "index", "sourcetype"])
template = "input.template"
if "template" in service:
template = service.get("template") + ".template"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,6 @@ def get_scheme(self):
)
)

scheme.add_argument(
smi.Argument(
'interval',
required_on_create=True,
)
)

return scheme

def validate_input(self, definition):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,6 @@ def get_scheme(self):
)
)

scheme.add_argument(
smi.Argument(
'interval',
required_on_create=True,
)
)

scheme.add_argument(
smi.Argument(
'account',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,6 @@ def get_scheme(self):
)
)

scheme.add_argument(
smi.Argument(
'interval',
required_on_create=True,
)
)

return scheme

def validate_input(self, definition):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,6 @@ def get_scheme(self):
)
)

scheme.add_argument(
smi.Argument(
'interval',
required_on_create=True,
)
)

scheme.add_argument(
smi.Argument(
'account',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1134,7 +1134,7 @@
"meta": {
"name": "Splunk_TA_UCCExample",
"restRoot": "splunk_ta_uccexample",
"version": "5.26.0Reeb03d63",
"version": "5.28.1R4adbf5c3",
"displayName": "Splunk UCC test Add-on",
"schemaVersion": "0.0.3"
}
Expand Down

0 comments on commit 6375de1

Please sign in to comment.