-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
feat(archive): Add support to filter list by labels. Closes #2171 #2205
Conversation
@sarabala1979 @whynowy could you review this please? It would be good to get into v2.5. |
Select("name", "namespace", "uid", "phase", "startedat", "finishedat"). | ||
From(archiveTableName). | ||
Where(db.Cond{"clustername": r.clusterName}). | ||
And(namespaceEqual(namespace)). | ||
And(clause). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious about the performance if there are 10K, 100K archived workflows.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should consider testing this
} | ||
|
||
func (r *workflowArchive) ListWorkflows(namespace string, limit int, offset int) (wfv1.Workflows, error) { | ||
func (r *workflowArchive) ListWorkflows(namespace string, labelRequirements labels.Requirements, limit int, offset int) (wfv1.Workflows, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Labels key-values need to be set in the returned workflow list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those workflow labels will be used to populate label suggestions in the filter component, considering it's already paginated, having them shouldn't bring much performance concern.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure how we'd do this, joining onto argo_archived_workflow_label would be a cartesian join, and selecting from the workflow column would negatively impact performance.
Unless this is a must-have - I don't think we can do it.
Checklist:
"fix(controller): Updates such and such. Fixes #1234"
.Closes #2171