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

Fixed broken links (#7336) #7337

Merged
merged 9 commits into from
Jun 21, 2024
Merged

Fixed broken links (#7336) #7337

merged 9 commits into from
Jun 21, 2024

Conversation

hdhalter
Copy link
Contributor

@hdhalter hdhalter commented Jun 7, 2024

  • fixed broken links

Signed-off-by: Heather Halter [email protected]

  • Update index.md

Removed py-ml client from list since it doesn't exist i 2.3

Signed-off-by: Heather Halter [email protected]

  • Update viz-index.md

Fixed a typo

Signed-off-by: Heather Halter [email protected]

  • Update docker.md

Fixed typo

Signed-off-by: Heather Halter [email protected]


Signed-off-by: Heather Halter [email protected]
Signed-off-by: Heather Halter [email protected]
Co-authored-by: Heather Halter [email protected]
(cherry picked from commit fa00dbe)

Description

Describe what this change achieves.

Issues Resolved

List any issues this PR will resolve, e.g. Closes [...].

Version

List the OpenSearch version to which this PR applies, e.g. 2.14, 2.12--2.14, or all.

Checklist

  • By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and subject to the Developers Certificate of Origin.
    For more information on following Developer Certificate of Origin and signing off your commits, please check here.

* fixed broken links

Signed-off-by: Heather Halter <[email protected]>

* Update index.md

Removed py-ml client from list since it doesn't exist i 2.3

Signed-off-by: Heather Halter <[email protected]>

* Update viz-index.md

Fixed a typo

Signed-off-by: Heather Halter <[email protected]>

* Update docker.md

Fixed typo

Signed-off-by: Heather Halter <[email protected]>

---------

Signed-off-by: Heather Halter <[email protected]>
Signed-off-by: Heather Halter <[email protected]>
Co-authored-by: Heather Halter <[email protected]>
(cherry picked from commit fa00dbe)
Copy link
Collaborator

@kolchfa-aws kolchfa-aws left a comment

Choose a reason for hiding this comment

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

LGTM

@hdhalter hdhalter self-assigned this Jun 7, 2024
@peterzhuamazon
Copy link
Member

After comment out the redirect urls, there are 10 more dead links to fix:

`verify': Found 10 dead links: (RuntimeError)
https://opensearch.org/docs/latest/dashboards/maps-plugin/, linked to in ./_dashboards/visualize/viz-index.md
https://opensearch.org/docs/latest/search-plugins/knn/inswz/, linked to in ./_api-reference/script-apis/create-stored-script.md
https://opensearch.org/docs/latest/opensearch/query-dsl/full-text#multi-match, linked to in ./_opensearch/ux.md
https://opensearch.org/docs/latest/tools/index/, linked to in ./_about/quickstart.md
https://opensearch.org/docs/latest/tools/logstash/index/, linked to in ./_clients/logstash/index.md, ./_clients/logstash/read-from-opensearch.md
https://opensearch.org/docs/latest/tools/logstash/index#install-logstash, linked to in ./_clients/logstash/ship-to-opensearch.md
https://opensearch.org/docs/latest/dashboards/get-started/quickstart-dashboards/, linked to in ./_install-and-configure/upgrade-opensearch/appendix/rolling-upgrade-lab.md, ./_dashboards/discover/index-discover.md, ./_observing-your-data/log-ingestion.md, ./_about/quickstart.md
https://opensearch.org/docs/latest/opensearch/snapshots/snapshot-restore/#security-plugin-considerations, linked to in ./_tuning-your-cluster/availability-and-recovery/snapshots/sm-api.md
https://opensearch.org/docs/latest/tools/index/#compatibility-matrices, linked to in ./_install-and-configure/upgrade-opensearch/index.md
https://opensearch.org/docs/latest/opensearch/query-dsl/full-text#advanced-filter-options, linked to in ./_opensearch/ux.md

@peterzhuamazon
Copy link
Member

Just to add context why those two redirect are commented out:


LinkChecker: [Info] Checking /clients/java-rest-high-level
                    ------------------------------------------------
      Jekyll 4.3.3   Please append `--trace` to the `build` command
                     for any additional information or backtrace.
                    ------------------------------------------------
/opt/homebrew/lib/ruby/gems/3.2.0/gems/jekyll-4.3.3/lib/jekyll/stevenson.rb:7:in `block in initialize': stack level too deep (SystemStackError)
	from /opt/homebrew/Cellar/[email protected]/3.2.4/lib/ruby/3.2.0/logger.rb:743:in `format_message'
	from /opt/homebrew/lib/ruby/gems/3.2.0/gems/jekyll-4.3.3/lib/jekyll/stevenson.rb:28:in `add'
	from /opt/homebrew/Cellar/[email protected]/3.2.4/lib/ruby/3.2.0/logger.rb:695:in `info'
	from /opt/homebrew/lib/ruby/gems/3.2.0/gems/jekyll-4.3.3/lib/jekyll/log_adapter.rb:148:in `public_send'
	from /opt/homebrew/lib/ruby/gems/3.2.0/gems/jekyll-4.3.3/lib/jekyll/log_adapter.rb:148:in `write'
	from /opt/homebrew/lib/ruby/gems/3.2.0/gems/jekyll-4.3.3/lib/jekyll/log_adapter.rb:66:in `info'
	from /Users/zhujiaxi/amazonworks/sourcecodes/opensearch-project/documentation-website/_plugins/link-checker.rb:249:in `check_internal'
	from /Users/zhujiaxi/amazonworks/sourcecodes/opensearch-project/documentation-website/_plugins/link-checker.rb:228:in `check'
	 ... 7485 levels...
	from /opt/homebrew/lib/ruby/gems/3.2.0/gems/bundler-2.2.23/lib/bundler/friendly_errors.rb:128:in `with_friendly_errors'
	from /opt/homebrew/lib/ruby/gems/3.2.0/gems/bundler-2.2.23/exe/bundle:37:in `<top (required)>'
	from /opt/homebrew/opt/[email protected]/bin/bundle:25:in `load'
	from /opt/homebrew/opt/[email protected]/bin/bundle:25:in `<main>'

_clients/java.md Outdated Show resolved Hide resolved
Signed-off-by: kolchfa-aws <[email protected]>
@dblock
Copy link
Member

dblock commented Jun 21, 2024

The link checker is failing because in _about/breaking-changes.md there's a link to java-rest-high-level.md which has a redirect_to: https://opensearch.org/docs/latest/clients/java-rest-high-level/, which is a redirect to itself if you deploy this code to latest. The reason why the other such redirects aren't a problem is because nothing links to these pages, so the links don't get checked.

The quickest workaround is to remove the link in _about/breaking-changes.md.

I found which page was linking to this by making a change in the link checker log as well. You should probably make it in your main for the next problem.

--- a/_plugins/link-checker.rb
+++ b/_plugins/link-checker.rb
@@ -246,7 +246,7 @@ module Jekyll::LinkChecker
   # Check if an internal link is accessible
 
   def self.check_internal(url, location)
-    Jekyll.logger.info "LinkChecker: [Info] Checking #{url}".cyan
+    Jekyll.logger.info "LinkChecker: [Info] Checking #{url} (#{location})".cyan
     return true if @ignored_paths =~ url

kolchfa-aws and others added 2 commits June 21, 2024 11:36
Signed-off-by: Fanit Kolchina <[email protected]>
Signed-off-by: kolchfa-aws <[email protected]>
Signed-off-by: Fanit Kolchina <[email protected]>
Signed-off-by: Fanit Kolchina <[email protected]>
Signed-off-by: Fanit Kolchina <[email protected]>
@kolchfa-aws kolchfa-aws merged commit 8633db1 into 2.2 Jun 21, 2024
4 checks passed
@kolchfa-aws kolchfa-aws added backport 2.0 PR: Backport label for v2.0.x backport 2.1 PR: Backport label for 2.1 labels Jun 21, 2024
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.1 failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/backport-2.1 2.1
# Navigate to the new working tree
pushd ../.worktrees/backport-2.1
# Create a new branch
git switch --create backport/backport-7337-to-2.1
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 8633db1d0ad79a1f7827f5a871959d094bb31dfb
# Push it to GitHub
git push --set-upstream origin backport/backport-7337-to-2.1
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/backport-2.1

Then, create a pull request where the base branch is 2.1 and the compare/head branch is backport/backport-7337-to-2.1.

@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.0 failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/backport-2.0 2.0
# Navigate to the new working tree
pushd ../.worktrees/backport-2.0
# Create a new branch
git switch --create backport/backport-7337-to-2.0
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 8633db1d0ad79a1f7827f5a871959d094bb31dfb
# Push it to GitHub
git push --set-upstream origin backport/backport-7337-to-2.0
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/backport-2.0

Then, create a pull request where the base branch is 2.0 and the compare/head branch is backport/backport-7337-to-2.0.

@kolchfa-aws kolchfa-aws deleted the backport/backport-7336-to-2.2 branch August 15, 2024 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.0 PR: Backport label for v2.0.x backport 2.1 PR: Backport label for 2.1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants