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

Add ES support for ListAllWorkflowExecutions #6157

Merged
merged 5 commits into from
Jul 5, 2024

Conversation

sankari165
Copy link
Member

What changed?
ES support for ListAllWorkflowExecutions

Why?
ES is still used in many clusters and we need support for ListAllWorkflowExecutions

How did you test it?
unit tests

Potential risks

Release notes

Documentation Changes

Copy link

codecov bot commented Jul 3, 2024

Codecov Report

Attention: Patch coverage is 93.33333% with 4 lines in your changes missing coverage. Please review.

Project coverage is 72.67%. Comparing base (b5a79d2) to head (5781a11).
Report is 5 commits behind head on master.

Additional details and impacted files
Files Coverage Δ
...n/persistence/elasticsearch/es_visibility_store.go 82.70% <93.33%> (+1.08%) ⬆️

... and 5 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b5a79d2...5781a11. Read the comment docs.

common/persistence/elasticsearch/es_visibility_store.go Outdated Show resolved Hide resolved
common/persistence/elasticsearch/es_visibility_store.go Outdated Show resolved Hide resolved
@@ -445,7 +444,38 @@ func (v *esVisibilityStore) ListWorkflowExecutions(
}

func (v *esVisibilityStore) ListAllWorkflowExecutions(ctx context.Context, request *p.InternalListAllWorkflowExecutionsByTypeRequest) (*p.InternalListWorkflowExecutionsResponse, error) {
return nil, p.ErrVisibilityOperationNotSupported
isRecordValid := func(rec *p.InternalVisibilityWorkflowExecutionInfo) bool {
return !request.EarliestTime.After(rec.StartTime) && !rec.StartTime.After(request.LatestTime)
Copy link
Member

Choose a reason for hiding this comment

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

I guess this should also be covered with tests

Copy link
Member

@3vilhamster 3vilhamster left a comment

Choose a reason for hiding this comment

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

LGTM.

Side note: do we want to onboard to using query builders, like https://github.com/defensestation/osquery or https://github.com/aquasecurity/esquery

common/persistence/elasticsearch/es_visibility_store.go Outdated Show resolved Hide resolved
@sankari165 sankari165 merged commit dc05a78 into cadence-workflow:master Jul 5, 2024
21 checks passed
@sankari165 sankari165 deleted the CDNC-9445 branch July 5, 2024 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants