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

Fix edit trigger for detectors #1231

Conversation

amsiglan
Copy link
Collaborator

Description

When editing an existing trigger inside a detector, the selected rules as part of the filter don't show up. This happens because the initial state on mount is not populated using detector config. Another issue we see is that all the rules show up as filter options which is not correct since not all of them have been enabled previously

This PR fixes these issues.

  1. Rule shows up in the filter
image
  1. Only enabled rules are shown as options in the dropdown on Edit
image

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.

Copy link
Collaborator

@AWSHurneyt AWSHurneyt left a comment

Choose a reason for hiding this comment

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

Changes LGTM. The cypress tests aren't running in the CI, but @amsiglan is running them locally to confirm they pass. Approving assuming no issues.

@amsiglan Can you take a follow-up item to add some tests for these changes?

@amsiglan
Copy link
Collaborator Author

amsiglan commented Dec 18, 2024

Changes LGTM. The cypress tests aren't running in the CI, but @amsiglan is running them locally to confirm they pass. Approving assuming no issues.

@amsiglan Can you take a follow-up item to add some tests for these changes?

Passing tests with 1 flaky failure
image

@amsiglan amsiglan merged commit fa0f407 into opensearch-project:main Dec 18, 2024
6 of 8 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Dec 18, 2024
…s on edit (#1231)

Signed-off-by: Amardeepsingh Siglani <[email protected]>
(cherry picked from commit fa0f407)
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 Dec 18, 2024
…s on edit (#1231)

Signed-off-by: Amardeepsingh Siglani <[email protected]>
(cherry picked from commit fa0f407)
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 Dec 18, 2024
…s on edit (#1231)

Signed-off-by: Amardeepsingh Siglani <[email protected]>
(cherry picked from commit fa0f407)
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 Dec 18, 2024
…s on edit (#1231)

Signed-off-by: Amardeepsingh Siglani <[email protected]>
(cherry picked from commit fa0f407)
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 Dec 18, 2024
…s on edit (#1231)

Signed-off-by: Amardeepsingh Siglani <[email protected]>
(cherry picked from commit fa0f407)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
amsiglan pushed a commit that referenced this pull request Dec 18, 2024
…s on edit (#1231) (#1234)

(cherry picked from commit fa0f407)

Signed-off-by: Amardeepsingh Siglani <[email protected]>
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>
amsiglan pushed a commit that referenced this pull request Jan 10, 2025
…s on edit (#1231) (#1235)

(cherry picked from commit fa0f407)

Signed-off-by: Amardeepsingh Siglani <[email protected]>
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>
amsiglan pushed a commit that referenced this pull request Jan 10, 2025
…s on edit (#1231) (#1237)

(cherry picked from commit fa0f407)

Signed-off-by: Amardeepsingh Siglani <[email protected]>
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>
amsiglan pushed a commit that referenced this pull request Jan 10, 2025
…s on edit (#1231) (#1236)

(cherry picked from commit fa0f407)

Signed-off-by: Amardeepsingh Siglani <[email protected]>
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>
amsiglan pushed a commit that referenced this pull request Jan 10, 2025
…s on edit (#1231) (#1233)

(cherry picked from commit fa0f407)

Signed-off-by: Amardeepsingh Siglani <[email protected]>
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants