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

Fixed User.externalUsername column and creation on db #3583

Merged
merged 2 commits into from
Aug 1, 2022

Conversation

Coduz
Copy link
Contributor

@Coduz Coduz commented Jul 29, 2022

This PR fixes the definition of the external_username column on usr_user table, which is incompatible with MySQL/MariaDB instances which have property innodb_large_prefix set to OFF, which limits the max length of an index to 767 bytes. See MariaDB/MySQL documentation

Related Issue
This PR fixes #3523

Description of the solution adopted
Changed the Liquibase definition for the column.

Screenshots
None

Any side note on the changes made
Added also code argument validation to the length of User.name and User.externalUsername fields.

@Coduz Coduz added the Bug This is a bug or an unexpected behaviour. Fix it! label Jul 29, 2022
@codecov
Copy link

codecov bot commented Jul 29, 2022

Codecov Report

Merging #3583 (65ff2d1) into develop (670050c) will decrease coverage by 24.42%.
The diff coverage is 0.00%.

❗ Current head 65ff2d1 differs from pull request most recent head 2c93de4. Consider uploading reports for the commit 2c93de4 to get more accurate results

Impacted file tree graph

@@              Coverage Diff               @@
##             develop    #3583       +/-   ##
==============================================
- Coverage      50.23%   25.81%   -24.43%     
+ Complexity       259      115      -144     
==============================================
  Files           1662     1662               
  Lines          31940    31946        +6     
  Branches        2643     2643               
==============================================
- Hits           16045     8246     -7799     
- Misses         14958    23352     +8394     
+ Partials         937      348      -589     
Impacted Files Coverage Δ
...e/kapua/service/user/internal/UserServiceImpl.java 3.64% <0.00%> (-47.50%) ⬇️
...se/kapua/commons/model/query/QueryFactoryImpl.java 0.00% <0.00%> (-100.00%) ⬇️
...pse/kapua/kura/simulator/GatewayConfiguration.java 0.00% <0.00%> (-100.00%) ⬇️
...lipse/kapua/service/job/internal/JobQueryImpl.java 0.00% <0.00%> (-100.00%) ⬇️
...lipse/kapua/service/tag/internal/TagQueryImpl.java 0.00% <0.00%> (-100.00%) ⬇️
...kapua/transport/mqtt/MqttResponseTimeoutTimer.java 0.00% <0.00%> (-100.00%) ⬇️
...ons/configuration/ServiceConfigListResultImpl.java 0.00% <0.00%> (-100.00%) ⬇️
...a/kura/simulator/birth/BirthCertificateModule.java 0.00% <0.00%> (-100.00%) ⬇️
.../kapua/service/job/internal/JobListResultImpl.java 0.00% <0.00%> (-100.00%) ⬇️
.../kapua/service/tag/internal/TagListResultImpl.java 0.00% <0.00%> (-100.00%) ⬇️
... and 418 more

Signed-off-by: Alberto Codutti <[email protected]>
@Coduz Coduz merged commit 423aaa8 into eclipse:develop Aug 1, 2022
@Coduz Coduz deleted the fix-userExternalUsernameIndex branch August 1, 2022 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This is a bug or an unexpected behaviour. Fix it!
Projects
Development

Successfully merging this pull request may close these issues.

1 participant