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

Adds transport layer actions for CRUD workflows (#934) #938

Merged
merged 1 commit into from
May 26, 2023

Conversation

eirsep
Copy link
Member

@eirsep eirsep commented May 25, 2023

Backports #934 to 2.x

(cherry picked from commit e0b7a5a)

* remove unneeded import

---------

Signed-off-by: Ashish Agrawal <[email protected]>
Co-authored-by: opensearch-trigger-bot[bot] <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com>
Co-authored-by: Petar Dzepina <[email protected]>
Co-authored-by: Ashish Agrawal <[email protected]>

* Stashed user together with it's roles

Signed-off-by: Stevan Buzejic <[email protected]>

---------

Signed-off-by: Stevan Buzejic <[email protected]>
Signed-off-by: Ashish Agrawal <[email protected]>
Co-authored-by: opensearch-trigger-bot[bot] <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com>
Co-authored-by: Petar Dzepina <[email protected]>
Co-authored-by: Ashish Agrawal <[email protected]>

* Added workflow execution logic (opensearch-project#850)

* Added workflow execution logic

Signed-off-by: Stevan Buzejic <[email protected]>

* Adjusted code according to comments

Signed-off-by: Stevan Buzejic <[email protected]>

* Updated version of the findings json

Signed-off-by: Stevan Buzejic <[email protected]>

* Updating the workflow metadata in the case of updating flag set to false while the metadata alerady exist

Signed-off-by: Stevan Buzejic <[email protected]>

* Added logging for workflow metadata update

Signed-off-by: Stevan Buzejic <[email protected]>

* Added Rest Execute Workflow action

Signed-off-by: Stevan Buzejic <[email protected]>

* Extended workflow context with workflowMetadataId. Adjusted the doc level monitor findings

Signed-off-by: Stevan Buzejic <[email protected]>

* Updated conditions for unstashing the context when indexing and deleting the workflow

Signed-off-by: Stevan Buzejic <[email protected]>

---------

Signed-off-by: Stevan Buzejic <[email protected]>

* Added fix when executing the workflow and when chained findings index… (opensearch-project#890)

Signed-off-by: Stevan Buzejic <[email protected]>

* Fixed deleting monitor workflow metadata (opensearch-project#882)

* Fixed deleting monitor metadata and workflow metadata.

Signed-off-by: Stevan Buzejic <[email protected]>
Signed-off-by: Surya Sashank Nistala <[email protected]>

* fix monitor metadata error from conflict resolution

Signed-off-by: Surya Sashank Nistala <[email protected]>

* remove unused import

Signed-off-by: Surya Sashank Nistala <[email protected]>

* remove rest execute workflow action

Signed-off-by: Surya Sashank Nistala <[email protected]>

* increment schema version for findings mapping json

Signed-off-by: Surya Sashank Nistala <[email protected]>

---------

Signed-off-by: Stevan Buzejic <[email protected]>
Signed-off-by: Angie Zhang <[email protected]>
Signed-off-by: Ashish Agrawal <[email protected]>
Signed-off-by: Surya Sashank Nistala <[email protected]>
Co-authored-by: Stevan Buzejic <[email protected]>
Co-authored-by: Angie Zhang <[email protected]>
Co-authored-by: opensearch-trigger-bot[bot] <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com>
Co-authored-by: Petar Dzepina <[email protected]>
Co-authored-by: Ashish Agrawal <[email protected]>
@eirsep eirsep force-pushed the backport-pr-934 branch from 4c61357 to de8cd72 Compare May 25, 2023 23:49
@eirsep
Copy link
Member Author

eirsep commented May 26, 2023

This test workflow failure is independent of changes in this PR
test workflow for jdk 11 failed due to

2023-05-25T23:58:49.8277078Z Suite: Test class org.opensearch.alerting.bwc.AlertingBackwardsCompatibilityIT
2023-05-25T23:58:49.8278663Z   2> REPRODUCE WITH: ./gradlew ':alerting:alertingBwcCluster#twoThirdsUpgradedClusterTask' --tests "org.opensearch.alerting.bwc.AlertingBackwardsCompatibilityIT.test backwards compatibility" -Dtests.seed=E6E43C45BCF79BC1 -Dtests.security.manager=true -Dtests.locale=th-TH -Dtests.timezone=Asia/Vladivostok -Druntime.java=11
2023-05-25T23:58:49.8279571Z   2> java.lang.AssertionError: Incorrect number of total nodes expected:<3> but was:<2>
2023-05-25T23:58:49.8280051Z         at __randomizedtesting.SeedInfo.seed([E6E43C45BCF79BC1:E2FDDEB2110A5FBE]:0)
2023-05-25T23:58:49.8280461Z         at org.junit.Assert.fail(Assert.java:89)
2023-05-25T23:58:49.8281249Z         at org.junit.Assert.failNotEquals(Assert.java:835)
2023-05-25T23:58:49.8281681Z         at org.junit.Assert.assertEquals(Assert.java:120)
2023-05-25T23:58:49.8282523Z         at org.opensearch.alerting.bwc.AlertingBackwardsCompatibilityIT.verifyMonitorStats(AlertingBackwardsCompatibilityIT.kt:203)
2023-05-25T23:58:49.8283406Z         at org.opensearch.alerting.bwc.AlertingBackwardsCompatibilityIT.test backwards compatibility(AlertingBackwardsCompatibilityIT.kt:63)
2023-05-25T23:58:49.8284626Z   2> NOTE: leaving temporary files on disk at: /home/runner/work/alerting/alerting/alerting/build/testrun/alertingBwcCluster#twoThirdsUpgradedClusterTask/temp/org.opensearch.alerting.bwc.AlertingBackwardsCompatibilityIT_E6E43C45BCF79BC1-001
2023-05-25T23:58:49.8285635Z   2> NOTE: test params are: codec=Asserting(Lucene95), sim=Asserting(RandomSimilarity(queryNorm=true): {}), locale=th-TH, timezone=Asia/Vladivostok
2023-05-25T23:58:49.8286343Z   2> NOTE: Linux 5.15.0-1037-azure amd64/Azul Systems, Inc. 11.0.19 (64-bit)/cpus=2,threads=1,free=364241408,total=536870912
2023-05-25T23:58:49.8286817Z   2> NOTE: All tests run in this JVM: [AlertingBackwardsCompatibilityIT]
2023-05-25T23:58:50.0129138Z 
2023-05-25T23:58:50.0129167Z 
2023-05-25T23:58:50.0130102Z 1 test completed, 1 failed
2023-05-25T23:58:50.0130810Z Tests with failures:
2023-05-25T23:58:50.0134626Z  - org.opensearch.alerting.bwc.AlertingBackwardsCompatibilityIT.test backwards compatibility
2023-05-25T23:58:50.1153305Z 

@eirsep eirsep requested a review from lezzago May 26, 2023 16:37
@eirsep eirsep merged commit 171cd2e into opensearch-project:2.x May 26, 2023
opensearch-trigger-bot bot pushed a commit that referenced this pull request May 27, 2023
(cherry picked from commit e0b7a5a)

* remove unneeded import

---------

* Stashed user together with it's roles

---------

* Added workflow execution logic (#850)

* Added workflow execution logic

* Adjusted code according to comments

* Updated version of the findings json

* Updating the workflow metadata in the case of updating flag set to false while the metadata alerady exist

* Added logging for workflow metadata update

* Added Rest Execute Workflow action

* Extended workflow context with workflowMetadataId. Adjusted the doc level monitor findings

* Updated conditions for unstashing the context when indexing and deleting the workflow

---------

* Added fix when executing the workflow and when chained findings index… (#890)

* Fixed deleting monitor workflow metadata (#882)

* Fixed deleting monitor metadata and workflow metadata.

* fix monitor metadata error from conflict resolution

* remove unused import

* remove rest execute workflow action

* increment schema version for findings mapping json

---------

Signed-off-by: Stevan Buzejic <[email protected]>
Signed-off-by: Angie Zhang <[email protected]>
Signed-off-by: Ashish Agrawal <[email protected]>
Signed-off-by: Surya Sashank Nistala <[email protected]>
Co-authored-by: Stevan Buzejic <[email protected]>
Co-authored-by: Angie Zhang <[email protected]>
Co-authored-by: opensearch-trigger-bot[bot] <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com>
Co-authored-by: Petar Dzepina <[email protected]>
Co-authored-by: Ashish Agrawal <[email protected]>
(cherry picked from commit 171cd2e)
getsaurabh02 pushed a commit that referenced this pull request May 31, 2023
(cherry picked from commit e0b7a5a)

* remove unneeded import

---------

* Stashed user together with it's roles

---------

* Added workflow execution logic (#850)

* Added workflow execution logic

* Adjusted code according to comments

* Updated version of the findings json

* Updating the workflow metadata in the case of updating flag set to false while the metadata alerady exist

* Added logging for workflow metadata update

* Added Rest Execute Workflow action

* Extended workflow context with workflowMetadataId. Adjusted the doc level monitor findings

* Updated conditions for unstashing the context when indexing and deleting the workflow

---------

* Added fix when executing the workflow and when chained findings index… (#890)

* Fixed deleting monitor workflow metadata (#882)

* Fixed deleting monitor metadata and workflow metadata.

* fix monitor metadata error from conflict resolution

* remove unused import

* remove rest execute workflow action

* increment schema version for findings mapping json

---------

Signed-off-by: Stevan Buzejic <[email protected]>
Signed-off-by: Angie Zhang <[email protected]>
Signed-off-by: Ashish Agrawal <[email protected]>
Signed-off-by: Surya Sashank Nistala <[email protected]>
Co-authored-by: Stevan Buzejic <[email protected]>
Co-authored-by: Angie Zhang <[email protected]>
Co-authored-by: opensearch-trigger-bot[bot] <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com>
Co-authored-by: Petar Dzepina <[email protected]>
Co-authored-by: Ashish Agrawal <[email protected]>
(cherry picked from commit 171cd2e)

Co-authored-by: Surya Sashank Nistala <[email protected]>
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