StephanEwen opened a new pull request #10138: [FLINK-14635][e2e tests] Use 
non-relocated imports for AWS SDK Kinesis classes in tests.
URL: https://github.com/apache/flink/pull/10138
 
 
   ## What is the purpose of the change
   
   This allows compiling the code base fully in the IDE again by changing the 
way that the AWS SDK classes are used in the `KinesisPubsubClient` in the 
Kineses end-2-end test.
   
   Some imports were referring to relocated classes from the connector, which 
cannot be resolved in the IDE because no shading happens during compilation.
   
   ## Brief change log
   
     - Instead of using relocated imports, use vanilla imports in 
`KinesisPubsubClient`.
     - We add a provided AWS SDK dependency for the non-relocated classes. This 
follows the pattern to not directly reference transitive dependencies, 
especially shaded ones. That way, we supports IDE and unit test compilation / 
execution.
     - For end-2-end test execution, we relocate the AWS SDK classes in the 
shade phase following the exact same pattern as the original relocation in the 
Kinesis connector.
     - We need to make sure we don't operate directly on relocated classes when 
simultaneously using non relocated classes (class cast exceptions). We use a 
utility in the Kinesis module to directly obtain stringified or byte[]-ified 
versions of the records, rather than objects backed by relocated classes.
   
   ## Verifying this change
   
   This changes a test which still runs and works.
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): **yes** (in a test)
     - 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, 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]


With regards,
Apache Git Services

Reply via email to