You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2022/04/07 10:16:45 UTC
[GitHub] [cloudstack] rohityadavcloud opened a new pull request, #6228: Support JaCoCo and other quality checks
rohityadavcloud opened a new pull request, #6228:
URL: https://github.com/apache/cloudstack/pull/6228
This enables JaCoCo and other quality/history checks for the ASF Jenkins job. Also adds a workflow to generate coverage report for the 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: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] rohityadavcloud merged pull request #6228: Support JaCoCo and other quality checks
Posted by GitBox <gi...@apache.org>.
rohityadavcloud merged PR #6228:
URL: https://github.com/apache/cloudstack/pull/6228
--
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@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] rohityadavcloud commented on pull request #6228: Support JaCoCo and other quality checks
Posted by GitBox <gi...@apache.org>.
rohityadavcloud commented on PR #6228:
URL: https://github.com/apache/cloudstack/pull/6228#issuecomment-1091669482
@DaanHoogland I need some input on how the Jenkins pr-analysis job is tied to PRs. It doesn't show up now :( in the list of PR checks - https://ci-builds.apache.org/job/Cloudstack/job/cloudstack-pr-analysis/
Some more progress, now the quality checks are running and I'm able to generate clover and jacoco coverage reports. For example:
<img width="1854" alt="Screenshot 2022-04-07 at 5 51 15 PM" src="https://user-images.githubusercontent.com/95203/162197457-1d444575-857f-4bfa-be4c-9ef33cf63b3e.png">
All that is required is now to enable the `-P quality` profile in the build command, for example:
```
mvn -P developer,systemvm,quality -Dsimulator -Dnoredist clean install
```
To generate the clover html report, we do for example:
```
mvn -P quality clean install clover:aggregate clover:clover
```
--
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@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] DaanHoogland commented on a diff in pull request #6228: Support JaCoCo and other quality checks
Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on code in PR #6228:
URL: https://github.com/apache/cloudstack/pull/6228#discussion_r844975016
##########
.github/workflows/pull-request-checks.yml:
##########
@@ -15,17 +15,45 @@
# specific language governing permissions and limitations
# under the License.
-name: Lint Code Base
+name: Check Pull Request
on: [pull_request]
jobs:
build:
- name: GitHub Super Linter
+ name: Pull Request Checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- - uses: github/super-linter@v4
+ - name: SuperLinter Lint Checks
+ uses: github/super-linter@v4
env:
VALIDATE_PYTHON_FLAKE8: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
+ - name: Set up JDK11
+ uses: actions/setup-java@v2
+ with:
+ distribution: 'temurin'
+ java-version: '11'
+ cache: 'maven'
+
+ - name: Install nonoss jar dependencies
+ run: |
+ git clone https://github.com/shapeblue/cloudstack-nonoss.git deps
+ cd deps && bash -x install-non-oss.sh && cd ..
+
+ - name: Run Tests with JaCoCo
+ run: mvn -P developer,systemvm,quality -Dsimulator -Dnoredist clean test
+
+ #- name: Generate JaCoCo Report
+ # id: jacoco
+ # uses: Madrapps/jacoco-report@v1.2
+ # with:
+ # paths: ${{ github.workspace }}/**/jacoco.xml
+ # token: ${{ secrets.GITHUB_TOKEN }}
+ # min-coverage-overall: 0
+ # min-coverage-changed-files: 80
+ # title: PR Code Coverage
+ # debug-mode: true
Review Comment:
we want to keep 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: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] rohityadavcloud commented on pull request #6228: Support JaCoCo and other quality checks
Posted by GitBox <gi...@apache.org>.
rohityadavcloud commented on PR #6228:
URL: https://github.com/apache/cloudstack/pull/6228#issuecomment-1091859722
@blueorangutan package
--
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@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] DaanHoogland commented on pull request #6228: Support JaCoCo and other quality checks
Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on PR #6228:
URL: https://github.com/apache/cloudstack/pull/6228#issuecomment-1091675920
> @DaanHoogland I need some input on how the Jenkins pr-analysis job is tied to PRs. It doesn't show up now :( in the list of PR checks - [ci-builds.apache.org/job/Cloudstack/job/cloudstack-pr-analysis](https://ci-builds.apache.org/job/Cloudstack/job/cloudstack-pr-analysis/)
>
it is there in the job configuration in jenkins, but it seems to be flakey in terms of addressing each job, @rohityadavcloud . I've never found out what made it choose to include some PRs and not others.
--
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@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] rohityadavcloud commented on pull request #6228: Support JaCoCo and other quality checks
Posted by GitBox <gi...@apache.org>.
rohityadavcloud commented on PR #6228:
URL: https://github.com/apache/cloudstack/pull/6228#issuecomment-1091807254
Sadly the quality/coverage doesn't allow threaded build with -T flag, and it takes 40+mins alone to build it :( which makes using github actions not scalable for PRs:
<img width="742" alt="Screenshot 2022-04-07 at 7 52 12 PM" src="https://user-images.githubusercontent.com/95203/162221742-c32eb7fb-17d8-4793-a473-757ad55a3e47.png">
Furthermore, it's going to be a challenge to get PR-specific coverage accurately (for ex. changes in a class which is covered by the PR's unit tests, may not fully reflect the coverage for the overall class). I'll explore other options.
--
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@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] blueorangutan commented on pull request #6228: Support JaCoCo and other quality checks
Posted by GitBox <gi...@apache.org>.
blueorangutan commented on PR #6228:
URL: https://github.com/apache/cloudstack/pull/6228#issuecomment-1091861080
@rohityadavcloud a Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.
--
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@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] blueorangutan commented on pull request #6228: Support JaCoCo and other quality checks
Posted by GitBox <gi...@apache.org>.
blueorangutan commented on PR #6228:
URL: https://github.com/apache/cloudstack/pull/6228#issuecomment-1091900008
Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 3096
--
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@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] rohityadavcloud commented on a diff in pull request #6228: Support JaCoCo and other quality checks
Posted by GitBox <gi...@apache.org>.
rohityadavcloud commented on code in PR #6228:
URL: https://github.com/apache/cloudstack/pull/6228#discussion_r844977182
##########
.github/workflows/pull-request-checks.yml:
##########
@@ -15,17 +15,45 @@
# specific language governing permissions and limitations
# under the License.
-name: Lint Code Base
+name: Check Pull Request
on: [pull_request]
jobs:
build:
- name: GitHub Super Linter
+ name: Pull Request Checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- - uses: github/super-linter@v4
+ - name: SuperLinter Lint Checks
+ uses: github/super-linter@v4
env:
VALIDATE_PYTHON_FLAKE8: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
+ - name: Set up JDK11
+ uses: actions/setup-java@v2
+ with:
+ distribution: 'temurin'
+ java-version: '11'
+ cache: 'maven'
+
+ - name: Install nonoss jar dependencies
+ run: |
+ git clone https://github.com/shapeblue/cloudstack-nonoss.git deps
+ cd deps && bash -x install-non-oss.sh && cd ..
+
+ - name: Run Tests with JaCoCo
+ run: mvn -P developer,systemvm,quality -Dsimulator -Dnoredist clean test
+
+ #- name: Generate JaCoCo Report
+ # id: jacoco
+ # uses: Madrapps/jacoco-report@v1.2
+ # with:
+ # paths: ${{ github.workspace }}/**/jacoco.xml
+ # token: ${{ secrets.GITHUB_TOKEN }}
+ # min-coverage-overall: 0
+ # min-coverage-changed-files: 80
+ # title: PR Code Coverage
+ # debug-mode: true
Review Comment:
I'll enable this once the current workflow build works, by default it doesn't work as ASF infra has disallowed arbitrary actions to run. We may need to check with ASF infra is this is even allowed by them.
--
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@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] rohityadavcloud commented on a diff in pull request #6228: Support JaCoCo and other quality checks
Posted by GitBox <gi...@apache.org>.
rohityadavcloud commented on code in PR #6228:
URL: https://github.com/apache/cloudstack/pull/6228#discussion_r845046737
##########
pom.xml:
##########
@@ -1152,7 +1152,6 @@
<version>${cs.surefire-plugin.version}</version>
<configuration>
<useSystemClassLoader>false</useSystemClassLoader>
- <argLine>-Djava.security.egd=file:/dev/./urandom -noverify</argLine>
Review Comment:
Turns out this argline override, essentially disables any quality plugins that try to export their config to the mvn/cmd line. Disabling this now that linux and our build/pkgs are much faster. In my testing, I found no difference in the amount of time it took for the build.
--
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@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org