Skip to content

Conversation

Mpdreamz
Copy link
Member

Introduced a _declaredRepositories field in CrossLinkResolver to track valid repositories explicitly. Updated logic to validate cross-links against declared repositories and handle errors or missing links more gracefully. Extended tests to ensure correctness and consistency with declared repository functionality.

This allows us to temporarily allow cross links to repositories that do not publish a links.json file.

With this PR we only validate:

  • docs-content links completely

For all other repositories we only validate that they are declared in docset.yml

Introduced a `_declaredRepositories` field in `CrossLinkResolver` to track valid repositories explicitly. Updated logic to validate cross-links against declared repositories and handle errors or missing links more gracefully. Extended tests to ensure correctness and consistency with declared repository functionality.

This allows us to temporarily allow cross links to repositories that do not publish a links.json file.

With this PR we only validate:

- docs-content links completely

For all other repositories we only validate that they are declared in docset.yml
Copy link
Member

@reakaleek reakaleek left a comment

Choose a reason for hiding this comment

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

Wondering if can do it a bit "dynamic" for now.

e.g.:

check if `elastic-docs-v3-preview.elastic.dev/path/to/index.html` exists

if exists:
  do the validation
else
  do a warning

This logic could be removed later, when all repositories are onboarded

@Mpdreamz
Copy link
Member Author

I don't think its a good idea to do an http call foreach of these.

If all goes well reference content gets put into their respective repositories after the 20th and we setup the preview/publish links for all of them the week after.

We only need to run in this partial mode 2 weeks.

After that I'll make cross links to docs-content errors if not correct and others warnings while we (the docs-team) address all of them.

cc @bmorelli25 @KOTungseth ^ plan for crosslinks.

@Mpdreamz Mpdreamz merged commit 3dbf8e9 into main Feb 14, 2025
7 checks passed
@Mpdreamz Mpdreamz deleted the feature/cross-link-leniency branch February 14, 2025 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants