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: reduce clone/fetch size when building docs PRs #3094

Merged
merged 1 commit into from
Oct 30, 2024

Conversation

kruskall
Copy link
Member

do not fetch tags (they are unused)

use a treeless clone of the target branch instead of cloning the default branch: the initial clone of the default branch is unused, we are only interested in the target branch to compare the diff with the PR.

do not fetch tags
use a treeless clone of the target branch instead of cloning the
default branch
Copy link

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.

Copy link
Member

@bmorelli25 bmorelli25 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution! LGTM. I'll wait to merge this until tomorrow or Wednesday when I know I'll be around for a few hours to make sure PR CI is running smoothly.

@bmorelli25 bmorelli25 merged commit 3de8dad into elastic:master Oct 30, 2024
5 checks passed
@kruskall kruskall deleted the perf/reduce-clone-size branch October 30, 2024 16:31
@bmorelli25
Copy link
Member

bmorelli25 commented Oct 30, 2024

I might have to revert this. A number of PRs are failing with:


2024-10-30 09:42:30 PDT | INFO:build_docs:---------
-- | --
  | 2024-10-30 09:42:30 PDT | INFO:build_docs: -                             Kibana Guide: Merging the subbed dir for [kibana][main][:(glob)src/**/*.asciidoc] into the last successful build.
  | 2024-10-30 09:42:34 PDT | INFO:build_docs: -                             Kibana Guide: Failed to merge the subbed dir for [kibana][main][:(glob)src/**/*.asciidoc] into the last successful build:
  | 2024-10-30 09:42:34 PDT | INFO:build_docs:Error executing: git merge -m merge dbe7f54dd7beaf10f7e059c06d98970a8eae8b4a
  | 2024-10-30 09:42:34 PDT | INFO:build_docs:---out---
  | 2024-10-30 09:42:34 PDT | INFO:build_docs:Auto-merging yarn.lock
  | 2024-10-30 09:42:34 PDT | INFO:build_docs:CONFLICT (content): Merge conflict in yarn.lock
  | 2024-10-30 09:42:34 PDT | INFO:build_docs:Auto-merging src/dev/license_checker/config.ts
  | 2024-10-30 09:42:34 PDT | INFO:build_docs:CONFLICT (content): Merge conflict in src/dev/license_checker/config.ts
  | 2024-10-30 09:42:34 PDT | INFO:build_docs:Auto-merging package.json
  | 2024-10-30 09:42:34 PDT | INFO:build_docs:CONFLICT (content): Merge conflict in package.json
  | 2024-10-30 09:42:34 PDT | INFO:build_docs:Automatic merge failed; fix conflicts and then commit the result.
  | 2024-10-30 09:42:34 PDT | INFO:build_docs:
  | 2024-10-30 09:42:34 PDT | INFO:build_docs:---err---


edit: link to one of these failures

@bmorelli25
Copy link
Member

Hmm. Seems to only be Kibana PRs that are failing.

bmorelli25 added a commit to bmorelli25/docs that referenced this pull request Oct 30, 2024
@kruskall
Copy link
Member Author

😭

@bmorelli25
Copy link
Member

Not sure why only Kibana PRs are failing, but they all are failing with the same error. I reverted in #3098.

@kruskall
Copy link
Member Author

Not sure why only Kibana PRs are failing

kibana is excluded from the switch case which means the script will only fetch the latest commit in the PR without fetching the whole history (because it doesn't need to do the diff).
I'm not sure why building the docs fail (probably using some git command that requires the whole history which imo is bad) but I guess this is an opportunity to improve the build process :D

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.

2 participants