Skip to content

Upgrade MySql client and remove allowed failures on CI builds #2501

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

Merged
merged 6 commits into from
Oct 22, 2020

Conversation

bahusoid
Copy link
Member

@bahusoid bahusoid commented Aug 29, 2020

They claim issue is no longer reproduced on latest client: https://bugs.mysql.com/bug.php?id=90086

@hazzik
Copy link
Member

hazzik commented Aug 29, 2020

It is fixed in .22 which is not released yet. I’m waiting for the release.

@bahusoid bahusoid closed this Aug 29, 2020
@hazzik hazzik reopened this Aug 30, 2020
@hazzik hazzik changed the title Upgrade MySql client and remove allowed failures on CI builds WIP Upgrade MySql client and remove allowed failures on CI builds Aug 30, 2020
@hazzik hazzik marked this pull request as draft August 31, 2020 22:46
@hazzik hazzik changed the title WIP Upgrade MySql client and remove allowed failures on CI builds Upgrade MySql client and remove allowed failures on CI builds Aug 31, 2020
@hazzik hazzik marked this pull request as ready for review October 19, 2020 19:45
@hazzik
Copy link
Member

hazzik commented Oct 20, 2020

@bahusoid still does not work

This is what I was trying to fix:

Failed : NHibernate.Test.TypesTest.StringTypeFixtureAsync.InsertUnicodeValueAsync

  String lengths are both 53. Strings differ at index 0.

  Expected: "길동 최고 新闻 地图 ます プル éèêëîïôöõàâäåãçùûü бджзй αβ ខគឃ ضذخ"

  But was:  "?? ?? ?? ?? ?? ?? éèêëîïôöõàâäåãçùûü ????? aß ??? ???"

  -----------^

   at NHibernate.Test.TypesTest.StringTypeFixtureAsync.InsertUnicodeValueAsync() in /home/travis/build/nhibernate/nhibernate-core/src/NHibernate.Test/Async/TypesTest/StringTypeFixture.cs:line 68

@bahusoid
Copy link
Member Author

bahusoid commented Oct 20, 2020

This is what I was trying to fix

I got it. But it failed the same with you changes, so I assumed that such characters are 4-bytes long so changed to UTF8mb4. This issue is gone with this change . But other tests now failed with new error like

NHibernate.Test.SubselectFetchTest.SubselectFetchFixture
NHibernate.HibernateException : Specified key was too long; max key length is 767 bytes
  ----> MySql.Data.MySqlClient.MySqlException : Specified key was too long; max key length is 767 bytes

@hazzik

This comment has been minimized.

hazzik
hazzik previously approved these changes Oct 21, 2020
@hazzik
Copy link
Member

hazzik commented Oct 21, 2020

Ok. Combination of utf8_general_ci and mysql 5.7 has fixed the MySQL issues. The only problem that MySQL 5.7 is not supported on trusty. Upgrade to bionic/xenial, unfortunately, breaks Firebird.

@bahusoid
Copy link
Member Author

Combination of utf8_general_ci and mysql 5.7

I was close :) Did you get why no explicit changes are required for appveyour?

Upgrade to bionic/xenial, unfortunately, breaks Firebird.

Hm.. I made a quick search and found seems to working Firebird installation on xenial travis:
https://github.com/asfernandes/node-firebird-drivers/blob/7fddf29970066b185a580e3f2dd26cbc0b6e6848/.travis.yml

Seems the relevant parts:
https://github.com/asfernandes/node-firebird-drivers/blob/7fddf29970066b185a580e3f2dd26cbc0b6e6848/.travis.yml#L18-L20
https://github.com/asfernandes/node-firebird-drivers/blob/7fddf29970066b185a580e3f2dd26cbc0b6e6848/.travis.yml#L35-L38

@hazzik
Copy link
Member

hazzik commented Oct 21, 2020

Did you get why no explicit changes are required for appveyor?

Because AppVeyor already runs 5.7 with utf8_general_ci collation.

@hazzik
Copy link
Member

hazzik commented Oct 21, 2020

Seems the relevant parts

First link is what we do but with curl instead of nuget.

The second one is what we also have.

I think usermod command is the key.

@hazzik
Copy link
Member

hazzik commented Oct 21, 2020

I think usermod command is the key.

It should be. I've used clean docker image of ubuntu:xenial and Firebird works there using our steps. The difference is that in docker everything runs under root user. Here as travis.

UPD: no effect.

hazzik
hazzik previously approved these changes Oct 22, 2020
language: csharp
mono: none
dotnet: 2.1.300
sudo: required
Copy link
Member

Choose a reason for hiding this comment

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

This option is obsolete

before_install:
- curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
- curl https://packages.microsoft.com/config/ubuntu/14.04/prod.list | sudo tee /etc/apt/sources.list.d/microsoft.list
Copy link
Member

Choose a reason for hiding this comment

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

Not needed

sudo service mysql restart
fi
- |-
if [[ "$DB" == "Firebird" ]]
then
sudo apt-get install -y libicu-dev libtommath-dev curl
Copy link
Member

Choose a reason for hiding this comment

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

libicu-dev and curl are already installed so no point to install them again.

Copy link
Member Author

Choose a reason for hiding this comment

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

Why did you change it back to libtommath-dev? I suspect with libtommath0 hacky stuff below with ln wouldn't be required for bionic and above. Or am I wrong?

Copy link
Member

Choose a reason for hiding this comment

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

The libtommath-dev references either libtommath0 or libtommath1 depending on the distributive. 16.04 is the last version which will include libtommath0. The 18.04 and above uses libtommath1.

Firebird 3.x is built against libtommath0 and they refuse to rebuild it to libtommath1, so the ln will be required in 18.04 or above when using the official distribution.

However, it seems that 18.04 and above have Firebird 3.0 in the apt.

sudo apt-get install -y libtommath-dev
# This would be required on bionic and above
# sudo ln -s /usr/lib/x86_64-linux-gnu/libtommath.so.1 /usr/lib/x86_64-linux-gnu/libtommath.so.0
wget -q https://github.com/FirebirdSQL/firebird/releases/download/R3_0_5/Firebird-3.0.5.33220-0.amd64.tar.gz
Copy link
Member

Choose a reason for hiding this comment

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

curl -L -O URL and wget URL do exactly same. I decided to leave wget as it is a standard GNU utility.

@@ -41,7 +37,7 @@ before_install:
echo -e "nhibernate = /tmp/firebird/nhibernate.fdb" | sudo tee -a /opt/firebird/databases.conf
echo -e "AuthServer = Srp\nAuthClient = Srp\nUserManager = Srp\nWireCrypt = Enabled" | sudo tee -a /opt/firebird/firebird.conf
sudo /opt/firebird/bin/gsec -modify SYSDBA -pw masterkey -admin yes
sudo service firebird restart
sudo systemctl restart firebird-superserver
Copy link
Member

Choose a reason for hiding this comment

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

The reason it was failing is because the service name on 3.0.x has changed. Probably 14.04 has some residue service definitions for firebird service and so it was working as intended.

@hazzik hazzik merged commit ef4f4a4 into nhibernate:master Oct 22, 2020
@hazzik

This comment has been minimized.

@bahusoid

This comment has been minimized.

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