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

[feature] - search multitenant workflow run search in parent org #145

Merged
merged 2 commits into from
Feb 4, 2025

Conversation

LalitDeore
Copy link
Contributor

No description provided.

Copy link
Member

@frikky frikky left a comment

Choose a reason for hiding this comment

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

Nice

}

// Limit to max 50 suborgs
if len(suborgs) > 50 {
Copy link
Member

Choose a reason for hiding this comment

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

Minor unimportant optimization: Shouldn't the check for the user existing in an org happen earlier? Inside the goroutine is "efficient", but it can randomly turn into search e.g. 27 orgs instead of 50, as the cleanup happens before we check if they should be able to see it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

true, I will update that check.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Update code in this commit: 42ce125

@@ -28483,6 +28483,104 @@ func HandleWorkflowRunSearch(resp http.ResponseWriter, request *http.Request) {
Cursor: cursor,
}

//Get workflow run for all subgs of current org where the user is a member
if search.SuborgRuns == true {
Copy link
Member

Choose a reason for hiding this comment

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

What happens if the search is specifically for a single workflow? Do we just remove the filter?

I'm aware we said we would wait with this, but the if statement needs to at least take it into account as to not "randomly" add a bunch of suborg workflows.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, when suborg workflow run search is one and if user select any specific workflow to search than it clear filter for suborg and then only search for that workflow

@frikky frikky merged commit 942ed1d into Shuffle:main Feb 4, 2025
2 of 3 checks passed
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