Skip to content
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

feat: skip build for APM Server if there are no code changes #3051

Merged
merged 2 commits into from
Sep 11, 2024

Conversation

kruskall
Copy link
Member

@kruskall kruskall commented Sep 3, 2024

docs/build-pr is the slowest job in apm-server CI pipeline and it is impacting significantly developer velocity when merging PRs. Update the buildkite pipeline to exit early if there are no docs changes.
APM Server docs is actually in a separate repository (observability-docs) and the few remaining files are barely touched (except for the changelog)

docs/build-pr is the slowest job in apm-server CI pipeline and it is
impacting significantly developer velocity when merging PRs.
Update the buildkite pipeline to exit early if there are no
docs changes.
APM Server docs is actually in a separate repository (observability-docs)
and the few remaining files are barely touched (except for the changelog)
@kruskall kruskall requested a review from v1v September 3, 2024 19:50
@kruskall kruskall requested a review from a team as a code owner September 3, 2024 19:50
Copy link

github-actions bot commented Sep 3, 2024

A documentation preview will be available soon.

Request a new doc build by commenting
  • Rebuild this PR: run docs-build
  • Rebuild this PR and all Elastic docs: run docs-build rebuild

run docs-build is much faster than run docs-build rebuild. A rebuild should only be needed in rare situations.

If your PR continues to fail for an unknown reason, the doc build pipeline may be broken. Elastic employees can check the pipeline status here.

v1v
v1v previously approved these changes Sep 4, 2024
@bmorelli25
Copy link
Member

@kruskall — this is really neat!! We can potentially take this enhancement to many other repos to save both time and money. Do you or @v1v know how I can test this?

@kruskall
Copy link
Member Author

kruskall commented Sep 8, 2024

@bmorelli25 you can extract the part of the script that checks the diff and run it locally.

To test it on apm-server:

I've checked a new branch, made a random commit with a code file. Result:

$ GITHUB_PR_BASE_REPO=apm-server GITHUB_PR_TARGET_BRANCH=main sh diff.sh 
main in apm-server has no docs changes

Update docs/README.md:

$ GITHUB_PR_BASE_REPO=apm-server GITHUB_PR_TARGET_BRANCH=main sh diff.sh 
diff:
 docs/README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

If you agree with this approach I can add support for other repositories

@kruskall
Copy link
Member Author

kruskall commented Sep 8, 2024

I'd suggest to add support for other repositories gradually

@bmorelli25 bmorelli25 merged commit 2fc87e4 into elastic:master Sep 11, 2024
3 checks passed
@kruskall kruskall deleted the feat/skip-build-apm-server branch September 11, 2024 15:33
bmorelli25 added a commit to bmorelli25/docs that referenced this pull request Sep 11, 2024
kruskall added a commit to kruskall/docs that referenced this pull request Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants