Skip to content

Fallback to case insensitive searching in some cases #2895

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zackgalbreath
Copy link
Contributor

Perform case insensitive searches for projects and build groups.

The background here is that MySQL performs case insensitive searches by default, while Postgres does not.

Thus, the motivation behind this change is to reduce the impact on our users as CDash instances are being migrated from MySQL to Postgres.

Perform case insensitive searches for projects and build groups.

The background here is that MySQL performs case insensitive searches
by default, while Postgres does not.

Thus, the motivation behind this change is to reduce the impact on our users
as CDash instances are being migrated from MySQL to Postgres.
Copy link
Collaborator

@williamjallen williamjallen left a comment

Choose a reason for hiding this comment

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

While I realize that the case sensitivity change may be disruptive for some users, I think it's worth re-evaluating whether case-insensitivity in these cases provides a meaningful benefit to users in the long run. In the case of filters, there was a clear use case for case-insensitivity, so #2893 certainly makes sense as a feature of CDash. I'm less sure about build group and project names though. These are cases where I think a user could reasonably expect the behavior to be case-sensitive, with mis-capitalizations largely being unintentional.

Handling only these few cases for immediate convenience burdens us with long-term technical debt which is bound to crop up in a multitude of ways in the future. In addition to my primary maintainability concerns, I'm also concerned about security and performance. Treating everything as lowercase means that Postgres cannot use our indexes to speed up queries involving the modified fields in most cases. Additionally, treating everything in a case-insensitive manner means that our unique constraints are effectively useless. In the project name example in this PR, think about what this means for CDash instances where a malicious user creates a project named "project" when an existing project named "PROJECT" exists...

To reiterate, I strongly believe this is not the correct approach to take. Instead, I think we should accept the momentary inconvenience of dealing with breaking changes in a major version release, in exchange for far clearer behavior in the future.

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