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

mariadb*, mysql*, percona-server: fix CI test issues #66727

Closed
wants to merge 9 commits into from

Conversation

gromgit
Copy link
Member

@gromgit gromgit commented Dec 11, 2020

For mariadb*:

  1. Don't run post-install in CI, so mysql_install_db doesn't trip over arbitrary contents of CI box
  2. Run a proper test case

mysql* and percona-server already have decent test blocks, so I only applied [1] above.

  • Have you followed the guidelines for contributing?
  • Have you checked that there aren't other open pull requests for the same formula update/change?
  • Have you built your formula locally with brew install --build-from-source <formula>, where <formula> is the name of the formula you're submitting?
  • Is your test running fine brew test <formula>, where <formula> is the name of the formula you're submitting?
  • Does your build pass brew audit --strict <formula> (after doing brew install <formula>)?

@carlocab
Copy link
Member

Would it make sense to do this for all the mariadbs + mysql@5.{6,7} in this PR to demonstrate that this fixes the CI issues?

@SMillerDev
Copy link
Member

See #60190 as well for a running attempt

@gromgit
Copy link
Member Author

gromgit commented Dec 11, 2020

Would it make sense to do this for all the mariadbs + mysql@5.{6,7} in this PR to demonstrate that this fixes the CI issues?

Yes, but I'm starting with the latest version first, to make sure the new test works in CI. I've been burned by "works on local, not in CI" enough times. 😁

@carlocab
Copy link
Member

carlocab commented Dec 11, 2020

Ah, so you must be an expert at fixing those then. I'd appreciate it if you could take a look at #66688

Update: Yep, @gromgit is definitely an expert

@gromgit
Copy link
Member Author

gromgit commented Dec 11, 2020

See #60190 as well for a running attempt

That seems like an orthogonal issue. Adding version-specific data dirs into the mix just means that post-install will fail only on the versions with data dirs that were pre-b0rked for reasons unknown.

Or am I missing your point?

@fxcoudert
Copy link
Member

See #52004 for how this was handled on postgresql

@SMillerDev
Copy link
Member

That seems like an orthogonal issue. Adding version-specific data dirs into the mix just means that post-install will fail only on the versions with data dirs that were pre-b0rked for reasons unknown.

It would reduce the conflicts to just mariadb 5.6 - mysql 5.6 style, but it was more of an indication of prior art anyway.

@gromgit
Copy link
Member Author

gromgit commented Dec 11, 2020

See #52004 for how this was handled on postgresql

Yup, this PR was actually informed by PostgreSQL's approach. In fact, I think that for DBMSes and similar dataspace management packages, the general rule of thumb should be that CI:

  1. avoids touching/creating any existing dataspaces
  2. creates a temporary dataspace for testing

@gromgit gromgit marked this pull request as draft December 11, 2020 12:38
fxcoudert
fxcoudert previously approved these changes Dec 11, 2020
@fxcoudert
Copy link
Member

Not sure why it's draft, but it looks good to me. @gromgit let me know when you're satisfied with your own work ;)

1. Don't run post-install in CI, so `mysql_install_db` doesn't trip over arbitrary contents of CI box
2. Run a proper test case
1. Don't run post-install in CI, so `mysql_install_db` doesn't trip over arbitrary contents of CI box
2. Run a proper test case
1. Don't run post-install in CI, so `mysql_install_db` doesn't trip over arbitrary contents of CI box
2. Run a proper test case
1. Don't run post-install in CI, so `mysql_install_db` doesn't trip over arbitrary contents of CI box
2. Run a proper test case
1. Don't run post-install in CI, so `mysql_install_db` doesn't trip over arbitrary contents of CI box
2. Run a proper test case
Don't run post-install in CI, so DB init doesn't trip over arbitrary contents of CI box
Don't run post-install in CI, so DB init doesn't trip over arbitrary contents of CI box
Don't run post-install in CI, so DB init doesn't trip over arbitrary contents of CI box
Don't run post-install in CI, so DB init doesn't trip over arbitrary contents of CI box
@gromgit gromgit changed the title mariadb: fix CI test issues mariadb, mysql, percona-server: fix CI test issues Dec 12, 2020
@gromgit gromgit changed the title mariadb, mysql, percona-server: fix CI test issues mariadb*, mysql*, percona-server: fix CI test issues Dec 12, 2020
@gromgit gromgit marked this pull request as ready for review December 12, 2020 08:24
@gromgit
Copy link
Member Author

gromgit commented Dec 12, 2020

@fxcoudert Sorry, I decided to sleep on it, as I had a nagging feeling I'd forgotten something.

It turns out I had: All the test MariaDB servers were running on the default port instead of free_port. 🤦

Fixed that, and disabled CI post-install on mysql* and percona-server as well.

Only one audit failure, which looks like a transient issue (the URL itself isn't broken):

Error: 1 problem in 1 formula detected
mariadb@10.4:
  * Stable: The URL https://downloads.mariadb.org/f/mariadb-10.4.17/source/mariadb-10.4.17.tar.gz is not reachable

@BrewTestBot
Copy link
Member

:shipit: @Rylan12 has triggered a merge.

@gromgit gromgit deleted the mariadb_fix_test branch December 14, 2020 08:17
@carlocab carlocab mentioned this pull request Dec 18, 2020
@BrewTestBot BrewTestBot added the outdated PR was locked due to age label Jan 14, 2021
@Homebrew Homebrew locked as resolved and limited conversation to collaborators Jan 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants