Skip to content

Bump apidoc-markdown from v6.0.0 to v7.2.4#144007

Merged
watson merged 7 commits intoelastic:mainfrom
watson:bump-apidoc-markdown
Dec 13, 2022
Merged

Bump apidoc-markdown from v6.0.0 to v7.2.4#144007
watson merged 7 commits intoelastic:mainfrom
watson:bump-apidoc-markdown

Conversation

@watson
Copy link
Copy Markdown
Contributor

@watson watson commented Oct 26, 2022

Note to reviewers

See breaking changes and upgrade guide for apidoc-markdown version 7 here: https://github.com/rigwild/apidoc-markdown/releases/tag/v7.0.1

The reason why I remove the direct apidoc dependency is that apidoc-markdown now ships with apidoc itself and takes care of running apidoc internally. Hence why I also upgraded the command in the ML package.json that first runs apidoc and then apidoc-markdown.

I removed a bunch of stuff about apidoc from x-pack/plugins/transform/server/README.md because it seemed to just have been copied from x-pack/plugins/ml/server/routes/README.md and wasn't actually relevant for that plugin.

@watson watson added release_note:skip Skip the PR/issue when compiling release notes backport:all-open Backport to all branches that could still receive a release labels Oct 26, 2022
@watson watson self-assigned this Oct 26, 2022
@watson watson force-pushed the bump-apidoc-markdown branch from 749fe56 to 1bfbe76 Compare October 31, 2022 12:31
@watson watson marked this pull request as ready for review October 31, 2022 12:31
@watson watson requested a review from a team as a code owner October 31, 2022 12:31
@darnautov darnautov added :ml Team:ML Team label for ML (also use :ml) t// v8.6.0 labels Nov 1, 2022
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/ml-ui (:ml)

@darnautov
Copy link
Copy Markdown
Contributor

darnautov commented Nov 1, 2022

hi @watson, thanks for updating the apidoc markdown!

When I execute the yarn run apiDocs command I receive the following errors:

Expand the error output:

➜  ml git:(bump-apidoc-markdown) ✗ yarn run apiDocs
yarn run v1.22.19
$ yarn build:apiDocScripts && yarn generateHeader && cd ./server/routes/ && ../../../../../node_modules/.bin/apidoc-markdown --parse-workers apischema=./apidoc_scripts/target/schema_worker.js --parse-parsers apischema=./apidoc_scripts/target/schema_parser.js --parse-filters apiversion=./apidoc_scripts/target/version_filter.js -i . -o ../routes_doc/ML_API.mdx --header ./apidoc_scripts/header.md --template ./apidoc_scripts/template.md
$ cd server/routes/apidoc_scripts && ../../../../../../node_modules/.bin/tsc
../../../../../../packages/kbn-config-schema/src/internals/index.ts:10:15 - error TS2305: Module '"joi"' has no exported member 'JoiRoot'.

10 import type { JoiRoot, CustomHelpers } from 'joi';
                 ~~~~~~~

../../../../../../packages/kbn-config-schema/src/types/string_type.ts:39:15 - error TS2571: Object is of type 'unknown'.

39           if (value.length < options.minLength!) {
                 ~~~~~

../../../../../../packages/kbn-config-schema/src/types/string_type.ts:40:41 - error TS2571: Object is of type 'unknown'.

40             return `value has length [${value.length}] but it must have a minimum length of [${options.minLength}].`;
                                           ~~~~~

../../../../../../packages/kbn-config-schema/src/types/string_type.ts:49:15 - error TS2571: Object is of type 'unknown'.

49           if (value.length > options.maxLength!) {
                 ~~~~~

../../../../../../packages/kbn-config-schema/src/types/string_type.ts:50:41 - error TS2571: Object is of type 'unknown'.

50             return `value has length [${value.length}] but it must have a maximum length of [${options.maxLength}].`;
                                           ~~~~~

../../../../../../packages/kbn-config-schema/src/types/type.ts:123:13 - error TS2339: Property 'local' does not exist on type 'ErrorReport'.

123     const { local, code, path, value } = error;
                ~~~~~


Found 6 errors in 3 files.

Errors  Files
     1  ../../../../../../packages/kbn-config-schema/src/internals/index.ts:10
     4  ../../../../../../packages/kbn-config-schema/src/types/string_type.ts:39
     1  ../../../../../../packages/kbn-config-schema/src/types/type.ts:123

And the schema_extractor tests fails 🤔

Does it work fine in your setup?

@darnautov darnautov self-requested a review November 1, 2022 12:34
@watson
Copy link
Copy Markdown
Contributor Author

watson commented Nov 1, 2022

@darnautov thanks for reviewing. I mistakenly thought that this job would run during CI, so when that was all green I thought it was ok. But I get the same errors when running locally. I'll take a look...

@watson
Copy link
Copy Markdown
Contributor Author

watson commented Dec 5, 2022

@darnautov I just now got back to this PR and after looking more into this I discovered that the issue you found with yarn run apiDocs also exists in main. So it's not related to this PR. So the big question is: Does anyone still use this? (cc @elastic/ml-ui)

The TS errors that you get actually doesn't even come from the part of the shell command that I edited but from the very beginning of the shell command: yarn build:apiDocScripts. If you just run that standalone you get the samme error.

@darnautov
Copy link
Copy Markdown
Contributor

hey @watson, indeed you're right, the script is broken on main. Currently, it's used to build internal documentation and it hasn't been updated for a while. I'll create a PR to address it ASAP.

@watson
Copy link
Copy Markdown
Contributor Author

watson commented Dec 8, 2022

@darnautov if you plan to fix the script in main soon, then I'll just wait until it's done and then merge main into this PR. If you think it will take a while before you have time (I can understand if it's not high priority), then I would prefer to either just merge this as is and cross our fingeres it will not make the future fixing of the script harder. Do you have any preferences?

Copy link
Copy Markdown
Contributor

@darnautov darnautov left a comment

Choose a reason for hiding this comment

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

LGTM, let's merge this one and I'll take care of fixing the build step in a follow-up

@darnautov
Copy link
Copy Markdown
Contributor

@elasticmachine merge upstream

@kibanamachine
Copy link
Copy Markdown
Contributor

merge conflict between base and head

@watson watson changed the title Bump apidoc-markdown from v6.0.0 to v7.2.3 Bump apidoc-markdown from v6.0.0 to v7.2.4 Dec 12, 2022
@kibana-ci
Copy link
Copy Markdown

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
maps 2.7MB 2.7MB +155.0B
mapsEms 124.1KB 124.2KB +156.0B
securitySolution 10.1MB 10.1MB +465.0B
total +776.0B
Unknown metric groups

ESLint disabled in files

id before after diff
osquery 1 2 +1

ESLint disabled line counts

id before after diff
enterpriseSearch 19 21 +2
fleet 60 66 +6
osquery 109 115 +6
securitySolution 445 451 +6
total +20

Total ESLint disabled count

id before after diff
enterpriseSearch 20 22 +2
fleet 69 75 +6
osquery 110 117 +7
securitySolution 521 527 +6
total +21

History

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

cc @watson

@watson watson merged commit 47ad5ed into elastic:main Dec 13, 2022
@watson watson deleted the bump-apidoc-markdown branch December 13, 2022 10:08
@kibanamachine
Copy link
Copy Markdown
Contributor

💔 All backports failed

Status Branch Result
7.17 Backport failed because of merge conflicts

You might need to backport the following PRs to 7.17:
- Upgrade node-sass to 8.0.0 (#145355)
8.5 Backport failed because of merge conflicts
8.6 Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

node scripts/backport --pr 144007

Questions ?

Please refer to the Backport tool documentation

@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Dec 14, 2022
@kibanamachine
Copy link
Copy Markdown
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add the label auto-backport or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 144007 locally

3 similar comments
@kibanamachine
Copy link
Copy Markdown
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add the label auto-backport or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 144007 locally

@kibanamachine
Copy link
Copy Markdown
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add the label auto-backport or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 144007 locally

@kibanamachine
Copy link
Copy Markdown
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add the label auto-backport or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 144007 locally

watson pushed a commit to watson/kibana that referenced this pull request Dec 19, 2022
(cherry picked from commit 47ad5ed)

# Conflicts:
#	package.json
#	yarn.lock
@watson watson added backport:prev-MAJOR and removed backport:all-open Backport to all branches that could still receive a release v8.6.0 labels Dec 19, 2022
@kibanamachine
Copy link
Copy Markdown
Contributor

💔 All backports failed

Status Branch Result
7.17 Backport failed because of merge conflicts
8.5 Backport failed because of merge conflicts
8.6 Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

node scripts/backport --pr 144007

Questions ?

Please refer to the Backport tool documentation

@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.

1 similar comment
@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.

watson pushed a commit that referenced this pull request Dec 22, 2022
# Backport

This will backport the following commits from `main` to `7.17`:
- [Bump apidoc-markdown from v6.0.0 to v7.2.4
(#144007)](#144007)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Thomas
Watson","email":"watson@elastic.co"},"sourceCommit":{"committedDate":"2022-12-13T10:08:29Z","message":"Bump
apidoc-markdown from v6.0.0 to v7.2.4
(#144007)","sha":"47ad5edece1bff8743962a090bab3f5050e0f7b2","branchLabelMapping":{"^v8.7.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":[":ml","release_note:skip","backport
missing","Team:ML","backport:all-open","v8.6.0","v8.7.0"],"number":144007,"url":"https://github.com/elastic/kibana/pull/144007","mergeCommit":{"message":"Bump
apidoc-markdown from v6.0.0 to v7.2.4
(#144007)","sha":"47ad5edece1bff8743962a090bab3f5050e0f7b2"}},"sourceBranch":"main","suggestedTargetBranches":["8.6"],"targetPullRequestStates":[{"branch":"8.6","label":"v8.6.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.7.0","labelRegex":"^v8.7.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/144007","number":144007,"mergeCommit":{"message":"Bump
apidoc-markdown from v6.0.0 to v7.2.4
(#144007)","sha":"47ad5edece1bff8743962a090bab3f5050e0f7b2"}}]}]
BACKPORT-->
@kibanamachine kibanamachine added v7.17.9 and removed backport missing Added to PRs automatically when the are determined to be missing a backport. labels Dec 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:ml release_note:skip Skip the PR/issue when compiling release notes Team:ML Team label for ML (also use :ml) t// v7.17.9 v8.7.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants