You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "mumrah (via GitHub)" <gi...@apache.org> on 2024/08/15 20:40:20 UTC
[PR] MINOR add GH action for PR builds [kafka]
mumrah opened a new pull request, #16895:
URL: https://github.com/apache/kafka/pull/16895
This PR adds a GitHub Action for running the junit tests on PRs.
--
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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MINOR add GH action for PR builds [kafka]
Posted by "mumrah (via GitHub)" <gi...@apache.org>.
mumrah commented on PR #16895:
URL: https://github.com/apache/kafka/pull/16895#issuecomment-2297351472
Thanks for taking a look @chia7712!
> Also, why the Github action does not run on kafka repo?
I believe the workflow has to exist on trunk first. Once it's there PRs should be able to alter it and see the changes take affect in the PR.
I'll check with Infra about the policy for committers vs non-committers triggering workflow runs. There are some org-level settings in GitHub related to 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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MINOR add GH action for PR builds [kafka]
Posted by "mumrah (via GitHub)" <gi...@apache.org>.
mumrah merged PR #16895:
URL: https://github.com/apache/kafka/pull/16895
--
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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MINOR add GH action for PR builds [kafka]
Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 commented on code in PR #16895:
URL: https://github.com/apache/kafka/pull/16895#discussion_r1722145753
##########
.github/workflows/pr.yml:
##########
@@ -0,0 +1,100 @@
+# 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: pr
+
+on:
+ push:
+ branches:
+ - 'gh-*'
+
+jobs:
+ validate:
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ java: [8, 21]
+ name: Compile and Check Java ${{ matrix.java }}
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v3
+ with:
+ persist-credentials: false
+ - name: Setup Java
+ uses: actions/setup-java@v4
+ with:
+ distribution: temurin
+ java-version: ${{ matrix.java }}
+ - name: Setup Gradle
+ uses: gradle/actions/setup-gradle@v3
+ env:
+ GRADLE_BUILD_ACTION_CACHE_DEBUG_ENABLED: true
+ with:
+ gradle-version: current
+ # Only write to the cache from trunk
+ #cache-read-only: ${{ github.ref != 'refs/heads/trunk' }}
+ cache-read-only: false
+ # Cache downloaded JDKs in addition to the default directories.
+ gradle-home-cache-includes: |
+ caches
+ notifications
+ jdks
+ gradle-home-cache-cleanup: true
+ cache-overwrite-existing: true
+ - name: Compile and validate
+ run: ./gradlew --build-cache --info --scan check -x test
+
+ test:
+ needs: validate
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ java: [ 8, 21 ]
+ name: JUnit tests Java ${{ matrix.java }}
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v3
+ with:
+ persist-credentials: false
+ - name: Setup Java
+ uses: actions/setup-java@v4
+ with:
+ distribution: temurin
+ java-version: ${{ matrix.java }}
+ - name: Setup Gradle
+ uses: gradle/actions/setup-gradle@v3
Review Comment:
ditto. maybe `v4`?
##########
.github/workflows/pr.yml:
##########
@@ -0,0 +1,100 @@
+# 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: pr
+
+on:
+ push:
+ branches:
+ - 'gh-*'
+
+jobs:
+ validate:
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ java: [8, 21]
+ name: Compile and Check Java ${{ matrix.java }}
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v3
+ with:
+ persist-credentials: false
+ - name: Setup Java
+ uses: actions/setup-java@v4
+ with:
+ distribution: temurin
+ java-version: ${{ matrix.java }}
+ - name: Setup Gradle
+ uses: gradle/actions/setup-gradle@v3
+ env:
+ GRADLE_BUILD_ACTION_CACHE_DEBUG_ENABLED: true
+ with:
+ gradle-version: current
+ # Only write to the cache from trunk
+ #cache-read-only: ${{ github.ref != 'refs/heads/trunk' }}
+ cache-read-only: false
+ # Cache downloaded JDKs in addition to the default directories.
+ gradle-home-cache-includes: |
+ caches
+ notifications
+ jdks
+ gradle-home-cache-cleanup: true
+ cache-overwrite-existing: true
+ - name: Compile and validate
+ run: ./gradlew --build-cache --info --scan check -x test
+
+ test:
+ needs: validate
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ java: [ 8, 21 ]
Review Comment:
in jenkins env, we run check on jdk 8 and 21, and run tests on jdk 11 and 17. Maybe we should keep consistency?
##########
.github/workflows/pr.yml:
##########
@@ -0,0 +1,100 @@
+# 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: pr
+
+on:
+ push:
+ branches:
+ - 'gh-*'
+
+jobs:
+ validate:
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ java: [8, 21]
+ name: Compile and Check Java ${{ matrix.java }}
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v3
+ with:
+ persist-credentials: false
+ - name: Setup Java
+ uses: actions/setup-java@v4
+ with:
+ distribution: temurin
+ java-version: ${{ matrix.java }}
+ - name: Setup Gradle
+ uses: gradle/actions/setup-gradle@v3
Review Comment:
ditto. maybe we can use `v4`?
##########
.github/workflows/pr.yml:
##########
@@ -0,0 +1,100 @@
+# 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: pr
+
+on:
+ push:
+ branches:
+ - 'gh-*'
+
+jobs:
+ validate:
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ java: [8, 21]
+ name: Compile and Check Java ${{ matrix.java }}
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v3
Review Comment:
Should we use `v4` instead? the action running for docker is using `v4`
--
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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MINOR add GH action for PR builds [kafka]
Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 commented on code in PR #16895:
URL: https://github.com/apache/kafka/pull/16895#discussion_r1722309605
##########
.github/workflows/pr.yml:
##########
@@ -0,0 +1,100 @@
+# 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: pr
+
+on:
+ pull_request:
+ types: [opened, synchronize, reopened]
+ branches: 'gh-*'
+
+jobs:
+ validate:
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ java: [8, 11, 17, 21]
+ name: Compile and Check Java ${{ matrix.java }}
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v4
+ with:
+ persist-credentials: false
+ - name: Setup Java
+ uses: actions/setup-java@v4
+ with:
+ distribution: temurin
+ java-version: ${{ matrix.java }}
+ - name: Setup Gradle
+ uses: gradle/actions/setup-gradle@v4
+ env:
+ GRADLE_BUILD_ACTION_CACHE_DEBUG_ENABLED: true
+ with:
+ gradle-version: current
Review Comment:
the patch #16908 used to update gradle from 8.8 to 8.10 (current) is not merged. Hence, it is a little tricky to decide the version here. If we keep using `current`, CI will have useless 8.10 and then download 8.8 later.
it is not a big issue to adopt `current` as we will use "current" version eventually.
##########
.github/workflows/pr.yml:
##########
@@ -0,0 +1,100 @@
+# 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: pr
+
+on:
+ pull_request:
+ types: [opened, synchronize, reopened]
+ branches: 'gh-*'
+
+jobs:
+ validate:
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ java: [8, 11, 17, 21]
Review Comment:
I'm ok to see more checks. or it is fine to keep jdk8 and jdk21 as jenkins 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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MINOR add GH action for PR builds [kafka]
Posted by "mumrah (via GitHub)" <gi...@apache.org>.
mumrah commented on code in PR #16895:
URL: https://github.com/apache/kafka/pull/16895#discussion_r1722325972
##########
.github/workflows/pr.yml:
##########
@@ -0,0 +1,100 @@
+# 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: pr
+
+on:
+ pull_request:
+ types: [opened, synchronize, reopened]
+ branches: 'gh-*'
+
+jobs:
+ validate:
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ java: [8, 11, 17, 21]
Review Comment:
Let's change this in a future PR so we can test altering the workflows in a PR :)
--
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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org