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

Mysql throws error when app name contains emoji #3719

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

Conversation

kathap
Copy link
Contributor

@kathap kathap commented Apr 3, 2024

In postgres there is no issue when you name your app e.g. 🦄🦄🦄, but the tests for mysql fail with:

Sequel::DatabaseError:
Mysql2::error: Incorrect string value: '\xF0\x9F\xA6\x84\xF0\x9F...' for column 'name' at row 1

Question: consistency -> app names should have the same options in mysql and postgres?

Thanks for contributing to cloud_controller_ng. To speed up the process of reviewing your pull request please provide us with:

  • I have reviewed the contributing guide

  • I have viewed, signed, and submitted the Contributor License Agreement

  • I have made this pull request to the main branch

  • I have run all the unit tests using bundle exec rake

  • I have run CF Acceptance Tests

In postgres there is no issue when you name your app e.g. 🦄🦄🦄, but
the tests for mysql fail with:

Sequel::DatabaseError:
Mysql2::error: Incorrect string value: '\xF0\x9F\xA6\x84\xF0\x9F...' for column 'name' at row 1

Suggestion: consistency -> app names should have the same options in mysql and postgres
@FloThinksPi
Copy link
Member

FloThinksPi commented Apr 18, 2024

If emojies/non ASCII characters behave differently on MYSQL and PSQL one may consider a more generic approach, e.g. on sequel level, throw an exception that gets handled accordingly and the API returns a proper error.
Preferably all UTF8 Characters work on mysql too.
The reason why: non ASCII characters can be found in all entities(strings) customers can provide over the api. For example orgs names, space names, labels, annotations and so on.
Also ive seen such resources like org names with emojies in production - also when introducing a exception one must be sure to not break workflows when e.g. an operations is conducted on an app(e.g. scale) that has a non compliant name already on psql. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants