Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Open
jiafu1115 wants to merge 24 commits into apache:trunk
base: trunk
Choose a base branch
Loading
from jiafu1115:ciimprove

Conversation

@jiafu1115
Copy link
Contributor

@jiafu1115 jiafu1115 commented Dec 21, 2025
edited by github-actions bot
Loading

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

@jiafu1115 jiafu1115 marked this pull request as ready for review December 21, 2025 02:47
@github-actions github-actions bot added triage PRs from the community build Gradle build or GitHub Actions small Small PRs labels Dec 21, 2025
@jiafu1115 jiafu1115 changed the title (削除) MINOR: improve the ci: avoid run the long time test if only document changed (削除ここまで) (追記) MINOR: Improve the CI to avoid running long tests when only documentation is changed (追記ここまで) Dec 21, 2025
@jiafu1115 jiafu1115 changed the title (削除) MINOR: Improve the CI to avoid running long tests when only documentation is changed (削除ここまで) (追記) MINOR: Improve the CI to avoid running long tests when only document is changed (追記ここまで) Dec 21, 2025
Copy link
Member

@mumrah do you plan to add tests specifically for the documentation changes?

Copy link
Contributor Author

If the documents have special check or test or have plan for it ,this pr is not needed

@jiafu1115 jiafu1115 changed the title (削除) MINOR: Improve the CI to avoid running long tests when only document is changed (削除ここまで) (追記) MINOR: Improve the CI to avoid running long time tests when only document is changed (追記ここまで) Dec 21, 2025
Copy link
Member

Perhaps we can keep the check but skip test

Signed-off-by: Jian <fujian1115@gmail.com>
Copy link
Contributor Author

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.

jiafu1115 and others added 2 commits December 21, 2025 22:20
Co-authored-by: Vincent Potuček <8830888+Pankraz76@users.noreply.github.com>
Co-authored-by: Vincent Potuček <8830888+Pankraz76@users.noreply.github.com>
@github-actions github-actions bot removed the triage PRs from the community label Dec 22, 2025
Signed-off-by: Jian <fujian1115@gmail.com>
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

This comment was marked as outdated.

Copy link
Member

@mumrah mumrah left a 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.

Copy link
Contributor Author

jiafu1115 commented Dec 22, 2025
edited
Loading

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.

Copy link
Member

mumrah commented Dec 22, 2025
edited
Loading

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.

Copy link
Member

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

Copy link
Contributor Author

@chia7712 @mumrah so. does this PR make sense to do?
the dream example: stable within few time:
image

Copy link
Contributor Author

jiafu1115 commented Dec 23, 2025
edited
Loading

@mumrah @chia7712 @Pankraz76

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

image

Test 2: Only code change

image

Test 3: Code and Doc changed

image

BTW. I record some information found in tests here for your reference:

  1. "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']_

  1. ${{ 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@chia7712 chia7712 Awaiting requested review from chia7712

@mumrah mumrah Awaiting requested review from mumrah

@Pankraz76 Pankraz76 Awaiting requested review from Pankraz76

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

build Gradle build or GitHub Actions ci-approved clients small Small PRs

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /