AHeise commented on a change in pull request #13551:
URL: https://github.com/apache/flink/pull/13551#discussion_r557270935



##########
File path: flink-runtime/pom.xml
##########
@@ -509,6 +509,16 @@ under the License.
                                                <!-- It is useless due to the 
way Flink does branches and tags -->
                                                <skip>true</skip>
                                        </gitDescribe>
+                                       <!-- The git.properties is not really 
used, but works around an IntelliJ bug where

Review comment:
       I had mixed success when executing tests in IntelliJ. 
   `EnvironmentInformation.getCommitId` depends on successful resource 
filtering of `.flink-runtime.version.properties` in `flink-runtime`, which 
worked for me fine with `mvn`.
   However, in IntelliJ, quite often the `git.*` variables have not been 
replaced successfully. What's worse they have been unset even after having 
executed the task in `mvn resources -pl flink-runtime` successfully first.
   
   I did not have a good explanation so I added some code to generate the 
`git.properties` first and then merge it into 
`.flink-runtime.version.properties`. I noticed that generating `git.properties` 
worked very reliably. However, something unexpected happened: 
`.flink-runtime.version.properties` was also now properly filtered. 🤷 
   
   Since this is a bit hacky, an alternative could be to use two files to fill 
in the `EnvironmentInformation`: `git.properties` for git stuff and for 
`.flink-runtime.version.properties` for everything else.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to