screwdriver-cd / screwdriver

An open source build platform designed for continuous delivery.
http://screwdriver.cd
Other
1.02k stars 169 forks source link

Search query should be case insensitive #1272

Closed taisukeh closed 5 years ago

taisukeh commented 6 years ago

What happened:

Currently, the pipeline search query is case sensitive.

What you expected to happen:

The pipeline search query should be case insensitive.

How to reproduce it:

Search Filbird/sd-cmd-test pipeline by filbird.

tkyi commented 6 years ago

We're switching to moving search functionality to the datastore. Since we're using sequelize, we're stuck with the case-sensitive search, since ILIKE is only available for postgres (http://docs.sequelizejs.com/manual/tutorial/querying.html#operators).

jithine commented 6 years ago

We're switching to moving search functionality to the datastore. Since we're using sequelize, we're stuck with the case-sensitive search, since ILIKE is only available for postgres (http://docs.sequelizejs.com/manual/tutorial/querying.html#operators).

What happens if we use ILIKE on sql ? will it fail or fall back to current behavior. If it falls back we should do it.

d2lam commented 5 years ago

Update 3/21/2019

Added a PR to address this issue. It will check if the dialect is postgres. If it is, it will use case insensitive search. Otherwise, fall back to the current behavior.

minzcmu commented 5 years ago

@taisukeh This behavior can be tuned by collation of the DB or column and it should work for the sql dbs we support. But since we don't set it in the first place, to do it now we need to alter table which is kinda expensive to do...

https://stackoverflow.com/questions/2876789/how-can-i-search-case-insensitive-in-a-column-using-like-wildcard

https://github.com/sequelize/sequelize/issues/7110

d2lam commented 5 years ago

This is now working for cd.screwdriver.cd, since our DB is postgres.

Screen Shot 2019-03-25 at 4 28 15 PM
taisukeh commented 5 years ago

Thanks so much!