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/05/04 02:15:40 UTC

[GitHub] [skywalking] Superskyyy opened a new pull request, #8982: Enhance CI skipping strategy

Superskyyy opened a new pull request, #8982:
URL: https://github.com/apache/skywalking/pull/8982

   The current CI skipping strategy relies on a suboptimal mechanism that is hard to tune. 
   
   This PR enhances the process to exclude files and we can add more whenever we need. Please take a look and make sure I did nothing wrong.
   
   I also turned on the dead link checker schedule for the upstream repo only.
   
   BTW, some of the e2e tests are flaky - like fluent-bit, shall we increase the retry times?
   <!--
       ⚠️ Please make sure to read this template first, pull requests that don't accord with this template
       maybe closed without notice.
       Texts surrounded by `<` and `>` are meant to be replaced by you, e.g. <framework name>, <issue number>.
       Put an `x` in the `[ ]` to mark the item as CHECKED. `[x]`
   -->
   
   <!-- ==== πŸ› Remove this line WHEN AND ONLY WHEN you're fixing a bug, follow the checklist πŸ‘‡ ====
   ### Fix <bug description or the bug issue number or bug issue link>
   - [ ] Add a unit test to verify that the fix works.
   - [ ] Explain briefly why the bug exists and how to fix it.
        ==== πŸ› Remove this line WHEN AND ONLY WHEN you're fixing a bug, follow the checklist πŸ‘† ==== -->
   
   <!-- ==== πŸ“ˆ Remove this line WHEN AND ONLY WHEN you're improving the performance, follow the checklist πŸ‘‡ ====
   ### Improve the performance of <class or module or ...>
   - [ ] Add a benchmark for the improvement, refer to [the existing ones](https://github.com/apache/skywalking/blob/master/apm-commons/apm-datacarrier/src/test/java/org/apache/skywalking/apm/commons/datacarrier/LinkedArrayBenchmark.java)
   - [ ] The benchmark result.
   ```text
   <Paste the benchmark results here>
   ```
   - [ ] Links/URLs to the theory proof or discussion articles/blogs. <links/URLs here>
        ==== πŸ“ˆ Remove this line WHEN AND ONLY WHEN you're improving the performance, follow the checklist πŸ‘† ==== -->
   
   <!-- ==== πŸ†• Remove this line WHEN AND ONLY WHEN you're adding a new feature, follow the checklist πŸ‘‡ ====
   ### <Feature description>
   - [ ] If this is non-trivial feature, paste the links/URLs to the design doc.
   - [ ] Update the documentation to include this new feature.
   - [ ] Tests(including UT, IT, E2E) are added to verify the new feature.
   - [ ] If it's UI related, attach the screenshots below.
        ==== πŸ†• Remove this line WHEN AND ONLY WHEN you're adding a new feature, follow the checklist πŸ‘† ==== -->
   
   - [ ] If this pull request closes/resolves/fixes an existing issue, replace the issue number. Closes #<issue number>.
   - [ ] Update the [`CHANGES` log](https://github.com/apache/skywalking/blob/changelog/docs/en/changes/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] Superskyyy commented on a diff in pull request #8982: Enhance CI skipping strategy

Posted by GitBox <gi...@apache.org>.
Superskyyy commented on code in PR #8982:
URL: https://github.com/apache/skywalking/pull/8982#discussion_r864426848


##########
.github/workflows/skywalking.yaml:
##########
@@ -568,22 +607,26 @@ jobs:
     timeout-minutes: 10
     steps:
       - name: Merge Requirement
+        # check changes, sanity, dependency license, unit, integration, e2e, e2e-istio and e2e-java-versions, 
+        # if all of them are working as expected then naturally exits else return error code
         run: |
-          if [[ ${{ needs.dependency-license.result }} != 'success' ]]; then
-            exit -1
-          fi
-          if [[ ${{ needs.unit-test.result }} != 'success' ]]; then
-            exit -1
-          fi
-          if [[ ${{ needs.integration-test.result }} != 'success' ]]; then
-            exit -1
-          fi
-          if [[ ${{ needs.e2e-test.result }} != 'success' ]]; then
-            exit -1
-          fi
-          if [[ ${{ needs.e2e-test-istio.result }} != 'success' ]]; then
-            exit -1
-          fi
-          if [[ ${{ needs.e2e-test-java-versions.result }} != 'success' ]]; then
-            exit -1
-          fi
+          execute=${{ needs.changes.outputs.oap }}

Review Comment:
   I remember when I first experimented weeks ago, it has to be like this because when there's something wrong before execute, the `changes` job will not run normally.
   
   That said this variable won't be populated but there could be failed jobs before(including changes itself). Then I thought we could solve this by not `need` the sanity check in `changes`, but that in fact also doesn't work because changes -> skip[s] -> required check runs faster than the parallel sanity check, the button will be green before sanity check finishes. so we need to add another condition to check sanity check results to the `if always()`, 
   
   This probably should work, but `changes` itself could potentially fail or suffer from other problems, so I chose to check each `skip` status to ensure the pipeline is doing correctly. Otherwise, it's may become flaky.



-- 
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 diff in pull request #8982: Enhance CI skipping strategy

Posted by GitBox <gi...@apache.org>.
kezhenxu94 commented on code in PR #8982:
URL: https://github.com/apache/skywalking/pull/8982#discussion_r864419431


##########
.github/workflows/skywalking.yaml:
##########
@@ -568,22 +607,26 @@ jobs:
     timeout-minutes: 10
     steps:
       - name: Merge Requirement
+        # check changes, sanity, dependency license, unit, integration, e2e, e2e-istio and e2e-java-versions, 
+        # if all of them are working as expected then naturally exits else return error code
         run: |
-          if [[ ${{ needs.dependency-license.result }} != 'success' ]]; then
-            exit -1
-          fi
-          if [[ ${{ needs.unit-test.result }} != 'success' ]]; then
-            exit -1
-          fi
-          if [[ ${{ needs.integration-test.result }} != 'success' ]]; then
-            exit -1
-          fi
-          if [[ ${{ needs.e2e-test.result }} != 'success' ]]; then
-            exit -1
-          fi
-          if [[ ${{ needs.e2e-test-istio.result }} != 'success' ]]; then
-            exit -1
-          fi
-          if [[ ${{ needs.e2e-test-java-versions.result }} != 'success' ]]; then
-            exit -1
-          fi
+          execute=${{ needs.changes.outputs.oap }}

Review Comment:
   I’d just write if not executed exit 0, and check the remaining one by one so you don’t need to check execute there 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] Superskyyy commented on a diff in pull request #8982: Enhance CI skipping strategy

Posted by GitBox <gi...@apache.org>.
Superskyyy commented on code in PR #8982:
URL: https://github.com/apache/skywalking/pull/8982#discussion_r864427276


##########
.github/workflows/skywalking.yaml:
##########
@@ -568,22 +607,26 @@ jobs:
     timeout-minutes: 10
     steps:
       - name: Merge Requirement
+        # check changes, sanity, dependency license, unit, integration, e2e, e2e-istio and e2e-java-versions, 
+        # if all of them are working as expected then naturally exits else return error code

Review Comment:
   > Exit with different codes in different failures looks a good practice but I don’t think it useful here as the failed tasks will be already red in the workflow so we don’t bother clicking into the detail to see the exit code. And it looks the logic becomes kinda verbose?
   
   Lemme just change them all into -1, the logic side is explained below.



-- 
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 #8982: Enhance CI skipping strategy

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

   Seems there is syntax error. Fix them and it looks good to me. If changing exit code back to all -1 doesn’t improve the codes simplicity just leave them as is!


-- 
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 diff in pull request #8982: Enhance CI skipping strategy

Posted by GitBox <gi...@apache.org>.
kezhenxu94 commented on code in PR #8982:
URL: https://github.com/apache/skywalking/pull/8982#discussion_r864418983


##########
.github/workflows/skywalking.yaml:
##########
@@ -568,22 +607,26 @@ jobs:
     timeout-minutes: 10
     steps:
       - name: Merge Requirement
+        # check changes, sanity, dependency license, unit, integration, e2e, e2e-istio and e2e-java-versions, 
+        # if all of them are working as expected then naturally exits else return error code

Review Comment:
   Exit with different codes in different failures looks a good practice but I don’t think it useful here as the failed tasks will be already red in the workflow so we don’t bother clicking into the detail to see the exit code. And it looks the logic becomes kinda verbose?



-- 
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] Superskyyy merged pull request #8982: Enhance CI skipping strategy

Posted by GitBox <gi...@apache.org>.
Superskyyy merged PR #8982:
URL: https://github.com/apache/skywalking/pull/8982


-- 
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