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

Add Vega help link to DocLinksService #87721

Merged
merged 9 commits into from
Mar 25, 2021

Conversation

gtback
Copy link
Member

@gtback gtback commented Jan 7, 2021

Summary

This link is currently wrong, but I'm testing to make sure it will get
caught if it's included in this file. A future commit will actually use
this variables in vega_help_menu.tsx, and update the link in
doc_links_service.ts to be correct.

Fixes #87367
Related: elastic/docs#1805

Checklist

Delete any items that are not applicable to this PR.

For maintainers

This link is currently wrong, but I'm testing to make sure it will get
caught if it's included in this file. A future commit will actually use
this variables in vega_help_menu.tsx, and update the link in
`doc_links_service.ts` to be correct.

This is part of a fix for elastic#87367
Related: elastic/docs#1805
@gtback gtback requested review from KOTungseth and a team January 7, 2021 19:23
@gtback gtback requested a review from a team as a code owner January 7, 2021 19:23
@lcawl lcawl added release_note:skip Skip the PR/issue when compiling release notes Team:Docs v7.12.0 v8.0.0 labels Jan 7, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-docs (Team:Docs)

@@ -167,6 +167,7 @@ export class DocLinksService {
timelionDeprecation: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/dashboard.html#timelion-deprecation`,
lens: `${ELASTIC_WEBSITE_URL}what-is/kibana-lens`,
maps: `${ELASTIC_WEBSITE_URL}maps`,
vega: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/vega-graph.html`,
Copy link
Contributor

Choose a reason for hiding this comment

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

This URL doesn't exist any more. Try https://www.elastic.co/guide/en/kibana/7.10/vega-reference.html instead

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep, that's the point of (the first commit in) this PR. I wanted to make sure the docs build failed, before I replaced it with the correct URL.

Unfortunately, the build passed 😞 . Looks like I have some more work to do on the docs side.

Copy link
Contributor

@wylieconlon wylieconlon Jan 7, 2021

Choose a reason for hiding this comment

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

I should have read it more closely!

Copy link
Member Author

Choose a reason for hiding this comment

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

It looks like, starting in 7.11, the page is now called just vega.html.

@lcawl
Copy link
Contributor

lcawl commented Jan 7, 2021

@elasticmachine merge upstream

@joshdover
Copy link
Contributor

@elasticmachine merge upstream

@gtback
Copy link
Member Author

gtback commented Mar 10, 2021

The build finally failed, and for the right reason:

11:59:47 INFO:build_docs:  Kibana [master]: src/core/public/doc_links/doc_links_service.ts contains broken links to:
11:59:47 INFO:build_docs:   - ${ELASTIC_WEBSITE_URL}blog/external-collection-for-elastic-stack-monitoring-is-now-available-via-metricbeat
11:59:47 INFO:build_docs:   - ${ELASTIC_WEBSITE_URL}maps
11:59:47 INFO:build_docs:   - ${ELASTIC_WEBSITE_URL}what-is/kibana-lens
11:59:47 INFO:build_docs:   - en/app-search/master
11:59:47 INFO:build_docs:   - en/enterprise-search/master
11:59:47 INFO:build_docs:   - en/kibana/master/alert-type-index-threshold.html#index-action-configuration
11:59:47 INFO:build_docs:   - en/kibana/master/tutorial-load-dataset.html
11:59:47 INFO:build_docs:   - en/kibana/master/vega-graph.html
11:59:47 INFO:build_docs:   - en/workplace-search/master

Note the en/kibana/master/vega-graph.html path in that output. The rest of the errors are the ones @pgayvallet found in #94274.

The failure is being ignored because kibana-bot doesn't consider these docs_link files to be "docs" changes.

@gtback
Copy link
Member Author

gtback commented Mar 10, 2021

@elasticmachine run elasticsearch-ci/docs

@gtback
Copy link
Member Author

gtback commented Mar 18, 2021

This is now failing for the right reason:

09:57:27 INFO:build_docs:Bad cross-document links:
09:57:27 INFO:build_docs:  Kibana [master]: src/core/public/doc_links/doc_links_service.ts contains broken links to:
09:57:27 INFO:build_docs:   - en/kibana/master/vega-graph.html

I'll make an update that fixes the link and references it from the correct place.


@spalger I noticed the bot is still letting this pass, even though src/core/public/doc_links/doc_links_service.ts is modified.

elasticsearch-ci/docs failure ignored because this PR doesn't contain docs 

@gtback
Copy link
Member Author

gtback commented Mar 22, 2021

@elasticmachine merge upstream

@gtback
Copy link
Member Author

gtback commented Mar 22, 2021

@pgayvallet Can you let me know if the changes I made in 6cbb0c7 are the right way to pass the DocLinksService into where I can fetch the correct URL?

Also, given how out of date this PR is, I'm not sure if the version labels are correct. Should this still go to 7.12.0, or 7.13.0 (and 7.12.1)?

Copy link
Contributor

@pgayvallet pgayvallet left a comment

Choose a reason for hiding this comment

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

@gtback implem looks good to me

Also, given how out of date this PR is, I'm not sure if the version labels are correct. Should this still go to 7.12.0, or 7.13.0 (and 7.12.1)?

7.13 for sure. Not sure if we need to backport to 7.12.1?

@gtback gtback added v7.13.0 and removed v7.12.0 labels Mar 25, 2021
@gtback
Copy link
Member Author

gtback commented Mar 25, 2021

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 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
visTypeVega 2.6MB 2.6MB -22.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
core 412.1KB 412.2KB +75.0B
visTypeVega 53.7KB 54.0KB +309.0B
total +384.0B

History

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

@gtback gtback requested review from a team and wylieconlon March 25, 2021 19:24
Copy link
Contributor

@wylieconlon wylieconlon left a comment

Choose a reason for hiding this comment

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

I haven't run this code, but it looks safe to me. This was a common pattern for a few months.

@@ -35,3 +35,5 @@ export const [getInjectedVars, setInjectedVars] = createGetterSetter<{
}>('InjectedVars');

export const getEnableExternalUrls = () => getInjectedVars().enableExternalUrls;

export const [getDocLinks, setDocLinks] = createGetterSetter<DocLinksStart>('docLinks');
Copy link
Contributor

Choose a reason for hiding this comment

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

Using createGetterSetter is a bit of an outdated pattern, but I have no objection to following the Vega pattern until we actually refactor this.

cc @alexwizp for refactoring the Vega setup code

@gtback gtback merged commit e01f317 into elastic:master Mar 25, 2021
@gtback gtback deleted the gtback/test-doc-link-checker branch March 25, 2021 21:57
@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Mar 29, 2021
@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create backports run node scripts/backport --pr 87721 or prevent reminders by adding the backport:skip label.

1 similar comment
@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create backports run node scripts/backport --pr 87721 or prevent reminders by adding the backport:skip label.

stratoula pushed a commit to stratoula/kibana that referenced this pull request Mar 31, 2021
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
@kibanamachine kibanamachine removed the backport missing Added to PRs automatically when the are determined to be missing a backport. label Mar 31, 2021
stratoula added a commit that referenced this pull request Mar 31, 2021
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Greg Back <1045796+gtback@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:skip Skip the PR/issue when compiling release notes Team:Docs v7.13.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[kibana] [vega] Fix broken help link on text editor
8 participants