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

[ci] build next docs in PRs when relevant files change #149991

Merged
merged 13 commits into from
Feb 10, 2023

Conversation

spalger
Copy link
Contributor

@spalger spalger commented Jan 31, 2023

After chatting with @KOTungseth, @scottybollinger, and @glitteringkatie we've decided to add a CI step to the Kibana repo that will run when changes to next-doc related code is made. This step will checkout the repository containing configuration for the docs.elastic.dev website (which is currently private, sorry) and then ensure that the build can be completed with a local copy of all the repositories. It does this by reading the config/content.js files and cloning all of the repositories listed, then rewriting the content.js file with a map telling the build system to read files from the local repos (which are pre-cached by the packer cache job) and the local Kibana repo (which represents the changes in the PR).

This script also runs locally by running node scripts/validate_next_docs.

@spalger spalger force-pushed the implement/next-docs-pipeline-step branch 10 times, most recently from 6a6ce4c to 39f2db0 Compare February 1, 2023 21:23
@spalger spalger force-pushed the implement/next-docs-pipeline-step branch from 39f2db0 to 0d1327c Compare February 1, 2023 21:25
@spalger spalger marked this pull request as ready for review February 2, 2023 00:00
@spalger spalger requested a review from a team as a code owner February 2, 2023 00:00
@spalger spalger added Team:Operations Team label for Operations Team release_note:skip Skip the PR/issue when compiling release notes labels Feb 2, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-operations (Team:Operations)

@@ -0,0 +1,5 @@
# @kbn/validate-next-docs-cli

Clone a bunch of repos needed to build the next-docs with the latest version of the changes in the repo. This is only used for validating changes in CI with full validation of all IDs. This isn't intended for local development (except for debugging).
Copy link
Member

Choose a reason for hiding this comment

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

This seems like it could cause Kibana CI to break in a way we can't fix via other repo's docs. Is there a way to limit this to only build kibana docs?

Copy link
Contributor Author

@spalger spalger Feb 3, 2023

Choose a reason for hiding this comment

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

It could, but at this point Kibana is the only repo without a docs block on PRs so we're actually the ones breaking things in other repos. Additionally this would only impact people working on docs, so I'm not super concerned about it personally.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Additionally, no, there isn't any way to validate our docs without building everything. It's a flaw in the current docs system but it's one the docs team is aware of.

@glitteringkatie
Copy link
Contributor

glitteringkatie commented Feb 9, 2023

Checking in on this! I know Spencer's last day is tomorrow--is there someone who could champion this PR for us? We already have a broken docs build because of kibana docs again since this PR was opened. (trying to open a PR myself for that: PR 1, PR 2)

…r/kibana into implement/next-docs-pipeline-step
@spalger
Copy link
Contributor Author

spalger commented Feb 9, 2023

@glitteringkatie I think these changes should resolve the final issues so we can get this in before I leave. Sorry, very busy week.

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@spalger spalger merged commit a1c55c6 into elastic:main Feb 10, 2023
@spalger spalger deleted the implement/next-docs-pipeline-step branch February 10, 2023 04:57
@kibanamachine kibanamachine added v8.8.0 backport:skip This commit does not require backporting labels Feb 10, 2023
jloleysens added a commit to jloleysens/kibana that referenced this pull request Feb 10, 2023
* main: (115 commits)
  [Custom branding] Add custom logo to space selector (elastic#150284)
  [api-docs] 2023-02-10 Daily api_docs build (elastic#150831)
  [ci] build next docs in PRs when relevant files change (elastic#149991)
  [codeowners] allow overrides to take higher precedence (elastic#150821)
  [docs] Remove kibDevDocsOpsPluginDiscovery (elastic#150788)
  [Fleet] Fix max 20 installed integrations returned from Fleet API (elastic#150780)
  [maps] fix Changing resolutions on Heat map layer throws error in console (elastic#150761)
  fixes Failing ES Promotion: X-Pack API Integration Tests x-pack/test/api_integration/apis/maps/get_grid_tile.js (elastic#150768)
  [Synthetics] adjust overview scrolling e2e (elastic#150774)
  [Security Solution] Fixes bulk close alerts from exception flyout type bug (elastic#150765)
  Upgrade EUI to v74.1.0 (elastic#150235)
  [skip ci] Fix labeling for Infrastructure UI (elastic#150571)
  [Enterprise Search] Move pipelines modal to flyout (elastic#150727)
  [Security Solution] fix flaky endpoint tests (elastic#150652)
  Fixes the space selector page layout  (elastic#150503)
  [Dashboard] [Navigation] Fix mount point bug (elastic#150507)
  [Infrastructure UI] Track host cloud provider on table entry click (elastic#150685)
  [Dashboard Usability] Moves scrollbar to panel section (elastic#145628)
  [Maps] fixes Kibana maps shows MVT borders if the geometry border style is greater than 1 (elastic#150497)
  [Cloud Posture][Dashboard] dashboard re-design enhancements (elastic#150394)
  ...
@glitteringkatie
Copy link
Contributor

🤩 Thank you all!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting ci:build-next-docs release_note:skip Skip the PR/issue when compiling release notes Team:Operations Team label for Operations Team v8.8.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants