You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "andygrove (via GitHub)" <gi...@apache.org> on 2024/10/21 14:56:58 UTC

[PR] fix: Make comet-git-info.properties optional [datafusion-comet]

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

   ## 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/datafusion-comet/issues/1026
   
   ## 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.  
   -->
   
   Our instructions for building from source produce a jar file that does not contain `comet-git-info.properties` and this results in an exception at runtime. 
   
   ## 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.
   -->
   
   Use default values in `CometBuildInfo` instead of throwing an exception if `comet-git-info.properties` does not exist.
   
   ## How 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)?
   -->
   


-- 
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: [PR] fix: Make comet-git-info.properties optional [datafusion-comet]

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


-- 
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: [PR] fix: Make comet-git-info.properties optional [datafusion-comet]

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


##########
common/src/main/scala/org/apache/comet/package.scala:
##########
@@ -39,60 +40,46 @@ package object comet {
    * benchmarking software to provide the source revision and repository. In addition, the build
    * information is included to aid in future debugging efforts for releases.
    */
-  private object CometBuildInfo {
+  private object CometBuildInfo extends Logging {
 
-    val (
-      cometVersion: String,
-      cometBranch: String,
-      cometRevision: String,
-      cometBuildUserName: String,
-      cometBuildUserEmail: String,
-      cometRepoUrl: String,
-      cometBuildTimestamp: String) = {
+    val props: Properties = {
+      val props = new Properties()
       val resourceStream = Thread
         .currentThread()
         .getContextClassLoader
         .getResourceAsStream("comet-git-info.properties")

Review Comment:
   Good point. Updated.



-- 
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: [PR] fix: Make comet-git-info.properties optional [datafusion-comet]

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #1027:
URL: https://github.com/apache/datafusion-comet/pull/1027#issuecomment-2427068057

   ## [Codecov](https://app.codecov.io/gh/apache/datafusion-comet/pull/1027?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   Attention: Patch coverage is `0%` with `17 lines` in your changes missing coverage. Please review.
   > Project coverage is 34.28%. Comparing base [(`e3ac6cf`)](https://app.codecov.io/gh/apache/datafusion-comet/commit/e3ac6cf9b5f6e38f6a8f384e2f4e624ab75ed3b7?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to head [(`6979696`)](https://app.codecov.io/gh/apache/datafusion-comet/commit/697969668467120fcf61ba1a52a8d980f5b9bc92?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   > Report is 2 commits behind head on main.
   
   | [Files with missing lines](https://app.codecov.io/gh/apache/datafusion-comet/pull/1027?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
   |---|---|---|
   | [...mmon/src/main/scala/org/apache/comet/package.scala](https://app.codecov.io/gh/apache/datafusion-comet/pull/1027?src=pr&el=tree&filepath=common%2Fsrc%2Fmain%2Fscala%2Forg%2Fapache%2Fcomet%2Fpackage.scala&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Y29tbW9uL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvY29tZXQvcGFja2FnZS5zY2FsYQ==) | 0.00% | [17 Missing :warning: ](https://app.codecov.io/gh/apache/datafusion-comet/pull/1027?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   
   <details><summary>Additional details and impacted files</summary>
   
   
   ```diff
   @@             Coverage Diff              @@
   ##               main    #1027      +/-   ##
   ============================================
   - Coverage     34.41%   34.28%   -0.13%     
   + Complexity      886      881       -5     
   ============================================
     Files           112      112              
     Lines         43479    43477       -2     
     Branches       9656     9648       -8     
   ============================================
   - Hits          14962    14908      -54     
   - Misses        25442    25480      +38     
   - Partials       3075     3089      +14     
   ```
   
   </details>
   
   [:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/datafusion-comet/pull/1027?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   


-- 
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: [PR] fix: Make comet-git-info.properties optional [datafusion-comet]

Posted by "comphead (via GitHub)" <gi...@apache.org>.
comphead commented on code in PR #1027:
URL: https://github.com/apache/datafusion-comet/pull/1027#discussion_r1809089216


##########
common/src/main/scala/org/apache/comet/package.scala:
##########
@@ -39,60 +40,46 @@ package object comet {
    * benchmarking software to provide the source revision and repository. In addition, the build
    * information is included to aid in future debugging efforts for releases.
    */
-  private object CometBuildInfo {
+  private object CometBuildInfo extends Logging {
 
-    val (
-      cometVersion: String,
-      cometBranch: String,
-      cometRevision: String,
-      cometBuildUserName: String,
-      cometBuildUserEmail: String,
-      cometRepoUrl: String,
-      cometBuildTimestamp: String) = {
+    val props: Properties = {
+      val props = new Properties()
       val resourceStream = Thread
         .currentThread()
         .getContextClassLoader
         .getResourceAsStream("comet-git-info.properties")

Review Comment:
   perhaps we can set `comet-git-info.properties` as a constant? 



-- 
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