-
Notifications
You must be signed in to change notification settings - Fork 14.9k
MINOR: Improve the CI to avoid running long time tests when only document is changed #21199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Jian <fujian1115@gmail.com>
chia7712
commented
Dec 21, 2025
@mumrah do you plan to add tests specifically for the documentation changes?
jiafu1115
commented
Dec 21, 2025
If the documents have special check or test or have plan for it ,this pr is not needed
chia7712
commented
Dec 21, 2025
Perhaps we can keep the check but skip test
Signed-off-by: Jian <fujian1115@gmail.com>
jiafu1115
commented
Dec 21, 2025
Perhaps we can keep the check but skip test
@chia7712 done with change. to be honest the code is generated by AI with my review. It needs test with this CI and another CI with document change only. you can help to check if the approach make sense now. thanks a lot.
Signed-off-by: Jian <fujian1115@gmail.com>
Co-authored-by: Vincent Potuček <8830888+Pankraz76@users.noreply.github.com>
Co-authored-by: Vincent Potuček <8830888+Pankraz76@users.noreply.github.com>
Signed-off-by: Jian <fujian1115@gmail.com>
4dbc746 to
00148d5
Compare
672e5a4 to
17d93b8
Compare
Add YAML files to paths-filter in build workflow for temp test Update doc-change-only condition in build.yml Fix condition check for doc-change-only output. Just for test Update AdminClientWithPoliciesIntegrationTest.java Fix syntax for doc-change-only output in build.yml Update build.yml
85f0173 to
885d59e
Compare
Signed-off-by: Jian <fujian1115@gmail.com>
This comment was marked as outdated.
This comment was marked as outdated.
@mumrah
mumrah
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally, we don't need this since the Gradle build cache should avoid running tests if no source files have changed. But we still don't have that working perfectly, so an explicit opt-out of tests seems okay for docs changes.
We should still run the "Compile and Check (Merge Ref)" job since it checks for licenses.
Ideally, we don't need this since the Gradle build cache should avoid running tests if no source files have changed. But we still don't have that working perfectly, so an explicit opt-out of tests seems okay for docs changes.
We should still run the "Compile and Check (Merge Ref)" job since it checks for licenses.
@mumrah thanks for your feedback. at the last. adopt the @chia7712 's suggestion. just ignore the test for document change only. example:
https://github.com/apache/kafka/actions/runs/20434902642
"But we still don't have that working perfectly,"- That's maybe the root cause I see some document only take few time when some other take a very long time.
thanks.
That's maybe the root cause
Yes, very likely. I have an explanation here #18449 (comment)
Essentially, we checkout ${{ github.event.pull_request.head.sha }} which is the HEAD of the PR branch rather than the special "merge ref". This means if a docs PR is far behind trunk, it will get mostly cache misses.
chia7712
commented
Dec 22, 2025
Ideally, we don't need this since the Gradle build cache should avoid running tests if no source files have changed.
That would be the dream 😄 I really hope we can make that happen one day
jiafu1115
commented
Dec 22, 2025
Exclude YAML files from code change detection.
Removed exclusion for YAML files in code change detection.
Thanks for your discussion. I just completed the code refactor and tests. I also add more file types which need to be exclude from tests after the CI test.
It is the final status for me now. If you think it is worthy for this PR. you can help to review. Thanks.
Test 1: Only doc change
imageTest 2: Only code change
imageTest 3: Code and Doc changed
imageBTW. I record some information found in tests here for your reference:
- "predicate-quantifier: 'every'" will got one warn log but it shouldn't be deleted due to the behavior will be changed accroding to the test result.
_Warning: Unexpected input(s) 'predicate-quantifier', valid inputs are ['token', 'working-directory', 'ref', 'base', 'filters', 'list-files', 'initial-fetch-depth']_
- ${{ steps.filter.outputs.docs && !steps.filter.outputs.codes }}" is not equal with ${{ steps.filter.outputs.docs == 'true' && steps.filter.outputs.codes == 'false' }}". @Pankraz76 so I rollback part of the code. I also check the plugin example (https://github.com/dorny/paths-filter). you can check my test result here directly.
echo "steps.filter.outputs.docs: ${{ steps.filter.outputs.docs }}"
echo "steps.filter.outputs.codes: ${{ steps.filter.outputs.codes }}"
echo "doc-change-only: ${{ steps.filter.outputs.docs && !steps.filter.outputs.codes }}"
echo "doc-change-only: ${{ steps.filter.outputs.docs == 'true' && steps.filter.outputs.codes == 'false' }}"
the result: true. false. false, true
Thanks !
Regards
Jian
Uh oh!
There was an error while loading. Please reload this page.
if we only change md/html/etc. we don't need to run the unit test. it
will take hours to wait the final status sometimes