XComp opened a new pull request #14171:
URL: https://github.com/apache/flink/pull/14171


   
   
   ## What is the purpose of the change
   
   Directory creation was introduced to JaasModule in 
[FLINK-19252](https://issues.apache.org/jira/browse/FLINK-19252) in case the 
folder does not exist, yet. Unfortunately, the used logic was not able to deal 
with symbolic links which caused exception in such cases.
   
   The behavior could be reproduced through a JUnit test and was fixed in this 
PR. One goal of this change was to have the symbolic link resolution not being 
exposed outside `generateDefaultConfigFile(String)` to have the passed 
`workingDir` parameter match the directory path of the returned `File` instance.
   
   ## Brief change log
   
   * Utilization of `Path.toRealPath()` logic to resolve symbolic links.
   * The change makes sure that the symbolic link resolution happens within the 
method only. The returned `File` instance uses the path containing symbolic 
link again. 
   * A unit test was added to cover this behavior.
   
   ## Verifying this change
   
   This change added tests and can be verified as follows:
   
   * A new test `JaasModuleTest.testJaasModuleFilePathIfWorkingDirIsSymLink` 
was added.
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): no
     - The public API, i.e., is any changed class annotated with 
`@Public(Evolving)`: no
     - The serializers: no
     - The runtime per-record code paths (performance sensitive): no
     - Anything that affects deployment or recovery: JobManager (and its 
components), Checkpointing, Kubernetes/Yarn/Mesos, ZooKeeper: no
     - The S3 file system connector: no
   
   ## Documentation
   
     - Does this pull request introduce a new feature? no
     - If yes, how is the feature documented? not applicable


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