-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[App Search] Version documentation links #83245
Conversation
- Was previously just sending (e.g.) "7". instead of "7.9"
- follow WS's example
- except for Enterprise Search setup guide, which should be updated to use a shared URL at some point in any case
@@ -8,4 +8,4 @@ import { SemVer } from 'semver'; | |||
import pkg from '../../../../package.json'; | |||
|
|||
export const CURRENT_VERSION = new SemVer(pkg.version as string); | |||
export const CURRENT_MAJOR_VERSION = CURRENT_VERSION.major; | |||
export const CURRENT_MAJOR_VERSION = `${CURRENT_VERSION.major}.${CURRENT_VERSION.minor}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@scottybollinger FYI - links using this const for URLs were previously faulty. They were generating links that looked like
https://www.elastic.co/guide/en/app-search/7/
instead of
https://www.elastic.co/guide/en/app-search/7.9/
I should have fixed it here but let me know if you see any issues.
Also the var name is technically not correct now so IDK if we should change it lol. Is CURRENT_MAJOR_MINOR_VERSION
too verbose? Maybe we should do CURRENT_FULL_VERSION
and CURRENT_VERSION
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will just leave this var name for now but let me know if you want to change this and I'll open a new PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call.
* master: [Ingest Manager] Lift up registry/{stream,extract} functions (elastic#83239) [Reporting] Move "common" types and constants to allow cross-plugin integration (elastic#83198) [Lens] Add suffix formatter (elastic#82852) [App Search] Version documentation links (elastic#83245) Use saved object references for dashboard drilldowns (elastic#82602) Btsymbala/registered av (elastic#81910) [APM] Errors table for service overview (elastic#83065)
* Fix CURRENT_MAJOR_VERSION for use in Elastic docs links - Was previously just sending (e.g.) "7". instead of "7.9" * Add App Search DOCS_PREFIX constant - follow WS's example * Update all App Search doc links to use prefixed URLs - except for Enterprise Search setup guide, which should be updated to use a shared URL at some point in any case
Summary
Adds a DRY version prefix to our outgoing App Search documentation URLs. I believe @chriscressman noted that we should be versioning our doc URLs going forward (instead of using
current
) so that older users land up on the correct docs and don't get dead links.Workplace Search is currently already doing this, so we're just catching up/copying them 🐒
QA
8.0
in the URL for7.9
or7.10
and get a working doc page.