You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "merlimat (via GitHub)" <gi...@apache.org> on 2026/10/12 22:59:40 UTC

[PR] [fix][test] Run the Oxia-backed tests against oxia/oxia:nightly-beta [pulsar]

merlimat opened a new pull request, #26880:
URL: https://github.com/apache/pulsar/pull/26880

   ### Motivation
   
   Every Oxia-backed test in Pulsar starts the `oxia/oxia:main` image. Oxia no longer publishes that tag: it was last built on 2026-08-30, from Oxia's main branch at `783841ca` (2026-08-20). So CI has been testing against that seven-week-old snapshot, and nothing shows it, because `docker pull` reports the image as up to date. Oxia now publishes its daily build of main as `oxia/oxia:nightly-beta`. The image name is also hardcoded in two places, one of them inside a third-party library.
   
   ```
   $ docker image inspect oxia/oxia:main oxia/oxia:nightly-beta \
       --format '{{index .RepoTags 0}} revision={{index .Config.Labels "org.opencontainers.image.revision"}} created={{.Created}}'
   oxia/oxia:main revision=783841caa9cf3e40be176191998891515cb460d9 created=2026-08-30T00:56:48.242660153Z
   oxia/oxia:nightly-beta revision=68e9015dcce9b55a3cf6d4651118aa8e792d3452 created=2026-10-12T18:42:04.436593812Z
   ```
   
   Where the tests pick the image today:
   
   ```java
   // BaseMetadataStoreTest, OxiaPartitionKeyTest, OxiaSequenceKeysTest, SharedMultiBrokerPulsarCluster
   // (oxia-testcontainers 0.7.4: DEFAULT_IMAGE_NAME = DockerImageName.parse("oxia/oxia:main"))
   oxiaServer = new OxiaContainer(OxiaContainer.DEFAULT_IMAGE_NAME);
   
   // tests/integration/.../oxia/OxiaContainer.java
   private static final String DEFAULT_IMAGE_NAME = "oxia/oxia:main";
   ```
   
   ### Modifications
   
   A new class in `buildtools` holds the image name. pulsar-metadata and tests/integration already depend on `buildtools`, and pulsar-broker gets it through the pulsar-metadata test jar.
   
   ```java
   public final class OxiaTestImage {
   
       /**
        * Oxia's nightly build of its main branch. The tag moves every day.
        */
       public static final String NAME = "oxia/oxia:nightly-beta";
   ```
   
   The four Testcontainers call sites use it instead of the library default:
   
   ```java
   oxiaServer = new OxiaContainer(DockerImageName.parse(OxiaTestImage.NAME));
   ```
   
   The integration tests' `OxiaContainer` drops its own constant and calls `this(clusterName, OxiaTestImage.NAME, DEFAULT_SHARDS)`.
   
   `nightly-beta` follows Oxia's main branch, as `main` used to, so an Oxia regression on main can now fail Pulsar CI without any Pulsar change. Pinning a release instead, such as `oxia/oxia:0.16.11`, means changing only `OxiaTestImage.NAME`.
   
   ### Verifying this change
   
   - [ ] Make sure that the change passes the CI checks.
   
   This change is already covered by existing tests, such as the Oxia-backed tests it moves to the new image. All runs used `nightly-beta` at `68e9015d`, with `-PtestRetryCount=0`.
   
   - **Build checks:** `./gradlew quickCheck` passed, and the test sources of pulsar-metadata, pulsar-broker and tests/integration compiled.
   - **pulsar-metadata:** `OxiaPartitionKeyTest`, `OxiaSequenceKeysTest` and the 26 runnable `BaseMetadataStoreTest` subclasses, with `TEST_METADATA_PROVIDERS=Oxia`. Result: 264 tests, 1 skipped by design (`testDeleteUnusedDirectories`, which Oxia doesn't support), 1 failed.
     - The failure is `MetadataStoreTest.testGetChildren`, the known ordering bug #21502. `testExistsDistributed` leaves a `/key-*` entry at the root of the store the class shares, and the first `testGetChildren` row to run sees it.
     - It fails identically with `oxia/oxia:main` and passes on `nightly-beta` when run alone. With all providers enabled, it fails on the ZooKeeper row instead.
   - **pulsar-broker:** `EndToEndMetadataTest`, `V5MultiBrokerNamespaceDeleteTest`, `V5MultiBrokerScalableTopicStatsTest` and `V5MultiBrokerScalableTopicTest`: 14 tests passed.
   - **Integration**, with `PULSAR_TEST_IMAGE_NAME=apachepulsar/java-test-image:latest`: `OxiaSmokeTest` and `V5ScalableTopicTransactionOnOxiaTest`: 8 tests passed.
   
   ### Does this pull request potentially affect one of the following parts:
   
   *If the box was checked, please highlight the changes*
   
   - [ ] Dependencies (add or upgrade a dependency)
   - [ ] The public API
   - [ ] The schema
   - [ ] The default values of configurations
   - [ ] The threading model
   - [ ] The binary protocol
   - [ ] The REST endpoints
   - [ ] The admin CLI options
   - [ ] The metrics
   - [ ] Anything that affects deployment
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [fix][test] Run the Oxia-backed tests against oxia/oxia:nightly-beta [pulsar]

Posted by "merlimat (via GitHub)" <gi...@apache.org>.
merlimat commented on code in PR #26880:
URL: https://github.com/apache/pulsar/pull/26880#discussion_r4253252969


##########
buildtools/src/main/java/org/apache/pulsar/tests/OxiaTestImage.java:
##########
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.pulsar.tests;
+
+/**
+ * The Oxia Docker image that the Oxia-backed tests run against.
+ */
+public final class OxiaTestImage {
+
+    /**
+     * Oxia's nightly build of its main branch. The tag moves every day.
+     */
+    public static final String NAME = "oxia/oxia:nightly-beta";

Review Comment:
   Expanded the Javadoc in abd16f1aac5: why `nightly-beta` over `nightly-stable`, a link to Oxia's nightly images workflow instead of naming the branch, pin a release tag if a nightly breaks the tests, and `docker pull oxia/oxia:nightly-beta` before reproducing a CI failure.
   
   _🤖 Addressed by [Claude Code](https://claude.com/claude-code)_
   



##########
pulsar-metadata/src/test/java/org/apache/pulsar/metadata/BaseMetadataStoreTest.java:
##########
@@ -159,7 +161,7 @@ protected synchronized String getOxiaServerConnectString() {
             return null;
         }
         if (oxiaServer == null) {
-            oxiaServer = new OxiaContainer(OxiaContainer.DEFAULT_IMAGE_NAME);
+            oxiaServer = new OxiaContainer(DockerImageName.parse(OxiaTestImage.NAME));

Review Comment:
   Every Oxia start now logs the image's `org.opencontainers.image.revision` (abd16f1aac5: a new `OxiaTestServer.start(shards)` for the four unit-test sites, `containerIsStarted` in the integration `OxiaContainer`); I left out the age-based pull policy because it compares the image's build time, so whenever the latest nightly is over a day old every container start would pull again (Docker Hub rate limits in CI) and an offline run would fail, so the Javadoc asks for a `docker pull` instead.
   
   _🤖 Addressed by [Claude Code](https://claude.com/claude-code)_
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [fix][test] Run the Oxia-backed tests against oxia/oxia:nightly-beta [pulsar]

Posted by "codelipenghui (via GitHub)" <gi...@apache.org>.
codelipenghui commented on code in PR #26880:
URL: https://github.com/apache/pulsar/pull/26880#discussion_r4253180884


##########
pulsar-metadata/src/test/java/org/apache/pulsar/metadata/BaseMetadataStoreTest.java:
##########
@@ -159,7 +161,7 @@ protected synchronized String getOxiaServerConnectString() {
             return null;
         }
         if (oxiaServer == null) {
-            oxiaServer = new OxiaContainer(OxiaContainer.DEFAULT_IMAGE_NAME);
+            oxiaServer = new OxiaContainer(DockerImageName.parse(OxiaTestImage.NAME));

Review Comment:
   Now that the tag changes daily, could we log which Oxia build ran? The container inherits the image's revision label, so after `start()` this gives the Oxia commit:
   
   ```java
   oxiaServer.getContainerInfo().getConfig().getLabels().get("org.opencontainers.image.revision")
   ```
   
   The same applies to `SharedMultiBrokerPulsarCluster` and the integration `OxiaContainer`. Optionally, `.withImagePullPolicy(PullPolicy.ageBased(Duration.ofDays(1)))` would keep local runs on the same build as CI.



##########
buildtools/src/main/java/org/apache/pulsar/tests/OxiaTestImage.java:
##########
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.pulsar.tests;
+
+/**
+ * The Oxia Docker image that the Oxia-backed tests run against.
+ */
+public final class OxiaTestImage {
+
+    /**
+     * Oxia's nightly build of its main branch. The tag moves every day.
+     */
+    public static final String NAME = "oxia/oxia:nightly-beta";

Review Comment:
   Could this javadoc say why `nightly-beta` and not `nightly-stable`? Oxia publishes both. `nightly-stable` is built from `release-0.16`, and today it is the same commit as `0.16.11`. It would also help to say what to do when an Oxia nightly breaks Pulsar CI: pin a release tag here.
   
   Oxia's [ci-nightly-images.yaml](https://github.com/oxia-db/oxia/blob/main/.github/workflows/ci-nightly-images.yaml) decides which branch each channel builds from, and that can change, so linking it is safer than saying "main". Also, Testcontainers never re-pulls a cached image, so a local run keeps the first nightly it pulled. Asking people to run `docker pull oxia/oxia:nightly-beta` before reproducing a CI failure would save confusion.



##########
pulsar-metadata/src/test/java/org/apache/pulsar/metadata/OxiaPartitionKeyTest.java:
##########
@@ -50,7 +52,7 @@ public class OxiaPartitionKeyTest {
 
     @BeforeClass
     public void start() {
-        oxiaServer = new OxiaContainer(OxiaContainer.DEFAULT_IMAGE_NAME).withShards(SHARDS);
+        oxiaServer = new OxiaContainer(DockerImageName.parse(OxiaTestImage.NAME)).withShards(SHARDS);

Review Comment:
   If you add a pull policy: `withShards()` is a Lombok `@With`, so it builds a new `OxiaContainer` and anything set before it is lost. The policy has to go after `.withShards(SHARDS)`. The same applies to `OxiaSequenceKeysTest`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [fix][test] Run the Oxia-backed tests against oxia/oxia:nightly-beta [pulsar]

Posted by "merlimat (via GitHub)" <gi...@apache.org>.
merlimat merged PR #26880:
URL: https://github.com/apache/pulsar/pull/26880


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org