You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by GitBox <gi...@apache.org> on 2022/03/29 14:52:53 UTC

[GitHub] [flink-kubernetes-operator] mbalassi opened a new pull request #130: [FLINK-26214] Support cross platform image builds

mbalassi opened a new pull request #130:
URL: https://github.com/apache/flink-kubernetes-operator/pull/130


   This enables us to publish docker build for both `amd64` and `arm64`. You can verify this via:
   
   ```shell
   % docker manifest inspect ghcr.io/mbalassi/flink-operator:149986a
   {
      "schemaVersion": 2,
      "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
      "manifests": [
         {
            "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
            "size": 3055,
            "digest": "sha256:017787b0c5ccf724f676ed73f26c2928a2d9d58c4464e4ba7fb00ca3f2470158",
            "platform": {
               "architecture": "amd64",
               "os": "linux"
            }
         },
         {
            "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
            "size": 3055,
            "digest": "sha256:c37a552f048c0431672dc190e735f4a618bd0c42030de4fea9cdc02dbab88fee",
            "platform": {
               "architecture": "arm64",
               "os": "linux"
            }
         }
      ]
   }
   ```
   
   While working on this I noticed instability of the maven tests in the docker builds due to growing latency, so I decided to cut down on the number of times we run the tests for a single commit/PR. The docker build does not run the tests after this change by default, but the CI does.


-- 
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@flink.apache.org

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



[GitHub] [flink-kubernetes-operator] Aitozi commented on a change in pull request #130: [FLINK-26214] Support cross platform image builds

Posted by GitBox <gi...@apache.org>.
Aitozi commented on a change in pull request #130:
URL: https://github.com/apache/flink-kubernetes-operator/pull/130#discussion_r837592608



##########
File path: Dockerfile
##########
@@ -35,7 +36,7 @@ COPY $WEBHOOK_DIR/src ./$WEBHOOK_DIR/src
 
 COPY tools ./tools
 
-RUN --mount=type=cache,target=/root/.m2 mvn -ntp clean install
+RUN --mount=type=cache,target=/root/.m2 mvn -ntp clean install -DskipTests=$SKIP_TESTS

Review comment:
       I have also think about this, can we just mvn build when building docker image, Because the CI already run the test. (Make the `Build with Maven` not skipTests as now)




-- 
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@flink.apache.org

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



[GitHub] [flink-kubernetes-operator] mbalassi commented on pull request #130: [FLINK-26214] Support cross platform image builds

Posted by GitBox <gi...@apache.org>.
mbalassi commented on pull request #130:
URL: https://github.com/apache/flink-kubernetes-operator/pull/130#issuecomment-1082955647


   @tisonkun On the `main` branch we do tag them with `main`, but we also publish the the images on the release branches (currently `release-0.1`), those are the ones you see appearing without the `main` tag. We should tag these with the branch name too, my here with the `semver` tag seems bugged.
   
   <img width="753" alt="Screenshot 2022-03-30 at 12 44 33" src="https://user-images.githubusercontent.com/5990983/160814387-889e8369-84c3-4f47-861e-c4a8e24407a3.png">
   
   These 2 images are my latest push on the 2 actively built branches.
   


-- 
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@flink.apache.org

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



[GitHub] [flink-kubernetes-operator] mbalassi commented on a change in pull request #130: [FLINK-26214] Support cross platform image builds

Posted by GitBox <gi...@apache.org>.
mbalassi commented on a change in pull request #130:
URL: https://github.com/apache/flink-kubernetes-operator/pull/130#discussion_r837628303



##########
File path: Dockerfile
##########
@@ -35,7 +36,7 @@ COPY $WEBHOOK_DIR/src ./$WEBHOOK_DIR/src
 
 COPY tools ./tools
 
-RUN --mount=type=cache,target=/root/.m2 mvn -ntp clean install
+RUN --mount=type=cache,target=/root/.m2 mvn -ntp clean install -DskipTests=$SKIP_TESTS

Review comment:
       We still run the tests once outside of the docker build and once inside the docker build, both during the `test_ci` job. I feel this is sufficient, I would not run it more than these.




-- 
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@flink.apache.org

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



[GitHub] [flink-kubernetes-operator] Aitozi commented on a change in pull request #130: [FLINK-26214] Support cross platform image builds

Posted by GitBox <gi...@apache.org>.
Aitozi commented on a change in pull request #130:
URL: https://github.com/apache/flink-kubernetes-operator/pull/130#discussion_r838055926



##########
File path: Dockerfile
##########
@@ -35,7 +36,7 @@ COPY $WEBHOOK_DIR/src ./$WEBHOOK_DIR/src
 
 COPY tools ./tools
 
-RUN --mount=type=cache,target=/root/.m2 mvn -ntp clean install
+RUN --mount=type=cache,target=/root/.m2 mvn -ntp clean install -DskipTests=$SKIP_TESTS

Review comment:
       Get it.




-- 
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@flink.apache.org

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



[GitHub] [flink-kubernetes-operator] tisonkun commented on pull request #130: [FLINK-26214] Support cross platform image builds

Posted by GitBox <gi...@apache.org>.
tisonkun commented on pull request #130:
URL: https://github.com/apache/flink-kubernetes-operator/pull/130#issuecomment-1082898990


   @mbalassi it seems that we're now publishing images with sha tags only and no more `main`?


-- 
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@flink.apache.org

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



[GitHub] [flink-kubernetes-operator] mbalassi merged pull request #130: [FLINK-26214] Support cross platform image builds

Posted by GitBox <gi...@apache.org>.
mbalassi merged pull request #130:
URL: https://github.com/apache/flink-kubernetes-operator/pull/130


   


-- 
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@flink.apache.org

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