You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "andygrove (via GitHub)" <gi...@apache.org> on 2024/02/20 15:57:22 UTC

[PR] Add test to prevent circular dependencies from being added [arrow-datafusion]

andygrove opened a new pull request, #9292:
URL: https://github.com/apache/arrow-datafusion/pull/9292

   ## Which issue does this PR close?
   
   <!--
   We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123.
   -->
   
   Closes https://github.com/apache/arrow-datafusion/issues/9278
   
   ## Rationale for this change
   
   <!--
    Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
    Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.  
   -->
   
   Add CI check to prevent circular dependencies from being introduced
   
   ## What changes are included in this PR?
   
   <!--
   There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
   -->
   
   New test
   
   ## Are these changes tested?
   
   <!--
   We typically require tests for all PRs in order to:
   1. Prevent the code from being accidentally broken by subsequent changes
   2. Serve as another way to document the expected behavior of the code
   
   If tests are not included in your PR, please explain why (for example, are they covered by existing tests)?
   -->
   
   I tested this manually by adding a circular dependency and running `cargo test`. It correctly failed with:
   
   ```
   circular dependency detected from datafusion-physical-plan to self via one of {"datafusion-common", "datafusion-functions", "datafusion", "datafusion-expr", "datafusion-execution", "datafusion-functions-array", "datafusion-optimizer", "datafusion-sql", "datafusion-physical-expr"}
   ```
   
   ## Are there any user-facing changes?
   
   <!--
   If there are user-facing changes then we may require documentation to be updated before approving the PR.
   -->
   
   No
   
   <!--
   If there are any breaking changes to public APIs, please add the `api change` label.
   -->
   


-- 
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@arrow.apache.org

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


Re: [PR] Add test to prevent circular dependencies from being added [arrow-datafusion]

Posted by "comphead (via GitHub)" <gi...@apache.org>.
comphead commented on PR #9292:
URL: https://github.com/apache/arrow-datafusion/pull/9292#issuecomment-1958496741

   > > lgtm thanks @andygrove I think in followup we will put this check separately into its own CI task, what do you think?
   > 
   > Hi @comphead. Are you suggesting that we move the test out of `datafusion/core/tests` and into a separate project in the repo that has tests that are specific to CI?
   
   Tbh I haven't thought about moving it to the separate project. The idea was to have a separate CI check for circular dependency test, like we have RAT check, or security audit check


-- 
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@arrow.apache.org

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


Re: [PR] Add test to prevent circular dependencies from being added [arrow-datafusion]

Posted by "andygrove (via GitHub)" <gi...@apache.org>.
andygrove commented on code in PR #9292:
URL: https://github.com/apache/arrow-datafusion/pull/9292#discussion_r1496079826


##########
dev/release/crate-deps.dot:
##########
@@ -16,39 +16,76 @@
 // under the License.
 
 digraph G {

Review Comment:
   I generated this by adding the following code in the new test. It would be nice to automate this in the future.
   
   ```rust
       // generate dot chart
       println!("digraph G {{");
       for (a,b) in &package_deps {
           println!("\t{}", a.replace('-', "_"));
           for dep in b {
               println!("\t{} -> {}", a.replace('-', "_"), dep.replace('-', "_"));
           }
       }
       println!("}}");
    ```



-- 
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@arrow.apache.org

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


Re: [PR] Add test to prevent circular dependencies from being added [arrow-datafusion]

Posted by "andygrove (via GitHub)" <gi...@apache.org>.
andygrove commented on PR #9292:
URL: https://github.com/apache/arrow-datafusion/pull/9292#issuecomment-1958486071

   > lgtm thanks @andygrove I think in followup we will put this check separately into its own CI task, what do you think?
   
   Hi @comphead. Are you suggesting that we move the test out of `datafusion/core/tests` and into a separate project in the repo that has tests that are specific to CI?


-- 
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@arrow.apache.org

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


Re: [PR] Add test to prevent circular dependencies from being added [arrow-datafusion]

Posted by "andygrove (via GitHub)" <gi...@apache.org>.
andygrove commented on PR #9292:
URL: https://github.com/apache/arrow-datafusion/pull/9292#issuecomment-1962987442

   > Tbh I haven't thought about moving it to the separate project. The idea was to have a separate CI check for circular dependency test, like we have RAT check, or security audit check
   
   Got it. I filed a follow on issue https://github.com/apache/arrow-datafusion/issues/9338 for discussing this. Thanks for the review!


-- 
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@arrow.apache.org

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


Re: [PR] Add test to prevent circular dependencies from being added [arrow-datafusion]

Posted by "andygrove (via GitHub)" <gi...@apache.org>.
andygrove merged PR #9292:
URL: https://github.com/apache/arrow-datafusion/pull/9292


-- 
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@arrow.apache.org

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


Re: [PR] Add test to prevent circular dependencies from being added [arrow-datafusion]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #9292:
URL: https://github.com/apache/arrow-datafusion/pull/9292#issuecomment-1963782872

   Thank you @andygrove and @comphead 


-- 
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@arrow.apache.org

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