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

[fix][build] Upgrade docker-maven-plugin to 0.43.4 #22609

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nodece
Copy link
Member

@nodece nodece commented Apr 28, 2024

Motivation

This plugin doesn't work on the MacOS 14.1.1 (23B81) with intel CPU.

Client:
 Cloud integration: v1.0.35+desktop.5
 Version:           24.0.7
 API version:       1.43
 Go version:        go1.20.10
 Git commit:        afdd53b
 Built:             Thu Oct 26 09:04:20 2023
 OS/Arch:           darwin/amd64
 Context:           desktop-linux

Server: Docker Desktop 4.26.1 (131620)
 Engine:
  Version:          24.0.7
  API version:      1.43 (minimum version 1.12)
  Go version:       go1.20.10
  Git commit:       311b9ff
  Built:            Thu Oct 26 09:08:02 2023
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.25
  GitCommit:        d8f198a4ed8892c764191ef7b3b06d8a2eeb5c7f
 runc:
  Version:          1.1.10
  GitCommit:        v1.1.10-0-g18a0cb0
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

Build and Push command:

mvn install -DUBUNTU_MIRROR=http://azure.archive.ubuntu.com/ubuntu/ \
    -DskipTests \
    -Dmaven.gitcommitid.nativegit=true \
    -Pmain,docker -Pdocker-push \
    -Ddocker.platforms=linux/arm64 \
    -Ddocker.organization=$YOUR_ORG \
    -pl docker/pulsar

Fault log:

[INFO] --- docker:0.43.3:build (default) @ pulsar-docker-image ---
[INFO] Building tar: /Users/zixuan/repo/pulsar/docker/pulsar/target/docker/$YOUR_ORG /pulsar/tmp/docker-build.tar
[INFO] DOCKER> [$YOUR_ORG /pulsar:latest]: Created docker-build.tar in 2 seconds 
[INFO] DOCKER> Credentials helper reply for "docker-credential-desktop" is docker-credential-desktop (github.com/docker/docker-credential-helpers) v0.7.0
[INFO] DOCKER> Credentials helper reply for "docker-credential-desktop" is docker-credential-desktop (github.com/docker/docker-credential-helpers) v0.7.0
[INFO] Expanding: /Users/zixuan/repo/pulsar/docker/pulsar/target/docker/$YOUR_ORG /pulsar/tmp/docker-build.tar into /Users/zixuan/repo/pulsar/docker/pulsar/target/docker/$YOUR_ORG /pulsar/tmp/docker-build
[INFO] DOCKER> docker buildx build --progress=plain --builder maven --platform linux/arm64 --tag $YOUR_ORG/pulsar:latest --tag $YOUR_ORG/pulsar:latest --tag $YOUR_ORG/pulsar:3.3.0-SNAPSHOT-e7aecef --build-arg PULSAR_CLIENT_PYTHON_VERSION=3.4.0 --build-arg PULSAR_TARBALL=target/pulsar-server-distribution-3.3.0-SNAPSHOT-bin.tar.gz --file=/Users/zixuan/repo/pulsar/docker/pulsar/target/docker/$YOUR_ORG/pulsar/tmp/docker-build/Dockerfile /Users/zixuan/repo/pulsar/docker/pulsar/target/docker/$YOUR_ORG/pulsar/tmp/docker-build --load
[INFO] DOCKER> ERROR: no builder "maven" found
[ERROR] DOCKER> Error status (1) when building
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE

Modifications

  • Upgrade the docker-maven-plugin to 0.43.4 from 0.44.0

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

@nodece nodece self-assigned this Apr 28, 2024
@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Apr 28, 2024
@nodece nodece changed the title [fix][build] Upgrade docker-maven-plugin to 0.44.0 [fix][build] Upgrade docker-maven-plugin to 0.43.4 Apr 28, 2024
pom.xml Outdated
@@ -163,7 +163,7 @@ flexible messaging model and an intuitive client API.</description>
<reflections.version>0.10.2</reflections.version>
<swagger.version>1.6.2</swagger.version>
<puppycrawl.checkstyle.version>10.14.2</puppycrawl.checkstyle.version>
<docker-maven.version>0.43.3</docker-maven.version>
<docker-maven.version>0.43.4</docker-maven.version>
Copy link
Member

@lhotari lhotari Apr 29, 2024

Choose a reason for hiding this comment

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

0.44.0 is most recent. the change made in 0.43.4 is reverted and revisited in 0.44, see https://github.com/fabric8io/docker-maven-plugin/releases

Signed-off-by: Zixuan Liu <nodeces@gmail.com>
@nodece
Copy link
Member Author

nodece commented Apr 29, 2024

Error: Failed to execute goal io.fabric8:docker-maven-plugin:0.44.0:build (default) on project java-test-image: Execution default of goal io.fabric8:docker-maven-plugin:0.44.0:build failed: Expected a com.google.gson.JsonObject but was com.google.gson.JsonArray -> [Help 1]

@lhotari
Copy link
Member

lhotari commented Apr 29, 2024

Error: Failed to execute goal io.fabric8:docker-maven-plugin:0.44.0:build (default) on project java-test-image: Execution default of goal io.fabric8:docker-maven-plugin:0.44.0:build failed: Expected a com.google.gson.JsonObject but was com.google.gson.JsonArray -> [Help 1]

I wonder if this is caused by invalid configuration for docker-maven-plugin. there's an unnecessary <goal>tag</goal> for each usage of the plugin.

@nodece
Copy link
Member Author

nodece commented Apr 29, 2024

Regression bug:

fabric8io/docker-maven-plugin#1756
fabric8io/docker-maven-plugin#1778

Once the new version is released, I will work on this PR.

@nodece nodece marked this pull request as draft April 29, 2024 16:11
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.

None yet

2 participants