You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2022/02/24 10:42:23 UTC

[GitHub] [skywalking] lujiajing1126 opened a new pull request #8590: Publish e2e-service-* images to GitHub container registry

lujiajing1126 opened a new pull request #8590:
URL: https://github.com/apache/skywalking/pull/8590


   This PR introduces support for `e2e-service-*` images build and publish.
   
   - [x] If this pull request closes/resolves/fixes an existing issue, replace the issue number. Closes #8582
   - [ ] Update the [`CHANGES` log](https://github.com/apache/skywalking/blob/master/CHANGES.md).
   


-- 
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: notifications-unsubscribe@skywalking.apache.org

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



[GitHub] [skywalking] lujiajing1126 commented on a change in pull request #8590: Publish e2e-service-* images to GitHub container registry

Posted by GitBox <gi...@apache.org>.
lujiajing1126 commented on a change in pull request #8590:
URL: https://github.com/apache/skywalking/pull/8590#discussion_r813763242



##########
File path: docker/e2e-service-consumer/Dockerfile
##########
@@ -0,0 +1,5 @@
+FROM apache/skywalking-java-agent:8.9.0-java8

Review comment:
       Yes. I've noticed this part. But it exists in the `env` file which is read by the `infra-e2e` toolkit.
   
   Shall we introduce a build argument as a `TAG`?




-- 
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: notifications-unsubscribe@skywalking.apache.org

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



[GitHub] [skywalking] kezhenxu94 commented on a change in pull request #8590: Publish e2e-service-* images to GitHub container registry

Posted by GitBox <gi...@apache.org>.
kezhenxu94 commented on a change in pull request #8590:
URL: https://github.com/apache/skywalking/pull/8590#discussion_r814582870



##########
File path: .github/workflows/publish-docker-e2e-service.yaml
##########
@@ -0,0 +1,65 @@
+# 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.
+
+name: publish-docker-e2e-service
+
+on:
+  push:

Review comment:
       Add `branches` is a good practice if you plan to run this workflow in master branch, people, if you want to test this PR, add the branch name of this PR to the `branches` and remove it before ready




-- 
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: notifications-unsubscribe@skywalking.apache.org

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



[GitHub] [skywalking] lujiajing1126 commented on a change in pull request #8590: Publish e2e-service-* images to GitHub container registry

Posted by GitBox <gi...@apache.org>.
lujiajing1126 commented on a change in pull request #8590:
URL: https://github.com/apache/skywalking/pull/8590#discussion_r814563924



##########
File path: .github/workflows/publish-docker-e2e-service.yaml
##########
@@ -0,0 +1,65 @@
+# 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.
+
+name: publish-docker-e2e-service
+
+on:
+  push:

Review comment:
       > `on/push` seems could make image push if someone created a branch in the main repo, like you are doing.
   
   First, we have a `paths` keyword inside `push` as a filter.
   
   Then, we also have a `if` condition check in the last step to prevent `docker push` from running.




-- 
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: notifications-unsubscribe@skywalking.apache.org

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



[GitHub] [skywalking] wu-sheng commented on a change in pull request #8590: Publish e2e-service-* images to GitHub container registry

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on a change in pull request #8590:
URL: https://github.com/apache/skywalking/pull/8590#discussion_r814565490



##########
File path: .github/workflows/publish-docker-e2e-service.yaml
##########
@@ -0,0 +1,65 @@
+# 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.
+
+name: publish-docker-e2e-service
+
+on:
+  push:
+    paths:
+      - "test/e2e-v2/java-test-service/**"
+      - "test/Makefile"
+
+env:
+  SKIP_TEST: true
+  HUB: ghcr.io/apache/skywalking
+
+jobs:
+  build:
+    if: github.repository == 'apache/skywalking'

Review comment:
       I think it is better to move the branch `if statement` to here directly?




-- 
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: notifications-unsubscribe@skywalking.apache.org

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



[GitHub] [skywalking] kezhenxu94 commented on a change in pull request #8590: Publish e2e-service-* images to GitHub container registry

Posted by GitBox <gi...@apache.org>.
kezhenxu94 commented on a change in pull request #8590:
URL: https://github.com/apache/skywalking/pull/8590#discussion_r814589528



##########
File path: .github/workflows/publish-docker-e2e-service.yaml
##########
@@ -0,0 +1,61 @@
+# 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.
+
+name: publish-docker-e2e-service
+
+on:
+  push:

Review comment:
       ```suggestion
     push:
       branches:
         - master
   ```

##########
File path: .github/workflows/publish-docker-e2e-service.yaml
##########
@@ -0,0 +1,61 @@
+# 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.
+
+name: publish-docker-e2e-service
+
+on:
+  push:
+    paths:
+      - 'test/e2e-v2/java-test-service/**'
+      - 'test/Makefile'
+
+env:
+  SKIP_TEST: true
+  HUB: ghcr.io/apache/skywalking
+
+jobs:
+  build:
+    if: github.repository == 'apache/skywalking' && github.ref == 'refs/heads/master'

Review comment:
       Why not use this style ?
   <img width="776" alt="image" src="https://user-images.githubusercontent.com/15965696/155686448-8faaf075-5626-4f4e-a72d-b85c1436764a.png">
   




-- 
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: notifications-unsubscribe@skywalking.apache.org

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



[GitHub] [skywalking] lujiajing1126 edited a comment on pull request #8590: Publish e2e-service-* images to GitHub container registry

Posted by GitBox <gi...@apache.org>.
lujiajing1126 edited a comment on pull request #8590:
URL: https://github.com/apache/skywalking/pull/8590#issuecomment-1050681710


   > Could you create a fork repo to test this CI task running? Then feedback with the uploaded images(fork repo's) and CI logs.
   
   CI passed with the following report,
   
   https://github.com/lujiajing1126/skywalking/runs/5331395496?check_suite_focus=true
   
   And images have been uploaded to the fork repo.


-- 
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: notifications-unsubscribe@skywalking.apache.org

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



[GitHub] [skywalking] lujiajing1126 edited a comment on pull request #8590: Publish e2e-service-* images to GitHub container registry

Posted by GitBox <gi...@apache.org>.
lujiajing1126 edited a comment on pull request #8590:
URL: https://github.com/apache/skywalking/pull/8590#issuecomment-1049733024


   > @wankai123 Where do we build the test service images? I think we built them for testing with some scripts.
   
   I understand we do not build test-service images now but only mount the jar files into the java agent image.


-- 
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: notifications-unsubscribe@skywalking.apache.org

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



[GitHub] [skywalking] wu-sheng commented on pull request #8590: Publish e2e-service-* images to GitHub container registry

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on pull request #8590:
URL: https://github.com/apache/skywalking/pull/8590#issuecomment-1049953079


   @lujiajing1126 Take a look at the release doc, https://skywalking.apache.org/docs/main/latest/en/guides/how-to-release/#publish-the-docker-images. At the latest step, we need to push the image to dockerhub, which is sharing the makefile you changed. I think you will make that step fails as no e2e-service repo there, and also the e2e-service images should not be uploaded. I would recommend you to build a new makefile task to do this separatedly.
   
   @kezhenxu94 Need your suggestions here. 


-- 
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: notifications-unsubscribe@skywalking.apache.org

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



[GitHub] [skywalking] wu-sheng commented on a change in pull request #8590: Publish e2e-service-* images to GitHub container registry

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on a change in pull request #8590:
URL: https://github.com/apache/skywalking/pull/8590#discussion_r814560655



##########
File path: .github/workflows/publish-docker-e2e-service.yaml
##########
@@ -0,0 +1,65 @@
+# 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.
+
+name: publish-docker-e2e-service
+
+on:
+  push:

Review comment:
       `on/push` seems could make image push if someone created a branch in the main repo, like you are doing.




-- 
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: notifications-unsubscribe@skywalking.apache.org

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



[GitHub] [skywalking] wu-sheng commented on pull request #8590: Publish e2e-service-* images to GitHub container registry

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on pull request #8590:
URL: https://github.com/apache/skywalking/pull/8590#issuecomment-1050893585


   You could try the image from here, @lujiajing1126 
   
   - https://github.com/apache/skywalking/pkgs/container/skywalking%2Fe2e-service-consumer
   - https://github.com/apache/skywalking/pkgs/container/skywalking%2Fe2e-service-provider


-- 
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: notifications-unsubscribe@skywalking.apache.org

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



[GitHub] [skywalking] lujiajing1126 edited a comment on pull request #8590: Publish e2e-service-* images to GitHub container registry

Posted by GitBox <gi...@apache.org>.
lujiajing1126 edited a comment on pull request #8590:
URL: https://github.com/apache/skywalking/pull/8590#issuecomment-1049771998


   > What makes all in one necessary? AFAIK, last discussion is about banyandb subproject doesn't want to host Java codes. This PR moves aggressively. 
   
   Sure we can provide pure jre-based images without java agent. But in `banyandb` repo, we have to download a release version of java agent and then mount it as a volume.
   
   > If someone wants to use this pure service, they will face issue again, and we have to deal with similar issues repeatedly. Pure services are common in service mesh.
   
   Well. I don't think it would be a problem if we don't pursue a "minimal" image size. We can always use environment variable (e.g. `JAVA_TOOL_OPTIONS`) to control whether or not we enable the java agent. It is still flexible.


-- 
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: notifications-unsubscribe@skywalking.apache.org

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



[GitHub] [skywalking] kezhenxu94 commented on pull request #8590: Publish e2e-service-* images to GitHub container registry

Posted by GitBox <gi...@apache.org>.
kezhenxu94 commented on pull request #8590:
URL: https://github.com/apache/skywalking/pull/8590#issuecomment-1050454380


   > @lujiajing1126 Take a look at the release doc, https://skywalking.apache.org/docs/main/latest/en/guides/how-to-release/#publish-the-docker-images. At the latest step, we need to push the image to dockerhub, which is sharing the makefile you changed. I think you will make that step fails as no e2e-service repo there, and also the e2e-service images should not be uploaded. I would recommend you to build a new makefile task to do this separatedly.
   > 
   > @kezhenxu94 Need your suggestions here.
   
   Yes agree, it's better to separate the build scripts for test images and product images. Let's create another Makefile in `test/` and use `make -C test push` to push to images.  (I'd not do that although we can include that `test/Makefile` in our main Makefile).
   
   Also, as the test services are rarely changed, we may not want to trigger the push action in every commit and push so many identical images with different tags, we should consider adding a check in that workflow by using `.github/actions/skip/action.yml` to skip unnecessary builds/pushes.


-- 
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: notifications-unsubscribe@skywalking.apache.org

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



[GitHub] [skywalking] lujiajing1126 commented on a change in pull request #8590: Publish e2e-service-* images to GitHub container registry

Posted by GitBox <gi...@apache.org>.
lujiajing1126 commented on a change in pull request #8590:
URL: https://github.com/apache/skywalking/pull/8590#discussion_r814576397



##########
File path: .github/workflows/publish-docker-e2e-service.yaml
##########
@@ -0,0 +1,65 @@
+# 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.
+
+name: publish-docker-e2e-service
+
+on:
+  push:
+    paths:
+      - "test/e2e-v2/java-test-service/**"
+      - "test/Makefile"
+
+env:
+  SKIP_TEST: true
+  HUB: ghcr.io/apache/skywalking
+
+jobs:
+  build:
+    if: github.repository == 'apache/skywalking'

Review comment:
       Moved. Then we can only verify this PR on the master branch?




-- 
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: notifications-unsubscribe@skywalking.apache.org

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



[GitHub] [skywalking] wu-sheng commented on pull request #8590: Publish e2e-service-* images to GitHub container registry

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on pull request #8590:
URL: https://github.com/apache/skywalking/pull/8590#issuecomment-1049754656


   What makes all in one necessary? AFAIK, last discussion is about banyandb subproject doesn't want to host Java codes. This PR moves aggressively.
   
   If someone wants to use this pure service, they will face issue again, and we have to deal with similar issues repeatedly. Pure services are common in service mesh.


-- 
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: notifications-unsubscribe@skywalking.apache.org

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



[GitHub] [skywalking] lujiajing1126 commented on pull request #8590: Publish e2e-service-* images to GitHub container registry

Posted by GitBox <gi...@apache.org>.
lujiajing1126 commented on pull request #8590:
URL: https://github.com/apache/skywalking/pull/8590#issuecomment-1049771998


   > What makes all in one necessary? AFAIK, last discussion is about banyandb subproject doesn't want to host Java codes. This PR moves aggressively. 
   
   Sure we can provide pure jre-based images without java agent. But in `banyandb` repo, we have to download a release version of java agent and then mount it as a volume.
   
   > If someone wants to use this pure service, they will face issue again, and we have to deal with similar issues repeatedly. Pure services are common in service mesh.
   
   Well. I don't think it would be a problem if we don't pursue a "minimal" image size. We can always use environment variable (e.g. `JAVA_TOOL_OPTIONS` to control whether or not we enable the java agent.


-- 
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: notifications-unsubscribe@skywalking.apache.org

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



[GitHub] [skywalking] wu-sheng commented on pull request #8590: Publish e2e-service-* images to GitHub container registry

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on pull request #8590:
URL: https://github.com/apache/skywalking/pull/8590#issuecomment-1049774862


   You are asking others could adopt but meanwhile, you could adopt too.
   Let's not make things so complex.
   Mounting in banyandb e2e seems not an issue. You should know, agent based e2e is only one case only. Banyandb should be verified in the mesh cases too.


-- 
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: notifications-unsubscribe@skywalking.apache.org

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



[GitHub] [skywalking] lujiajing1126 commented on pull request #8590: Publish e2e-service-* images to GitHub container registry

Posted by GitBox <gi...@apache.org>.
lujiajing1126 commented on pull request #8590:
URL: https://github.com/apache/skywalking/pull/8590#issuecomment-1049948141


   > You are asking others could adopt but meanwhile, you could adopt too. Let's not make things so complex. Mounting in banyandb e2e seems not an issue. You should know, agent based e2e is only one case only. Banyandb should be verified in the mesh cases too.
   
   Switch to jre base image now.
   
   Shall we use JDK8 and JDK17 as we did for OAP?


-- 
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: notifications-unsubscribe@skywalking.apache.org

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



[GitHub] [skywalking] lujiajing1126 commented on pull request #8590: Publish e2e-service-* images to GitHub container registry

Posted by GitBox <gi...@apache.org>.
lujiajing1126 commented on pull request #8590:
URL: https://github.com/apache/skywalking/pull/8590#issuecomment-1049733024


   > @wankai123 Where do we build the test service images? I think we built them for testing with some scripts.
   
   I understand we do not build test-service images but only mount the jar files into the java agent image.


-- 
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: notifications-unsubscribe@skywalking.apache.org

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



[GitHub] [skywalking] wu-sheng commented on pull request #8590: Publish e2e-service-* images to GitHub container registry

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on pull request #8590:
URL: https://github.com/apache/skywalking/pull/8590#issuecomment-1050456473


   > Also, as the test services are rarely changed, we may not want to trigger the push action in every commit and push so many identical images with different tags
   
   +1, only `test/e2e-v2/java-test-service/e2e-service-provider` and `test/e2e-v2/java-test-service/e2e-service-consumer` changes seem reasonable to push the images.


-- 
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: notifications-unsubscribe@skywalking.apache.org

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



[GitHub] [skywalking] kezhenxu94 commented on a change in pull request #8590: Publish e2e-service-* images to GitHub container registry

Posted by GitBox <gi...@apache.org>.
kezhenxu94 commented on a change in pull request #8590:
URL: https://github.com/apache/skywalking/pull/8590#discussion_r814601294



##########
File path: .github/workflows/publish-docker-e2e-service.yaml
##########
@@ -0,0 +1,63 @@
+# 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.
+
+name: Publish E2E service images
+
+on:
+  push:
+    branches:
+      - master
+    paths:
+      - 'test/e2e-v2/java-test-service/**'
+      - 'test/Makefile'
+
+env:
+  SKIP_TEST: true
+  HUB: ghcr.io/apache/skywalking
+
+jobs:
+  build:
+    if: github.repository == 'apache/skywalking'
+    runs-on: ubuntu-latest
+    permissions:
+      contents: read
+      packages: write
+    timeout-minutes: 90
+    env:
+      TAG: ${{ github.sha }}
+    steps:
+      - uses: actions/checkout@v2
+        with:
+          submodules: true
+      - name: Cache local Maven repository
+        uses: actions/cache@v2
+        with:
+          path: ~/.m2/repository
+          key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
+          restore-keys: |
+            ${{ runner.os }}-maven-
+      - name: Log in to the Container registry
+        uses: docker/login-action@v1.10.0
+        with:
+          registry: ${{ env.HUB }}
+          username: ${{ github.actor }}
+          password: ${{ secrets.GITHUB_TOKEN }}
+      - name: Set up QEMU
+        uses: docker/setup-qemu-action@v1
+      - name: Set up Docker Buildx
+        uses: docker/setup-buildx-action@v1
+      - name: Build and push images
+        run: make -C test build.e2e-service docker.push-e2e-service

Review comment:
       `make -C test docker.push-e2e-service` is not executable from my side




-- 
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: notifications-unsubscribe@skywalking.apache.org

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



[GitHub] [skywalking] wu-sheng commented on a change in pull request #8590: Publish e2e-service-* images to GitHub container registry

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on a change in pull request #8590:
URL: https://github.com/apache/skywalking/pull/8590#discussion_r814579899



##########
File path: .github/workflows/publish-docker-e2e-service.yaml
##########
@@ -0,0 +1,65 @@
+# 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.
+
+name: publish-docker-e2e-service
+
+on:
+  push:
+    paths:
+      - "test/e2e-v2/java-test-service/**"
+      - "test/Makefile"
+
+env:
+  SKIP_TEST: true
+  HUB: ghcr.io/apache/skywalking
+
+jobs:
+  build:
+    if: github.repository == 'apache/skywalking'

Review comment:
       Yes, you could remove these two if and verify on your fork. That is why usually we don't encourage committers to use the main repo's branch, instead, fork repo is always better.




-- 
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: notifications-unsubscribe@skywalking.apache.org

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



[GitHub] [skywalking] kezhenxu94 commented on a change in pull request #8590: Publish e2e-service-* images to GitHub container registry

Posted by GitBox <gi...@apache.org>.
kezhenxu94 commented on a change in pull request #8590:
URL: https://github.com/apache/skywalking/pull/8590#discussion_r814582870



##########
File path: .github/workflows/publish-docker-e2e-service.yaml
##########
@@ -0,0 +1,65 @@
+# 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.
+
+name: publish-docker-e2e-service
+
+on:
+  push:

Review comment:
       Add `branches` is a good practice if you plan to run this workflow in master branch, people, if you want to test this PR, add the branch name of this PR to the `branches` and remove it when ready




-- 
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: notifications-unsubscribe@skywalking.apache.org

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



[GitHub] [skywalking] kezhenxu94 commented on a change in pull request #8590: Publish e2e-service-* images to GitHub container registry

Posted by GitBox <gi...@apache.org>.
kezhenxu94 commented on a change in pull request #8590:
URL: https://github.com/apache/skywalking/pull/8590#discussion_r814582870



##########
File path: .github/workflows/publish-docker-e2e-service.yaml
##########
@@ -0,0 +1,65 @@
+# 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.
+
+name: publish-docker-e2e-service
+
+on:
+  push:

Review comment:
       Add `branches` is a good practice if you plan to run this workflow in master branch, if you want to test this PR, add the branch name of this PR to the `branches` and remove it when ready




-- 
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: notifications-unsubscribe@skywalking.apache.org

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



[GitHub] [skywalking] lujiajing1126 commented on a change in pull request #8590: Publish e2e-service-* images to GitHub container registry

Posted by GitBox <gi...@apache.org>.
lujiajing1126 commented on a change in pull request #8590:
URL: https://github.com/apache/skywalking/pull/8590#discussion_r814593970



##########
File path: .github/workflows/publish-docker-e2e-service.yaml
##########
@@ -0,0 +1,61 @@
+# 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.
+
+name: publish-docker-e2e-service
+
+on:
+  push:

Review comment:
       Fixed




-- 
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: notifications-unsubscribe@skywalking.apache.org

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



[GitHub] [skywalking] lujiajing1126 commented on pull request #8590: Publish e2e-service-* images to GitHub container registry

Posted by GitBox <gi...@apache.org>.
lujiajing1126 commented on pull request #8590:
URL: https://github.com/apache/skywalking/pull/8590#issuecomment-1050499725


   Thanks to both of you for the information. I will move the `Makefile` to the `test` dir and build a separate workflow to handle this.


-- 
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: notifications-unsubscribe@skywalking.apache.org

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



[GitHub] [skywalking] github-actions[bot] commented on a change in pull request #8590: Publish e2e-service-* images to GitHub container registry

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on a change in pull request #8590:
URL: https://github.com/apache/skywalking/pull/8590#discussion_r813762181



##########
File path: docker/e2e-service-provider/Dockerfile
##########
@@ -0,0 +1,5 @@
+FROM apache/skywalking-java-agent:8.9.0-java8

Review comment:
       ```suggestion
   #
   # 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.
   #
   FROM apache/skywalking-java-agent:8.9.0-java8
   ```
   <!-- license-eye hidden identification -->

##########
File path: docker/e2e-service-consumer/Dockerfile
##########
@@ -0,0 +1,5 @@
+FROM apache/skywalking-java-agent:8.9.0-java8

Review comment:
       ```suggestion
   #
   # 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.
   #
   FROM apache/skywalking-java-agent:8.9.0-java8
   ```
   <!-- license-eye hidden identification -->




-- 
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: notifications-unsubscribe@skywalking.apache.org

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



[GitHub] [skywalking] wu-sheng commented on a change in pull request #8590: Publish e2e-service-* images to GitHub container registry

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on a change in pull request #8590:
URL: https://github.com/apache/skywalking/pull/8590#discussion_r813759262



##########
File path: docker/e2e-service-consumer/Dockerfile
##########
@@ -0,0 +1,5 @@
+FROM apache/skywalking-java-agent:8.9.0-java8

Review comment:
       I have concerned about this. e2e of main repo has assigned the commit id of agent.
   
   Could you check it? I think we have this mechanism already.




-- 
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: notifications-unsubscribe@skywalking.apache.org

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



[GitHub] [skywalking] lujiajing1126 commented on pull request #8590: Publish e2e-service-* images to GitHub container registry

Posted by GitBox <gi...@apache.org>.
lujiajing1126 commented on pull request #8590:
URL: https://github.com/apache/skywalking/pull/8590#issuecomment-1049746516


   > Then if you like agent installed test services, this build should be in Java agent repository.
   
   I agree. Then we can use the built image with `SW_AGENT_JAVA_COMMIT` in the main repo instead of using a mount strategy. I suppose `e2e-service`s rarely change, right?
   
   > Would that be better? Mounting agent into service when needed(in the e2e) only.
   
   If you meant using in `banyandb` repo, I prefer an all-in-one image 😃 


-- 
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: notifications-unsubscribe@skywalking.apache.org

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



[GitHub] [skywalking] lujiajing1126 commented on pull request #8590: Publish e2e-service-* images to GitHub container registry

Posted by GitBox <gi...@apache.org>.
lujiajing1126 commented on pull request #8590:
URL: https://github.com/apache/skywalking/pull/8590#issuecomment-1050681710


   > Could you create a fork repo to test this CI task running? Then feedback with the uploaded images(fork repo's) and CI logs.
   
   CI passed with the following report,
   
   https://github.com/lujiajing1126/skywalking/runs/5331395496?check_suite_focus=true
   
   And images are uploaded to the fork repo.


-- 
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: notifications-unsubscribe@skywalking.apache.org

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



[GitHub] [skywalking] wu-sheng commented on pull request #8590: Publish e2e-service-* images to GitHub container registry

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on pull request #8590:
URL: https://github.com/apache/skywalking/pull/8590#issuecomment-1049730213


   @wankai123 Where do we build the test service images? I think we built them for testing with some scripts.


-- 
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: notifications-unsubscribe@skywalking.apache.org

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



[GitHub] [skywalking] wu-sheng merged pull request #8590: Publish e2e-service-* images to GitHub container registry

Posted by GitBox <gi...@apache.org>.
wu-sheng merged pull request #8590:
URL: https://github.com/apache/skywalking/pull/8590


   


-- 
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: notifications-unsubscribe@skywalking.apache.org

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



[GitHub] [skywalking] wu-sheng commented on pull request #8590: Publish e2e-service-* images to GitHub container registry

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on pull request #8590:
URL: https://github.com/apache/skywalking/pull/8590#issuecomment-1049736329


   Then if you like agent installed test services, this build should be in Java agent repository.
   I thought you just build the mock service images without agent.
   
   Would that be better? Mounting agent into service when needed(in the e2e) only.
   


-- 
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: notifications-unsubscribe@skywalking.apache.org

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



[GitHub] [skywalking] lujiajing1126 commented on a change in pull request #8590: Publish e2e-service-* images to GitHub container registry

Posted by GitBox <gi...@apache.org>.
lujiajing1126 commented on a change in pull request #8590:
URL: https://github.com/apache/skywalking/pull/8590#discussion_r814603069



##########
File path: .github/workflows/publish-docker-e2e-service.yaml
##########
@@ -0,0 +1,63 @@
+# 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.
+
+name: Publish E2E service images
+
+on:
+  push:
+    branches:
+      - master
+    paths:
+      - 'test/e2e-v2/java-test-service/**'
+      - 'test/Makefile'
+
+env:
+  SKIP_TEST: true
+  HUB: ghcr.io/apache/skywalking
+
+jobs:
+  build:
+    if: github.repository == 'apache/skywalking'
+    runs-on: ubuntu-latest
+    permissions:
+      contents: read
+      packages: write
+    timeout-minutes: 90
+    env:
+      TAG: ${{ github.sha }}
+    steps:
+      - uses: actions/checkout@v2
+        with:
+          submodules: true
+      - name: Cache local Maven repository
+        uses: actions/cache@v2
+        with:
+          path: ~/.m2/repository
+          key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
+          restore-keys: |
+            ${{ runner.os }}-maven-
+      - name: Log in to the Container registry
+        uses: docker/login-action@v1.10.0
+        with:
+          registry: ${{ env.HUB }}
+          username: ${{ github.actor }}
+          password: ${{ secrets.GITHUB_TOKEN }}
+      - name: Set up QEMU
+        uses: docker/setup-qemu-action@v1
+      - name: Set up Docker Buildx
+        uses: docker/setup-buildx-action@v1
+      - name: Build and push images
+        run: make -C test build.e2e-service docker.push-e2e-service

Review comment:
       Yes. CI in fork version reported this problem. Trying again




-- 
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: notifications-unsubscribe@skywalking.apache.org

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



[GitHub] [skywalking] lujiajing1126 edited a comment on pull request #8590: Publish e2e-service-* images to GitHub container registry

Posted by GitBox <gi...@apache.org>.
lujiajing1126 edited a comment on pull request #8590:
URL: https://github.com/apache/skywalking/pull/8590#issuecomment-1049771998


   > What makes all in one necessary? AFAIK, last discussion is about banyandb subproject doesn't want to host Java codes. This PR moves aggressively. 
   
   Sure we can provide pure jre-based images without java agent. But in `banyandb` repo, we have to download a release version of java agent and then mount it as a volume.
   
   > If someone wants to use this pure service, they will face issue again, and we have to deal with similar issues repeatedly. Pure services are common in service mesh.
   
   Well. I don't think it would be a problem if we don't pursue a "minimal" image size. We can always use environment variable (e.g. `JAVA_TOOL_OPTIONS`) to control whether or not we enable the java agent.


-- 
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: notifications-unsubscribe@skywalking.apache.org

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



[GitHub] [skywalking] wu-sheng commented on pull request #8590: Publish e2e-service-* images to GitHub container registry

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on pull request #8590:
URL: https://github.com/apache/skywalking/pull/8590#issuecomment-1050672341


   Could you create a fork repo to test this CI task running? Then feedback with the uploaded images(fork repo's) and CI logs.


-- 
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: notifications-unsubscribe@skywalking.apache.org

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