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

Fixed rule object to yaml conversion for timeframe #1020

Conversation

amsiglan
Copy link
Collaborator

@amsiglan amsiglan commented May 9, 2024

Description

Currently the values specified for Selection in the visual editor are parsed to lists by default, as a result the timeframe also gets converted to a list in the yaml payload which is incorrect. This PR adds a check for timeframe and parses it as string as expected.

timeframe:
  - 1d

After this change we get:

timeframe: 1d

Check List

  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>
Copy link
Collaborator

@riysaxen-amzn riysaxen-amzn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@amsiglan amsiglan merged commit 2b1c6f1 into opensearch-project:main Jun 11, 2024
6 of 8 checks passed
@amsiglan amsiglan added backport 2.x backport 2.13 Triggers backport to 2.13 branch backport 2.14 labels Jun 11, 2024
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jun 11, 2024
Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>
(cherry picked from commit 2b1c6f1)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jun 11, 2024
Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>
(cherry picked from commit 2b1c6f1)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jun 11, 2024
Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>
(cherry picked from commit 2b1c6f1)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
amsiglan pushed a commit that referenced this pull request Jun 11, 2024
(cherry picked from commit 2b1c6f1)

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x backport 2.13 Triggers backport to 2.13 branch backport 2.14
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants