Skip to content

Conversation

leemthompo
Copy link
Contributor

@leemthompo leemthompo commented Mar 13, 2025

Closes #124040

TODO

Dev

  • Update ReferenceDocs.java logic to handle version[ing/less] based on new URL structures outlined here
    • Liam only updated the baseURL
  • Remove @UpdateForV9(owner = UpdateForV9.Owner.DOCS)

Docs

  • Carefully check Liam didn't do anything silly in the new paths
  • Decide how we handle new API docs which don't have fragment ID content anymore
  • Confirm the paths for bootstrap-checks* pages (in-flight )

@leemthompo leemthompo self-assigned this Mar 13, 2025
@leemthompo leemthompo added >docs General docs changes auto-backport Automatically create backport pull requests when merged v9.0.0 labels Mar 13, 2025
@elasticsearchmachine elasticsearchmachine added Team:Docs Meta label for docs team v9.1.0 labels Mar 13, 2025
@elasticsearchmachine
Copy link
Collaborator

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

@leemthompo leemthompo changed the title Reference docs v9 [DOCS] Update hardcoded reference doc links URLs for v9 Mar 13, 2025
@Override
public String toString() {
return "https://www.elastic.co/guide/en/elasticsearch/reference/" + VERSION_COMPONENT + "/" + linksBySymbol.get(name());
return "https://www.elastic.co/docs/" + VERSION_COMPONENT + "/" + linksBySymbol.get(name());
Copy link
Contributor

Choose a reason for hiding this comment

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

Since the URLs are handled differently for API docs and other docs, could we instead just pass in the info like this (and not use it in the API links)?

   return linksBySymbol.get(name(VERSION_COMPONENT));

Or alternatively, not pass in the VERSION_COMPONENT at all and just have the full URL in the *.txt file, akin to what we're doing in the Elasticsearch specification repo in https://github.com/elastic/elasticsearch-specification/blob/main/specification/_doc_ids/table.csv?

@leemthompo
Copy link
Contributor Author

ℹ️ I've checked that all the URLs work against the current docs v3 previews from docs-content and elasticsearch repos and v8 API docs.

Validate preview URLs

=== VALID URLS ===

INITIAL_MASTER_NODES: https://docs-v3-preview.elastic.dev/elastic/docs-content/tree/main/deploy-manage/deploy/self-managed/important-settings-configuration#initial_master_nodes - 200
DISCOVERY_TROUBLESHOOTING: https://docs-v3-preview.elastic.dev/elastic/docs-content/tree/main/troubleshoot/elasticsearch/discovery-troubleshooting - 200
UNSTABLE_CLUSTER_TROUBLESHOOTING: https://docs-v3-preview.elastic.dev/elastic/docs-content/tree/main/troubleshoot/elasticsearch/troubleshooting-unstable-cluster - 200
LAGGING_NODE_TROUBLESHOOTING: https://docs-v3-preview.elastic.dev/elastic/docs-content/tree/main/troubleshoot/elasticsearch/troubleshooting-unstable-cluster#troubleshooting-unstable-cluster-lagging - 200
SHARD_LOCK_TROUBLESHOOTING: https://docs-v3-preview.elastic.dev/elastic/docs-content/tree/main/troubleshoot/elasticsearch/troubleshooting-unstable-cluster#troubleshooting-unstable-cluster-shardlockobtainfailedexception - 200
NETWORK_DISCONNECT_TROUBLESHOOTING: https://docs-v3-preview.elastic.dev/elastic/docs-content/tree/main/troubleshoot/elasticsearch/troubleshooting-unstable-cluster#troubleshooting-unstable-cluster-network - 200
CONCURRENT_REPOSITORY_WRITERS: https://docs-v3-preview.elastic.dev/elastic/docs-content/tree/main/troubleshoot/elasticsearch/diagnosing-corrupted-repositories - 200
ARCHIVE_INDICES: https://docs-v3-preview.elastic.dev/elastic/docs-content/tree/main/deploy-manage/upgrade/deployment-or-cluster/reading-indices-from-older-elasticsearch-versions - 200
HTTP_TRACER: https://docs-v3-preview.elastic.dev/elastic/elasticsearch/tree/main/reference/elasticsearch/configuration-reference/networking-settings#http-rest-request-tracer - 200
LOGGING: https://docs-v3-preview.elastic.dev/elastic/docs-content/tree/main/deploy-manage/monitor/logging-configuration/elasticsearch-deprecation-logs - 200
BOOTSTRAP_CHECK_HEAP_SIZE: https://docs-v3-preview.elastic.dev/elastic/docs-content/tree/main/deploy-manage/deploy/self-managed/bootstrap-checks#heap-size - 200
BOOTSTRAP_CHECK_FILE_DESCRIPTOR: https://docs-v3-preview.elastic.dev/elastic/docs-content/tree/main/deploy-manage/deploy/self-managed/bootstrap-checks#bootstrap-checks-file-descriptor - 200
BOOTSTRAP_CHECK_MEMORY_LOCK: https://docs-v3-preview.elastic.dev/elastic/docs-content/tree/main/deploy-manage/deploy/self-managed/bootstrap-checks#bootstrap-checks-memory-lock - 200
BOOTSTRAP_CHECK_MAX_NUMBER_THREADS: https://docs-v3-preview.elastic.dev/elastic/docs-content/tree/main/deploy-manage/deploy/self-managed/bootstrap-checks#max-number-threads-check - 200
BOOTSTRAP_CHECK_MAX_FILE_SIZE: https://docs-v3-preview.elastic.dev/elastic/docs-content/tree/main/deploy-manage/deploy/self-managed/bootstrap-checks#bootstrap-checks-max-file-size - 200
BOOTSTRAP_CHECK_MAX_SIZE_VIRTUAL_MEMORY: https://docs-v3-preview.elastic.dev/elastic/docs-content/tree/main/deploy-manage/deploy/self-managed/bootstrap-checks#max-size-virtual-memory-check - 200
BOOTSTRAP_CHECK_MAXIMUM_MAP_COUNT: https://docs-v3-preview.elastic.dev/elastic/docs-content/tree/main/deploy-manage/deploy/self-managed/bootstrap-checks#bootstrap-checks-max-map-count - 200
BOOTSTRAP_CHECK_CLIENT_JVM: https://docs-v3-preview.elastic.dev/elastic/docs-content/tree/main/deploy-manage/deploy/self-managed/bootstrap-checks#bootstrap-checks-client-jvm - 200
BOOTSTRAP_CHECK_USE_SERIAL_COLLECTOR: https://docs-v3-preview.elastic.dev/elastic/docs-content/tree/main/deploy-manage/deploy/self-managed/bootstrap-checks#bootstrap-checks-serial-collector - 200
BOOTSTRAP_CHECK_SYSTEM_CALL_FILTER: https://docs-v3-preview.elastic.dev/elastic/docs-content/tree/main/deploy-manage/deploy/self-managed/bootstrap-checks#bootstrap-checks-syscall-filter - 200
BOOTSTRAP_CHECK_ONERROR_AND_ONOUTOFMEMORYERROR: https://docs-v3-preview.elastic.dev/elastic/docs-content/tree/main/deploy-manage/deploy/self-managed/bootstrap-checks#bootstrap-checks-onerror - 200
BOOTSTRAP_CHECK_EARLY_ACCESS: https://docs-v3-preview.elastic.dev/elastic/docs-content/tree/main/deploy-manage/deploy/self-managed/bootstrap-checks#bootstrap-checks-early-access - 200
BOOTSTRAP_CHECK_ALL_PERMISSION: https://docs-v3-preview.elastic.dev/elastic/docs-content/tree/main/deploy-manage/deploy/self-managed/bootstrap-checks#bootstrap-checks-all-permission - 200
BOOTSTRAP_CHECK_DISCOVERY_CONFIGURATION: https://docs-v3-preview.elastic.dev/elastic/docs-content/tree/main/deploy-manage/deploy/self-managed/bootstrap-checks#bootstrap-checks-discovery-configuration - 200
BOOTSTRAP_CHECKS: https://docs-v3-preview.elastic.dev/elastic/docs-content/tree/main/deploy-manage/deploy/self-managed/bootstrap-checks - 200
BOOTSTRAP_CHECK_ENCRYPT_SENSITIVE_DATA: https://docs-v3-preview.elastic.dev/elastic/docs-content/tree/main/deploy-manage/deploy/self-managed/bootstrap-checks#bootstrap-checks-xpack-encrypt-sensitive-data - 200
BOOTSTRAP_CHECK_PKI_REALM: https://docs-v3-preview.elastic.dev/elastic/docs-content/tree/main/deploy-manage/deploy/self-managed/bootstrap-checks#bootstrap-checks-xpack-pki-realm - 200
BOOTSTRAP_CHECK_ROLE_MAPPINGS: https://docs-v3-preview.elastic.dev/elastic/docs-content/tree/main/deploy-manage/deploy/self-managed/bootstrap-checks#bootstrap-checks-xpack-role-mappings - 200
BOOTSTRAP_CHECK_TLS: https://docs-v3-preview.elastic.dev/elastic/docs-content/tree/main/deploy-manage/deploy/self-managed/bootstrap-checks#bootstrap-checks-tls - 200
BOOTSTRAP_CHECK_TOKEN_SSL: https://docs-v3-preview.elastic.dev/elastic/docs-content/tree/main/deploy-manage/deploy/self-managed/bootstrap-checks#bootstrap-checks-xpack-token-ssl - 200
CONTACT_SUPPORT: https://docs-v3-preview.elastic.dev/elastic/docs-content/tree/main/troubleshoot#contact-us - 200
UNASSIGNED_SHARDS: https://docs-v3-preview.elastic.dev/elastic/docs-content/tree/main/troubleshoot/elasticsearch/red-yellow-cluster-status - 200
EXECUTABLE_JNA_TMPDIR: https://docs-v3-preview.elastic.dev/elastic/docs-content/tree/main/deploy-manage/deploy/self-managed/executable-jna-tmpdir - 200
NETWORK_THREADING_MODEL: https://docs-v3-preview.elastic.dev/elastic/elasticsearch/tree/main/reference/elasticsearch/configuration-reference/networking-settings#modules-network-threading-model - 200
ALLOCATION_EXPLAIN_API: https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-cluster-allocation-explain - 200
NETWORK_BINDING_AND_PUBLISHING: https://docs-v3-preview.elastic.dev/elastic/elasticsearch/tree/main/reference/elasticsearch/configuration-reference/networking-settings#modules-network-binding-publishing - 200
SNAPSHOT_REPOSITORY_ANALYSIS: https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-snapshot-repository-analyze - 200
S3_COMPATIBLE_REPOSITORIES: https://docs-v3-preview.elastic.dev/elastic/docs-content/tree/main/deploy-manage/tools/snapshot-and-restore/s3-repository#repository-s3-compatible-services - 200
LUCENE_MAX_DOCS_LIMIT: https://docs-v3-preview.elastic.dev/elastic/docs-content/tree/main/deploy-manage/production-guidance/optimize-performance/size-shards#troubleshooting-max-docs-limit - 200
MAX_SHARDS_PER_NODE: https://docs-v3-preview.elastic.dev/elastic/docs-content/tree/main/deploy-manage/production-guidance/optimize-performance/size-shards#troubleshooting-max-shards-open - 200
FLOOD_STAGE_WATERMARK: https://docs-v3-preview.elastic.dev/elastic/docs-content/tree/main/troubleshoot/elasticsearch/fix-watermark-errors - 200
X_OPAQUE_ID: https://docs-v3-preview.elastic.dev/elastic/elasticsearch/tree/main/reference/elasticsearch/rest-apis/api-conventions#x-opaque-id - 200
FORMING_SINGLE_NODE_CLUSTERS: https://docs-v3-preview.elastic.dev/elastic/docs-content/tree/main/deploy-manage/distributed-architecture/discovery-cluster-formation/modules-discovery-bootstrap-cluster#modules-discovery-bootstrap-cluster-joining - 200
CIRCUIT_BREAKER_ERRORS: https://docs-v3-preview.elastic.dev/elastic/docs-content/tree/main/troubleshoot/elasticsearch/circuit-breaker-errors - 200
ALLOCATION_EXPLAIN_NO_COPIES: https://docs-v3-preview.elastic.dev/elastic/docs-content/tree/main/troubleshoot/elasticsearch/diagnose-unassigned-shards#no-shard-copy - 200
ALLOCATION_EXPLAIN_MAX_RETRY: https://docs-v3-preview.elastic.dev/elastic/docs-content/tree/main/troubleshoot/elasticsearch/diagnose-unassigned-shards#maximum-retries-exceeded - 200
SECURE_SETTINGS: https://docs-v3-preview.elastic.dev/elastic/docs-content/tree/main/deploy-manage/security/secure-settings - 200
CLUSTER_SHARD_LIMIT: https://docs-v3-preview.elastic.dev/elastic/elasticsearch/tree/main/reference/elasticsearch/configuration-reference/miscellaneous-cluster-settings#cluster-shard-limit - 200

=== INVALID URLS ===

@leemthompo
Copy link
Contributor Author

Thanks @lcawl!

Just to summarize: once Lisa's two in-flight PRs get merged, we have the following two API ref links to decide upon:

Copy link
Contributor

@mosche mosche left a comment

Choose a reason for hiding this comment

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

thanks @DaveCTurner, lgtm, just an optional comment

@leemthompo
Copy link
Contributor Author

leemthompo commented Mar 17, 2025

@shainaraskas the anchors in the bootstrap Checks section don't really work because we're using dropdowns (and $$$bootstrap-checks-foo$$$ syntax)

For example: https://docs-v3-preview.elastic.dev/elastic/docs-content/tree/main/deploy-manage/deploy/self-managed/bootstrap-checks#bootstrap-checks-tls

Maybe we'd want to use H3s with the custom anchors instead? LMKWYT

Edit: this is a bug on safari/firefox, works fine on chrome

@lcawl
Copy link
Contributor

lcawl commented Mar 18, 2025

Just to summarize: once Lisa's two in-flight PRs get merged, we have the following two API ref links to decide upon:

  • ALLOCATION_EXPLAIN_API

That URL seems to be used here, so IMO linking to the API is appropriate in this context: https://github.com/elastic/elasticsearch/blob/main/server/src/main/java/org/elasticsearch/action/admin/cluster/allocation/ClusterAllocationExplanation.java

  • SNAPSHOT_REPOSITORY_ANALYSIS

This one is referenced from https://github.com/elastic/elasticsearch/blob/main/modules/repository-s3/src/main/java/org/elasticsearch/repositories/s3/S3Repository.java, https://github.com/elastic/elasticsearch/blob/main/server/src/main/java/org/elasticsearch/repositories/blobstore/BlobStoreRepository.java, https://github.com/elastic/elasticsearch/blob/main/x-pack/plugin/snapshot-repo-test-kit/src/main/java/org/elasticsearch/repositories/blobstore/testkit/analyze/RepositoryAnalyzeAction.java

I think it's okay to link to the API page for now, since we copied all the information to that site. However, it feels like at some point we should link to something that more clearly explains the context of when/why you're doing this analysis, and what to do with the results. If it's something you do to check the validity of repositories before going ahead with the repository setup, then perhaps it'll end up near https://docs-v3-preview.elastic.dev/elastic/docs-content/tree/main/deploy-manage/tools/snapshot-and-restore/manage-snapshot-repositories

@leemthompo leemthompo merged commit ccd1c33 into elastic:main Mar 18, 2025
16 checks passed
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
9.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Automatically create backport pull requests when merged >docs General docs changes Team:Docs Meta label for docs team v9.0.0 v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[DOCS] Update links for new docs URLs that are hardcoded and emitted by Elasticsearch

7 participants