You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "2010YOUY01 (via GitHub)" <gi...@apache.org> on 2025/07/21 10:45:02 UTC

[I] CI: Check broken links in src doc comments [datafusion]

2010YOUY01 opened a new issue, #16840:
URL: https://github.com/apache/datafusion/issues/16840

   ### Is your feature request related to a problem or challenge?
   
   https://github.com/apache/datafusion/pull/16830 fixed several invalid links in the doc comments.
   
   It would be great to setup a CI job, to check those links automatically.
   
   ### Describe the solution you'd like
   
   `cargo-deadlinks` can be helpful https://github.com/deadlinks/cargo-deadlinks
   
   ### Describe alternatives you've considered
   
   _No response_
   
   ### Additional context
   
   _No response_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [I] CI: Check broken links in src doc comments [datafusion]

Posted by "Adez017 (via GitHub)" <gi...@apache.org>.
Adez017 commented on issue #16840:
URL: https://github.com/apache/datafusion/issues/16840#issuecomment-3101266129

   hi @2010YOUY01 i would try to validate the concerned issue and find out a way 
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [I] CI: Check broken links in src doc comments [datafusion]

Posted by "Adez017 (via GitHub)" <gi...@apache.org>.
Adez017 commented on issue #16840:
URL: https://github.com/apache/datafusion/issues/16840#issuecomment-3101263663

   take
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [I] CI: Check broken links in src doc comments [datafusion]

Posted by "Adez017 (via GitHub)" <gi...@apache.org>.
Adez017 commented on issue #16840:
URL: https://github.com/apache/datafusion/issues/16840#issuecomment-3121115039

   > hey [@jcsherin](https://github.com/jcsherin) , i think we got a big work to do as of your suggestion i ran the following command : `$fd -e html -e txt -e md . target/doc | xargs lychee --github-token "$GITHUB_TOKEN" --format markdown > lychee_report.md`
   > 
   > got a big report although most of the links are cached but agian in final summary we got too many links broken . attaching the file for the reference .
   > 
   > [lychee_report.md](https://github.com/user-attachments/files/21405566/lychee_report.md)
   > 
   > also i tried to store the broken links in a text file but when opening the links individualy the links are working i gues . here is the text file also .
   > 
   > [broken_links.txt](https://github.com/user-attachments/files/21406308/broken_links.txt)
   
   any response ? @2010YOUY01 @jcsherin 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [I] CI: Check broken links in src doc comments [datafusion]

Posted by "Adez017 (via GitHub)" <gi...@apache.org>.
Adez017 commented on issue #16840:
URL: https://github.com/apache/datafusion/issues/16840#issuecomment-3112855366

   hey @jcsherin  , i think we got a big work to do as of your suggestion i ran the following command :
   `$fd -e html -e txt -e md . target/doc | xargs lychee --github-token "$GITHUB_TOKEN" --format markdown > lychee_report.md`
   
   got a big report although most of the links are cached but agian in final summary we got too many links broken . attaching the file for the reference . 
   
   [lychee_report.md](https://github.com/user-attachments/files/21405566/lychee_report.md)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [I] CI: Check broken links in src doc comments [datafusion]

Posted by "jcsherin (via GitHub)" <gi...@apache.org>.
jcsherin commented on issue #16840:
URL: https://github.com/apache/datafusion/issues/16840#issuecomment-3101422403

   @Adez017 Thank you. These are the command I used.
   
   To generate rust docs (same as `ci/scripts/rust_docs.sh`):
   ```text
   $ RUSTDOCFLAGS="-D warnings" cargo doc --document-private-items --no-deps --workspace
   ```
   
   To generate a markdown report of broken links using `lychee`:
   ```text
   $fd -e html -e txt -e md . target/doc | xargs lychee --github-token "$GITHUB_TOKEN" --format markdown > lychee_report.md
   ```
   
   The `$GITHUB_TOKEN` is necessary to prevent HTTP 429 (too many requests) when checking github urls.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [I] CI: Check broken links in src doc comments [datafusion]

Posted by "Adez017 (via GitHub)" <gi...@apache.org>.
Adez017 commented on issue #16840:
URL: https://github.com/apache/datafusion/issues/16840#issuecomment-3122122209

   > [@Adez017](https://github.com/Adez017)
   > 
   > I agree, the report size is very large which makes it difficult to act on. Like you said, the reported broken links are working when checked manually.
   > 
   > To help bring this down to a manageable level a good place to start is the [lychee docs](https://lychee.cli.rs/usage/cli/) and see if there are any configuration settings which can help reduce the reported errors.
   > 
   > For instance, we can turn off caching of URLs between subsequent runs. With caching turned on we may discover broken links only later. And we want the CI to report only links which are relevant to the changes in the current pull request.
   
   sure , i will work on this 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [I] CI: Check broken links in src doc comments [datafusion]

Posted by "Adez017 (via GitHub)" <gi...@apache.org>.
Adez017 commented on issue #16840:
URL: https://github.com/apache/datafusion/issues/16840#issuecomment-3101400436

   > > hi [@2010YOUY01](https://github.com/2010YOUY01) i would try to validate the concerned issue and find out a way
   > 
   > Thank you.
   > 
   > You can try `lychee` mentioned by [#16839 (comment)](https://github.com/apache/datafusion/pull/16839#issuecomment-3097357784), it seem to have existing GitHub action to use.
   
   great will look into it


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [I] CI: Check broken links in src doc comments [datafusion]

Posted by "Adez017 (via GitHub)" <gi...@apache.org>.
Adez017 commented on issue #16840:
URL: https://github.com/apache/datafusion/issues/16840#issuecomment-3109285520

   > [@Adez017](https://github.com/Adez017) Thank you. These are the commands I used.
   > 
   > To generate rust docs (same as `ci/scripts/rust_docs.sh`):
   > 
   > ```
   > $ RUSTDOCFLAGS="-D warnings" cargo doc --document-private-items --no-deps --workspace
   > ```
   > 
   > To generate a markdown report of broken links using `lychee`:
   > 
   > ```
   > $fd -e html -e txt -e md . target/doc | xargs lychee --github-token "$GITHUB_TOKEN" --format markdown > lychee_report.md
   > ```
   > 
   > The `$GITHUB_TOKEN` is necessary to prevent HTTP 429 (too many requests) when checking github urls.
   
   Hi @jcsherin @2010YOUY01  just a quick follow up , does we need to check the old PR's also for broken links or just the new changes made through Push or PR . it would be better to be discussed as when i try to run on all the PR's i got too many requests. although its working as what i think 
   
   <img width="1182" height="368" alt="Image" src="https://github.com/user-attachments/assets/581e2fb6-f71d-44fc-9a0e-0a904dbab221" />


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [I] CI: Check broken links in src doc comments [datafusion]

Posted by "jcsherin (via GitHub)" <gi...@apache.org>.
jcsherin commented on issue #16840:
URL: https://github.com/apache/datafusion/issues/16840#issuecomment-3109415899

   @Adez017 Thank you for working on this!
   
   The standard practice is to introduce a check like this to validate new PRs. For rollout I think it involves two steps. First, we can fix all the existing broken links currently on the `main` branch in a separate PR. Then we have a clean `main` on which can activate the workflow.
   
   I reviewed the [workflow file](https://github.com/Adez017/datafusion/blob/d36b815751b99adada69dec9ce628011ea703e30/.github/workflows/dead_links_check.yml#L35-L37) and have a suggestion. 
   
   We can check the final output of the generated docs instead of directly scanning the source files. I think this is a better approach because it allows `lychee` to verify the internal links that `rustdoc` creates in HTML.
   
   There are two places where the docs are built:
   1. Cargo docs: https://github.com/apache/datafusion/blob/518fb4b53697eec1562b9061d4f47f9f2f348325/ci/scripts/rust_docs.sh#L21-L22
   2. Website docs: https://github.com/apache/datafusion/tree/main/docs#build--preview
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [I] CI: Check broken links in src doc comments [datafusion]

Posted by "Adez017 (via GitHub)" <gi...@apache.org>.
Adez017 commented on issue #16840:
URL: https://github.com/apache/datafusion/issues/16840#issuecomment-3111606238

   > [@Adez017](https://github.com/Adez017) Thank you for working on this!
   > 
   > The standard practice is to introduce a check like this to validate new PRs. For rollout I think it involves two steps. First, we can fix all the existing broken links currently on the `main` branch in a separate PR. Then we have a clean `main` on which can activate the workflow.
   > 
   > I reviewed the [workflow file](https://github.com/Adez017/datafusion/blob/d36b815751b99adada69dec9ce628011ea703e30/.github/workflows/dead_links_check.yml#L35-L37) and have a suggestion.
   > 
   > We can check the final output of the generated docs instead of directly scanning the source files. I think this is a better approach because it allows `lychee` to verify the internal links that `rustdoc` creates in HTML.
   > 
   > There are two places where the docs are built:
   > 
   > 1. Cargo docs: 
   >      
   >        
   >          [datafusion/ci/scripts/rust_docs.sh](https://github.com/apache/datafusion/blob/518fb4b53697eec1562b9061d4f47f9f2f348325/ci/scripts/rust_docs.sh#L21-L22)
   >        
   >        
   >            Lines 21 to 22
   >          in
   >          [518fb4b](/apache/datafusion/commit/518fb4b53697eec1562b9061d4f47f9f2f348325)
   >        
   >      
   >      
   >        
   >    
   >            
   >              
   >               export RUSTDOCFLAGS="-D warnings" 
   >            
   >    
   >            
   >              
   >               cargo doc --document-private-items --no-deps --workspace
   > 2. Website docs: https://github.com/apache/datafusion/tree/main/docs#build--preview
   Hi @jcsherin  thanks for the suggestion
   okay so as of my understanding we have to first find all the broken links that exist and fix them manually , then we can steup a CI like `lychee` to run for new PR's and push


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [I] CI: Check broken links in src doc comments [datafusion]

Posted by "2010YOUY01 (via GitHub)" <gi...@apache.org>.
2010YOUY01 commented on issue #16840:
URL: https://github.com/apache/datafusion/issues/16840#issuecomment-3101392719

   > hi [@2010YOUY01](https://github.com/2010YOUY01) i would try to validate the concerned issue and find out a way
   
   Thank you.
   
   You can try `lychee` mentioned by https://github.com/apache/datafusion/pull/16839#issuecomment-3097357784, it seem to have existing GitHub action to use.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [I] CI: Check broken links in src doc comments [datafusion]

Posted by "jcsherin (via GitHub)" <gi...@apache.org>.
jcsherin commented on issue #16840:
URL: https://github.com/apache/datafusion/issues/16840#issuecomment-3122092750

   @Adez017 
   
   I agree, the report size is very large which makes it difficult to act on. Like you said, the reported broken links are working when checked manually. 
   
   To help bring this down to a manageable level a good place to start is the [lychee docs](https://lychee.cli.rs/usage/cli/) and see if there are any configuration settings which can help reduce the reported errors.
   
   For instance, we can turn off caching of URLs between subsequent runs. With caching turned on we may discover broken links only later. And we want the CI to report only links which are relevant to the changes in the current pull request. 
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org