Verify page accessibility for removed/renamed docs in preview comments#18972
Verify page accessibility for removed/renamed docs in preview comments#18972
Conversation
|
@Copilot Thank you for the contribution! Could you fix the following issue(s)? ⚠ Invalid PR templateThis PR does not appear to have been filed using the MLflow PR template. Please copy the PR template from here and fill it out. |
- Add isUrlAccessible helper function to check page accessibility using fetch - Update getCommentTemplate to accept isAccessible property for each page - Check accessibility for removed/renamed pages during preview generation - Display ✅ when redirect exists (200 or 3xx response) - Display ❌ when redirect is missing (404 or other errors) - Display⚠️ as fallback when accessibility check fails Co-authored-by: harupy <17039389+harupy@users.noreply.github.com>
Co-authored-by: harupy <17039389+harupy@users.noreply.github.com>
|
/review ✅ Review completed. Review OutputReview CompleteI've reviewed PR #18972 "Verify page accessibility for removed/renamed docs in preview comments" and found 1 issue: Issue found:
I've added a review comment with a suggestion to fix the JSDoc to accurately reflect the actual return type. The rest of the implementation looks good - the error handling logic correctly uses the three-state pattern (true/false/undefined) throughout the code. |
There was a problem hiding this comment.
Pull request overview
This PR enhances the documentation preview workflow by adding runtime verification of removed/renamed documentation pages. The script now checks if redirects exist for removed/renamed pages and displays clear status indicators in PR comments.
Key Changes:
- Added
isUrlAccessible()helper function to verify page accessibility using native fetch API - Modified page processing to check accessibility for removed/renamed pages
- Updated comment template to display status indicators (✅ redirect exists, ❌ add a redirect,
⚠️ failed to check)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@copilot address #18972 (comment) |
The function can return undefined when an error occurs, so the return type documentation should reflect Promise<boolean|undefined> instead of just Promise<boolean>. Co-authored-by: harupy <17039389+harupy@users.noreply.github.com>
Updated in 63b9ae5. The JSDoc now correctly reflects that the function can return |
mlflow#18972) Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: harupy <17039389+harupy@users.noreply.github.com> Signed-off-by: Tian Lan <sky.blue266000@gmail.com>
Related Issues/PRs
#xxx
What changes are proposed in this pull request?
Added runtime verification of removed/renamed documentation pages in preview comment workflow. The script now fetches each removed/renamed page to check if redirects exist, displaying clear status indicators:
redirect exists- Page returns 200 or 3xx (redirect configured)add a redirect- Page returns 404 (redirect missing)failed to check- Accessibility check failed (network error or other exception)Example output:
How is this PR tested?
Tested with mock scenarios covering:
failed to checkwith error loggingDoes this PR require documentation update?
Release Notes
Is this a user-facing change?
What component(s), interfaces, languages, and integrations does this PR affect?
Components
area/tracking: Tracking Service, tracking client APIs, autologgingarea/models: MLmodel format, model serialization/deserialization, flavorsarea/model-registry: Model Registry service, APIs, and the fluent client calls for Model Registryarea/scoring: MLflow Model server, model deployment tools, Spark UDFsarea/evaluation: MLflow model evaluation features, evaluation metrics, and evaluation workflowsarea/gateway: MLflow AI Gateway client APIs, server, and third-party integrationsarea/prompts: MLflow prompt engineering features, prompt templates, and prompt managementarea/tracing: MLflow Tracing features, tracing APIs, and LLM tracing functionalityarea/projects: MLproject format, project running backendsarea/uiux: Front-end, user experience, plotting, JavaScript, JavaScript dev serverarea/build: Build and test infrastructure for MLflowarea/docs: MLflow documentation pagesHow should the PR be classified in the release notes? Choose one:
rn/none- No description will be included. The PR will be mentioned only by the PR number in the "Small Bugfixes and Documentation Updates" sectionrn/breaking-change- The PR will be mentioned in the "Breaking Changes" sectionrn/feature- A new user-facing feature worth mentioning in the release notesrn/bug-fix- A user-facing bug fix worth mentioning in the release notesrn/documentation- A user-facing documentation change worth mentioning in the release notesShould this PR be included in the next patch release?
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.