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

Bug 1885709: Support for MySQL 8 #106

Merged
merged 41 commits into from
Mar 17, 2024
Merged

Bug 1885709: Support for MySQL 8 #106

merged 41 commits into from
Mar 17, 2024

Conversation

justdave
Copy link
Member

@justdave justdave commented Mar 13, 2024

Details

Quote the table name when it involves the groups table, since it is now considered to be a reserved word in modern versions of MySQL.

Additional info

This commit was derived from the following one from BMO, in which they use $dbh->quote_identifier(), which allows the different DBD::* drivers to use the appropriate quoting. mozilla-bteam/bmo@5dc1b8c

@justdave
Copy link
Member Author

That test_bmo failure is legit. Need to fix that before this lands.

@justdave
Copy link
Member Author

justdave commented Mar 14, 2024

This is still broken... I pushed my WIP though in case anyone else wants to mess with it.

Build instructions:

docker build -t bmo-cpanfile -f Dockerfile.cpanfile .
docker run -it -v "$(pwd):/app/result" bmo-cpanfile cp cpanfile cpanfile.snapshot /app/result
docker build -t bugzilla/bugzilla-perl-slim:20240314.1 -f Dockerfile.bmo-slim .
docker compose -f docker-compose.test.yml build
docker compose -f docker-compose.test.yml run bmo.test test_bmo -q -f t/bmo/*.t

That last line currently errors out with:

unable to connect to dbi:mysql:database=bugs;host=bmo.db as bugs: Authentication plugin 'caching_sha2_password' reported error: Authentication requires secure connection. at /app/scripts/entrypoint.pl line 268.

It's definitely a build issue with the bugzilla-perl-slim image. If I used bmo-slim and compiled our missing libraries on top of it, then it worked, but that takes forever to build, so there's something else we're missing from BMO.

@justdave
Copy link
Member Author

This depends on #109 and #110 (merged here, but those need to land first for the paperwork)

@justdave
Copy link
Member Author

All of that trying to figure out why the test suddenly didn't pass, turned out to be because circleci wasn't rebuilding the test image between runs, which kinda defeats the purpose. Ended up re-doing a decent chunk of the circleci config to make it all work.

As noted previously, This depends on #109 and #110 (merged here, but those need to land first for the paperwork) so go approve (and land) those first.

@justdave
Copy link
Member Author

#111 also needs to land before this.

@justdave
Copy link
Member Author

#112 also needs to land before this.

@justdave justdave changed the title Cherry-pick BMO MySQL 8 fix into Harmony Bug 1885709: Support for MySQL 8 Mar 17, 2024
@justdave
Copy link
Member Author

All the prereq PRs have landed and this is clear of non-related stuff now. This is ready to land once I get an approval.

@justdave justdave merged commit 6249344 into main Mar 17, 2024
4 checks passed
@justdave justdave deleted the harmony-mysql8 branch March 17, 2024 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants