-
Notifications
You must be signed in to change notification settings - Fork 181
[DOC] Add legacy ppl/index.rst for backwards compatibility #5026
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
[DOC] Add legacy ppl/index.rst for backwards compatibility #5026
Conversation
Signed-off-by: Kyle Hounslow <[email protected]>
📝 WalkthroughWalkthroughDocumentation note added to Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Comment |
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.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In @docs/user/ppl/index.rst:
- Around line 1-2: The RST file has a mismatched section underline: the heading
"⚠️ PAGE HAS MOVED TO `index.md <index.md>`__ ⚠️" is 47 characters but the
underline on the next line is only 14 characters, which breaks reStructuredText
rules; fix by replacing the short underline with a sequence of '=' characters
matching the heading length (or make the underline at least as long as the
heading) so the underline length equals the heading length, or alternatively
replace this RST redirect with a proper Sphinx redirect using
sphinx.ext.redirects if preferred.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
docs/user/ppl/index.rst
🧰 Additional context used
📓 Path-based instructions (1)
docs/**/*.rst
⚙️ CodeRabbit configuration file
docs/**/*.rst: - Verify examples use valid test data and indices
- Check documentation follows existing patterns and structure
- Validate syntax examples are complete and correct
- Ensure code examples are tested and working
- Check for consistent formatting and style
Files:
docs/user/ppl/index.rst
🧠 Learnings (1)
📓 Common learnings
Learnt from: CR
Repo: opensearch-project/sql PR: 0
File: .rules/REVIEW_GUIDELINES.md:0-0
Timestamp: 2025-12-02T17:27:55.938Z
Learning: For PPL command PRs, refer docs/dev/ppl-commands.md and verify the PR satisfies the checklist
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (27)
- GitHub Check: security-it-linux (25)
- GitHub Check: security-it-linux (21)
- GitHub Check: bwc-tests-rolling-upgrade (25)
- GitHub Check: build-linux (25, integration)
- GitHub Check: build-linux (25, doc)
- GitHub Check: build-linux (25, unit)
- GitHub Check: build-linux (21, doc)
- GitHub Check: bwc-tests-full-restart (25)
- GitHub Check: build-linux (21, unit)
- GitHub Check: build-linux (21, integration)
- GitHub Check: bwc-tests-rolling-upgrade (21)
- GitHub Check: bwc-tests-full-restart (21)
- GitHub Check: security-it-windows-macos (windows-latest, 21)
- GitHub Check: security-it-windows-macos (macos-14, 25)
- GitHub Check: build-windows-macos (windows-latest, 25, -PbuildPlatform=windows, unit)
- GitHub Check: build-windows-macos (macos-14, 25, unit)
- GitHub Check: security-it-windows-macos (macos-14, 21)
- GitHub Check: build-windows-macos (macos-14, 25, integration)
- GitHub Check: build-windows-macos (macos-14, 21, unit)
- GitHub Check: build-windows-macos (macos-14, 25, doc)
- GitHub Check: build-windows-macos (macos-14, 21, doc)
- GitHub Check: security-it-windows-macos (windows-latest, 25)
- GitHub Check: build-windows-macos (macos-14, 21, integration)
- GitHub Check: build-windows-macos (windows-latest, 25, -PbuildPlatform=windows, integration)
- GitHub Check: build-windows-macos (windows-latest, 21, -PbuildPlatform=windows, unit)
- GitHub Check: build-windows-macos (windows-latest, 21, -PbuildPlatform=windows, integration)
- GitHub Check: CodeQL-Scan (java)
| ⚠️ PAGE HAS MOVED TO `index.md <index.md>`__ ⚠️ | ||
| ============== |
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.
🧩 Analysis chain
🏁 Script executed:
# First, let's examine the actual file and its context
cat -n docs/user/ppl/index.rst 2>/dev/null || echo "File not found"Repository: opensearch-project/sql
Length of output: 142
🏁 Script executed:
# Check the directory structure to understand the context
ls -la docs/user/ppl/ 2>/dev/null || echo "Directory not found"Repository: opensearch-project/sql
Length of output: 818
🏁 Script executed:
# Search for similar redirect patterns in the documentation
find docs -name "*.rst" -type f | xargs grep -l "PAGE HAS MOVED\|moved to" 2>/dev/null | head -10Repository: opensearch-project/sql
Length of output: 89
🏁 Script executed:
# Check project configuration for sphinx extensions
find . -maxdepth 2 -name "conf.py" -o -name "setup.py" -o -name "pyproject.toml" | xargs grep -l "sphinx.ext.redirects\|extensions" 2>/dev/null | head -5Repository: opensearch-project/sql
Length of output: 48
🏁 Script executed:
# Count characters in the heading text to verify the claim
python3 <<'EOF'
import unicodedata
heading = "⚠️ PAGE HAS MOVED TO `index.md <index.md>`__ ⚠️"
# Count visible characters vs total characters
char_count = len(heading)
visual_width = sum(2 if unicodedata.east_asian_width(c) in ('W', 'F') else 1 for c in heading)
print(f"Total characters: {char_count}")
print(f"Visual width estimate: {visual_width}")
print(f"Underline length in review: 14")
print(f"Difference: {char_count - 14}")
EOFRepository: opensearch-project/sql
Length of output: 152
🏁 Script executed:
# Find sphinx or build configuration
find . -maxdepth 3 -type f \( -name "conf.py" -o -name "sphinx.yml" -o -name ".github" -o -name "Makefile" \) | head -20Repository: opensearch-project/sql
Length of output: 48
🏁 Script executed:
# Check if there's any build configuration mentioning .rst or docs
find . -maxdepth 2 -type f \( -name "*.yml" -o -name "*.yaml" -o -name "Makefile" -o -name "tox.ini" \) | xargs grep -l "sphinx\|rst\|docs" 2>/dev/null | head -10Repository: opensearch-project/sql
Length of output: 84
🏁 Script executed:
# Check if there are any references to this file or index.rst in the codebase
rg "index\.rst|ppl/index" --type-list | head -5Repository: opensearch-project/sql
Length of output: 455
🏁 Script executed:
# Verify RST underline requirements with a test - check if RST docs mention emoji handling
rg -i "emoji|unicode|underline.*width" docs/ --type md --type rst 2>/dev/null | head -10Repository: opensearch-project/sql
Length of output: 474
🏁 Script executed:
# Check the index.md file to understand the target
head -20 docs/user/ppl/index.mdRepository: opensearch-project/sql
Length of output: 2119
🏁 Script executed:
# Let me check if there's any Sphinx/RST build configuration
find . -type f -name "conf.py" | head -5Repository: opensearch-project/sql
Length of output: 48
🏁 Script executed:
# Check if there are any documentation build scripts or CI that might process .rst files
find . -type f \( -name "*.sh" -o -name "*.yml" -o -name "*.yaml" \) | xargs grep -l "sphinx\|rst\|\.rst\|build.*doc" 2>/dev/null | head -10Repository: opensearch-project/sql
Length of output: 784
🏁 Script executed:
# Check the actual repository structure for documentation builds
ls -la docs/ | head -20Repository: opensearch-project/sql
Length of output: 481
🏁 Script executed:
# Verify the character count more precisely
python3 <<'EOF'
heading = "⚠️ PAGE HAS MOVED TO `index.md <index.md>`__ ⚠️"
underline = "=============="
print(f"Heading: {repr(heading)}")
print(f"Heading length: {len(heading)} characters")
print(f"Underline: {repr(underline)}")
print(f"Underline length: {len(underline)} characters")
print(f"Mismatch: {len(heading) - len(underline)} characters")
EOFRepository: opensearch-project/sql
Length of output: 238
🏁 Script executed:
# Check if this .rst file is referenced anywhere in the codebase or build configs
rg "ppl.*index|index.*rst" . --type yaml --type json --type md 2>/dev/null | head -10Repository: opensearch-project/sql
Length of output: 13249
🏁 Script executed:
# Check if there's any documentation build process that would parse .rst files
cat .coderabbit.yaml | grep -A 20 -B 5 "doc\|rst\|sphinx" 2>/dev/null | head -30Repository: opensearch-project/sql
Length of output: 1827
🏁 Script executed:
# Check git history to understand the purpose of this file
git log --oneline docs/user/ppl/index.rst 2>/dev/null | head -10Repository: opensearch-project/sql
Length of output: 134
🏁 Script executed:
# Check if there are any Markdown-based site generators configured
find . -maxdepth 2 -type f \( -name "mkdocs.yml" -o -name "docusaurus.config.js" -o -name "*.config.js" -o -name "*.config.ts" \) 2>/dev/nullRepository: opensearch-project/sql
Length of output: 48
🏁 Script executed:
# Look at other directories to see if there are any .rst files used elsewhere
find docs -name "*.rst" -type fRepository: opensearch-project/sql
Length of output: 771
🏁 Script executed:
# Check the README or any documentation about the documentation structure
head -50 README.md docs/README.md 2>/dev/null | head -50Repository: opensearch-project/sql
Length of output: 2902
🏁 Script executed:
# Let me verify RST syntax rules by checking if there's any Sphinx configuration
find . -name "conf.py" -type f 2>/dev/null | head -5Repository: opensearch-project/sql
Length of output: 48
🏁 Script executed:
# Check what Sphinx version or doc tool is used
find . -maxdepth 2 -type f \( -name "requirements*.txt" -o -name "setup.py" -o -name "pyproject.toml" \) | xargs grep -i "sphinx\|docutils" 2>/dev/null | head -10Repository: opensearch-project/sql
Length of output: 48
🏁 Script executed:
# Verify the RST specification for section markers
python3 <<'EOF'
# RST specification: underline must be >= length of text
# Let me verify what standard RST parsers would say
heading = "⚠️ PAGE HAS MOVED TO `index.md <index.md>`__ ⚠️"
underline = "=============="
print("RST Syntax Verification:")
print(f"Heading text: {repr(heading)}")
print(f"Heading length (characters): {len(heading)}")
print(f"Underline: {repr(underline)}")
print(f"Underline length (characters): {len(underline)}")
print()
if len(underline) >= len(heading):
print("✓ VALID: Underline length >= heading length")
else:
print("✗ INVALID: Underline length < heading length")
print(f" Expected underline length: at least {len(heading)} characters")
print(f" Actual underline length: {len(underline)} characters")
print(f" Shortfall: {len(heading) - len(underline)} characters")
# Show what a correct underline would look like
correct_underline = "=" * len(heading)
print()
print(f"Corrected RST:")
print(heading)
print(correct_underline)
EOFRepository: opensearch-project/sql
Length of output: 526
Fix RST syntax error: section underline must match heading length.
The underline (line 2) is 14 characters but the heading (line 1) is 47 characters. In reStructuredText, section underlines must match or exceed the heading text length. This violates RST syntax and will cause parsing/rendering errors.
🔧 Proposed fix
⚠️ PAGE HAS MOVED TO `index.md <index.md>`__ ⚠️
-==============
+===============================================Alternatively, use Sphinx's sphinx.ext.redirects extension for more robust redirect handling.
🤖 Prompt for AI Agents
In @docs/user/ppl/index.rst around lines 1 - 2, The RST file has a mismatched
section underline: the heading "⚠️ PAGE HAS MOVED TO `index.md <index.md>`__ ⚠️"
is 47 characters but the underline on the next line is only 14 characters, which
breaks reStructuredText rules; fix by replacing the short underline with a
sequence of '=' characters matching the heading length (or make the underline at
least as long as the heading) so the underline length equals the heading length,
or alternatively replace this RST redirect with a proper Sphinx redirect using
sphinx.ext.redirects if preferred.
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.
^ doesn't matter for github rst rendering, & i don't think portability is a concern
Description
There are broken links to legacy
docs/user/ppl/index.rstfile in the AWS docs and older blog posts. This PR adds a referencedocs/user/ppl/index.rstfile with link to index.md file to support backwards compatibility.Testing
See example rendered file here: docs/user/ppl/index.rst
Check List
--signoffor-s.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.