Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support CRON as interval #1346

Merged
merged 22 commits into from
Oct 15, 2024

Conversation

lplonka-splunk
Copy link
Contributor

@lplonka-splunk lplonka-splunk commented Sep 24, 2024

Issue number: ADDON-73348

Summary

Add option to use cron in an interval type field

Changes

  • Using standard CRON syntax is now allowed in input interval
  • Long form Interval entity was updated with new regex
  • Schema.json was modified
  • New UTs and UI tests were created

User experience

  • User is able to use CRON as input interval

Checklist

If your change doesn't seem to apply, please leave them unchecked.

@lplonka-splunk lplonka-splunk marked this pull request as ready for review October 11, 2024 19:10
@lplonka-splunk lplonka-splunk requested review from a team as code owners October 11, 2024 19:10
@lplonka-splunk lplonka-splunk marked this pull request as draft October 11, 2024 19:13
@lplonka-splunk lplonka-splunk marked this pull request as ready for review October 14, 2024 10:57
@lplonka-splunk lplonka-splunk requested a review from a team as a code owner October 14, 2024 10:57
tests/unit/test_interval_regex.py Outdated Show resolved Hide resolved
tests/unit/test_interval_regex.py Outdated Show resolved Hide resolved
@artemrys artemrys changed the title feat: Support CRON as interval feat: support CRON as interval Oct 14, 2024
sgoral-splunk
sgoral-splunk previously approved these changes Oct 14, 2024
splunk_add_on_ucc_framework/schema/schema.json Outdated Show resolved Hide resolved
docs/entity/components.md Show resolved Hide resolved
tests/unit/test_interval_regex.py Outdated Show resolved Hide resolved
@vtsvetkov-splunk
Copy link
Contributor

is there a regex from splunk core that they use to validate cron they support that we can steal?

@vtsvetkov-splunk
Copy link
Contributor

please fill the PR description

@lplonka-splunk
Copy link
Contributor Author

is there a regex from splunk core that they use to validate cron they support that we can steal?

Nope, they are doing it different way - tokenizing input and handling them. Probably just because of performance.

@lplonka-splunk lplonka-splunk merged commit 8c5a981 into develop Oct 15, 2024
77 checks passed
@lplonka-splunk lplonka-splunk deleted the ADDON-73348-cron_interval_support branch October 15, 2024 13:30
@github-actions github-actions bot locked and limited conversation to collaborators Oct 15, 2024
@artemrys artemrys linked an issue Oct 15, 2024 that may be closed by this pull request
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: interval validation should support Cron in addition to integers
5 participants