-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Update MariaDB containers #9554
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,8 +17,10 @@ public class MariaDBContainer<SELF extends MariaDBContainer<SELF>> extends JdbcD | |
|
||
private static final DockerImageName DEFAULT_IMAGE_NAME = DockerImageName.parse("mariadb"); | ||
|
||
private static final DockerImageName FOUNDATION_IMAGE_NAME = DockerImageName.parse("quay.io/repository/mariadb-foundation/mariadb-devel"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
@Deprecated | ||
public static final String DEFAULT_TAG = "10.3.6"; | ||
public static final String DEFAULT_TAG = "10.11.10"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. default constructor is deprecated and for those using it will bring a new version, which is unexpected. User must declare the version they want to use |
||
|
||
public static final String NAME = "mariadb"; | ||
|
||
|
@@ -55,7 +57,7 @@ public MariaDBContainer(String dockerImageName) { | |
|
||
public MariaDBContainer(final DockerImageName dockerImageName) { | ||
super(dockerImageName); | ||
dockerImageName.assertCompatibleWith(DEFAULT_IMAGE_NAME); | ||
dockerImageName.assertCompatibleWith(DEFAULT_IMAGE_NAME, FOUNDATION_IMAGE_NAME); | ||
|
||
addExposedPort(MARIADB_PORT); | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,7 +39,7 @@ public void testSimple() throws SQLException { | |
public void testSpecificVersion() throws SQLException { | ||
try ( | ||
MariaDBContainer<?> mariadbOldVersion = new MariaDBContainer<>( | ||
MariaDBTestImages.MARIADB_IMAGE.withTag("10.3.39") | ||
MariaDBTestImages.MARIADB_IMAGE.withTag("10.11.10") | ||
) | ||
) { | ||
mariadbOldVersion.start(); | ||
|
@@ -49,7 +49,7 @@ public void testSpecificVersion() throws SQLException { | |
|
||
assertThat(resultSetString) | ||
.as("The database version can be set using a container rule parameter") | ||
.startsWith("10.3.39"); | ||
.startsWith("10.11.10"); | ||
} | ||
} | ||
|
||
|
@@ -59,7 +59,7 @@ public void testMariaDBWithCustomIniFile() throws SQLException { | |
|
||
try ( | ||
MariaDBContainer<?> mariadbCustomConfig = new MariaDBContainer<>( | ||
MariaDBTestImages.MARIADB_IMAGE.withTag("10.3.39") | ||
MariaDBTestImages.MARIADB_IMAGE.withTag("10.11.10") | ||
) | ||
.withConfigurationOverride("somepath/mariadb_conf_override") | ||
) { | ||
|
@@ -107,7 +107,7 @@ public void testWithOnlyUserReadableCustomIniFile() throws Exception { | |
|
||
try ( | ||
MariaDBContainer<?> mariadbCustomConfig = new MariaDBContainer<>( | ||
MariaDBTestImages.MARIADB_IMAGE.withTag("10.3.39") | ||
MariaDBTestImages.MARIADB_IMAGE.withTag("10.11.10") | ||
) | ||
.withConfigurationOverride("somepath/mariadb_conf_override") | ||
) { | ||
|
@@ -144,6 +144,18 @@ public void testEmptyPasswordWithRootUser() throws SQLException { | |
} | ||
} | ||
|
||
@Test | ||
public void testFondationImages() throws SQLException { | ||
try (MariaDBContainer<?> mysql = new MariaDBContainer<>("quay.io/repository/mariadb-foundation/mariadb-devel?tab=tags&tag=11.7").withUsername("root")) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. any specific reason to declare There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Filtering to the quay.io registry component there seems to be one incident in August 2024 since February 2024 when they migrated there. The March 2024 incident looked like deployment rather than pulls. Did you experience more than these? There's currently about 300-400 pulls per day on the mariadb-devel image so I'm just hoping its reliable enough for everyone. |
||
mysql.start(); | ||
|
||
ResultSet resultSet = performQuery(mysql, "SELECT 1"); | ||
int resultSetInt = resultSet.getInt(1); | ||
|
||
assertThat(resultSetInt).isEqualTo(1); | ||
} | ||
} | ||
|
||
private void assertThatCustomIniFileWasUsed(MariaDBContainer<?> mariadb) throws SQLException { | ||
try (ResultSet resultSet = performQuery(mariadb, "SELECT @@GLOBAL.innodb_max_undo_log_size")) { | ||
long result = resultSet.getLong(1); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we use dependabot to update our dependencies. Please revert