Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Scala client for certified events (#2045)
* Scala client for certified events * Fixing bug, where I was extracting region and pvi environment details from hadoop configuration. Changed it to retrieve rather from spark configuration * This state represents code that works in notebook after porting section of the codes separately in Edog. * Token expiry check, removing unused imports * Creating JWT Token Parser. Removing dependencies that are no longer needed for token parsing. * Restoring resthelpers.scala to prior state. Adding exception handling and few PR comments. * 1) Restricting access level to class properties, and functions. 2) Cleaning unused imports. 3) Closing unused resources like file handler, etc. 4) And fixing few scala style checks like calling convention for 0 parameter func, etc. * Refactoring to support single responsibility as much as possible and adding tests * Checking an empty http response content, before parsing * Fixing the early http client termination. At this point we are successfully emitting telemetry. * Fixing typos * Fixing test failure. * At this point addressing just pr comments. * Addressing PR comments * Removing token used for test and created a dummy token creator. * Adding abstract classes to represent certified event payload, adding test for it, addressing PR comments. * Turning code immutable as much as possible and removing few tests and classes that were replaced by alternative approach. * Update core/src/main/scala/com/microsoft/azure/synapse/ml/logging/Usage/UsageUtils.scala Co-authored-by: Mark Hamilton <[email protected]> * Update core/src/main/scala/com/microsoft/azure/synapse/ml/logging/Usage/UsageUtils.scala Co-authored-by: Mark Hamilton <[email protected]> * Update core/src/main/scala/com/microsoft/azure/synapse/ml/logging/Usage/TokenUtils.scala Co-authored-by: Mark Hamilton <[email protected]> * Update core/src/main/scala/com/microsoft/azure/synapse/ml/logging/Usage/TokenUtils.scala Co-authored-by: Mark Hamilton <[email protected]> * Update core/src/main/scala/com/microsoft/azure/synapse/ml/logging/Usage/TokenUtils.scala Co-authored-by: Mark Hamilton <[email protected]> * Update core/src/main/scala/com/microsoft/azure/synapse/ml/logging/Usage/HostEndpointUtils.scala Co-authored-by: Mark Hamilton <[email protected]> * Update core/src/main/scala/com/microsoft/azure/synapse/ml/logging/Usage/FabricTokenServiceClient.scala Co-authored-by: Mark Hamilton <[email protected]> * porting some api realted to web calls to WebUtils.scala, making few calls succinct, addressing potential null exceptions, etc. * Fixing build error that was partly introduced from missing to remove uavailable reference and partly syncing to remote. * refactoring to change few object into traits, and addressing few PR comments * changing the case of certified event activity name * Removing some class and associated test. Turning some variable lazy. * Changing some parameter to Option and then removing unused imports * 1) Removing token extraction via fabric token service. * some cleanup * Removing token caching. * neaten PR * Update core/src/main/scala/com/microsoft/azure/synapse/ml/logging/fabric/CertifiedEventClient.scala * Update core/src/main/scala/com/microsoft/azure/synapse/ml/logging/fabric/CertifiedEventClient.scala * add futures * Adding Fabric environment check and using it to decide emitting certified event * Adding platform check before emitting CE. Turning calls to log CE asynchronous. * Modifying logic to determine if platform is Fabric only if it is Synapse internal * Update core/src/main/scala/com/microsoft/azure/synapse/ml/logging/common/PlatformDetails.scala * Update core/src/main/scala/com/microsoft/azure/synapse/ml/logging/common/PlatformDetails.scala * Apply suggestions from code review * Update core/src/main/scala/com/microsoft/azure/synapse/ml/logging/fabric/CertifiedEventClient.scala * Update core/src/main/scala/com/microsoft/azure/synapse/ml/logging/fabric/CertifiedEventClient.scala * Update core/src/main/scala/com/microsoft/azure/synapse/ml/logging/fabric/CertifiedEventClient.scala * Update .gitignore * Update tools/docgen/docgen/manifest.yaml * Update environment.yml * Update environment.yml --------- Co-authored-by: Mark Hamilton <[email protected]> Co-authored-by: Mark Hamilton <[email protected]>
- Loading branch information