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
filter bug: when cluster field is "bge-dev1", the applications with cluster "dev1" is selected #6337
Labels
bug
Something isn't working
Comments
bug is caused by the 'filterApps' function in 'applications-list.tsx' file,function use 'includes' not '==='. function filterApps(applications: models.Application[], pref: AppsListPreferences, search: string) {
return applications.filter(
app =>
(search === '' || app.metadata.name.includes(search)) &&
(pref.projectsFilter.length === 0 || pref.projectsFilter.includes(app.spec.project)) &&
(pref.reposFilter.length === 0 || pref.reposFilter.includes(app.spec.source.repoURL)) &&
(pref.syncFilter.length === 0 || pref.syncFilter.includes(app.status.sync.status)) &&
(pref.healthFilter.length === 0 || pref.healthFilter.includes(app.status.health.status)) &&
(pref.namespacesFilter.length === 0 || pref.namespacesFilter.some(ns => app.spec.destination.namespace && minimatch(app.spec.destination.namespace, ns))) &&
(pref.clustersFilter.length === 0 || pref.clustersFilter.some(server => server.includes(app.spec.destination.server || app.spec.destination.name))) &&
(pref.labelsFilter.length === 0 || pref.labelsFilter.every(selector => LabelSelector.match(selector, app.metadata.labels)))
);
} |
HuanxinHu
added a commit
to HuanxinHu/argo-cd
that referenced
this issue
May 27, 2021
fix issued argoproj#6337
This was referenced May 27, 2021
HuanxinHu
added a commit
to HuanxinHu/argo-cd
that referenced
this issue
May 27, 2021
fix issued argoproj#6337 Signed-off-by: Huanxin Hu <huanxin.hu@bytedance.com>
10 tasks
Fixed. Thank you @HuanxinHu |
Due to the fix of #6616 this issue showed up again. After a discussion with @alexmt the below solutions for both issues were made.
|
ciiay
added a commit
to ciiay/argo-cd
that referenced
this issue
Jul 29, 2021
…v1 is selected argoproj#6337 Signed-off-by: ciiay <yicai@redhat.com>
This was referenced Jul 29, 2021
alexmt
pushed a commit
that referenced
this issue
Aug 4, 2021
alexmt
pushed a commit
that referenced
this issue
Aug 4, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you are trying to resolve an environment-specific issue or have a one-off question about the edge case that does not require a feature then please consider asking a question in argocd slack channel.
Checklist:
argocd version
.Describe the bug
The argocd 2.0.2 has a bug on the filter function. We have two clusters, one is "dev1" and the other is "bge-dev1". However, the application with cluster "dev1" are selected when we using filter cluster "bge-dev1"
A clear and concise description of what the bug is.
To Reproduce
A list of the steps required to reproduce the issue. Best of all, give us the URL to a repository that exhibits this issue.
Expected behavior
When filtering apps with cluster, only the applications with that cluster name should be selected.
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Version
Paste the output from `argocd version` here.
Logs
The text was updated successfully, but these errors were encountered: