Feature/spline 815 export import#1436
Conversation
⛔ Snyk checks have failed. 6 issues have been found so far.
⛔ security/snyk check is complete. 6 issues have been found. (View Details) 💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
There was a problem hiding this comment.
Pull Request Overview
This PR adds CLI import/export commands and new Producer REST API endpoints for managing execution plans and their events.
- Introduces
lineage-import/lineage-exportCLI commands and corresponding integration tests. - Extends
ExecutionProducerRepositorywith health check and fetch methods (isDatabaseOk,fetchExecutionPlanIds,fetchExecutionPlan,fetchExecutionEvents) and implements them inExecutionProducerRepositoryImpl. - Refactors key‐creation logic into
ExecutionPlanKeyConverterandExecutionEventKeyConverter, and adds anExecutionPlanApiModelAssemblerfor mapping persistent models back to API models.
Reviewed Changes
Copilot reviewed 130 out of 130 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| producer-services/src/test/.../ExecutionEventKeyCreatorSpec.scala | Updated test to use ExecutionEventKeyConverter |
| producer-services/src/main/.../ExecutionProducerRepository.scala | Added repository interface methods for health and fetch operations |
| producer-services/src/main/.../ExecutionProducerRepositoryImpl.scala | Implemented new methods and replaced key creator usage |
| producer-services/src/main/.../ExecutionPlanKeyConverter.scala | Introduced converter for plan key creation |
| producer-services/src/main/.../ExecutionEventKeyConverter.scala | Introduced converter for event key creation |
| producer-services/src/main/.../ExecutionPlanPersistentModelBuilder.scala | Updated builder to use converter |
| producer-services/src/main/.../ExecutionPlanPersistentModel.scala | Added no-arg constructor |
| producer-services/src/main/.../AbstractNodeKeyConverter.scala | Renamed key creator, added parseCompositeKey utility |
| producer-services/src/main/.../ExecutionPlanApiModelAssembler.scala | Added assembler from persistent to API model |
| producer-rest-core/src/main/.../ExecutionPlansController.scala | Added GET endpoints for plans and events |
| producer-rest-core/src/main/.../ProducerRESTConfig.scala | Updated Jackson config to exclude absent Scala options |
| producer-model/src/...executionPlan.scala | Added NameAndVersion.fromMap helper |
| persistence/src/main/.../operations.scala | Refactored operation type constants |
| persistence/src/main/.../entities.scala | Added no-arg constructors for ArangoDB entities |
| persistence/src/main/.../ArangoDatabaseFacade.scala | Registered custom VPack deserializers |
| persistence/pom.xml | Configured Maven compiler plugin |
| integration-tests/src/test/.../AdminCLISpec.scala | Added integration tests for CLI import/export |
| integration-tests/src/test/resources/sample-lineage-data/*.json | Added sample lineage JSON files for tests |
Comments suppressed due to low confidence (3)
producer-rest-core/src/main/scala/za/co/absa/spline/producer/rest/controller/ExecutionPlansController.scala:194
- [nitpick] The method name
getExecutionPlanIDsuses uppercase "ID" twice; consider renaming togetExecutionPlanIdsto follow standard camelCase conventions.
def getExecutionPlanIDs: Future[Seq[UUID]] = {
integration-tests/src/test/scala/za/co/absa/spline/admin/AdminCLISpec.scala:128
- The TODO blocks indicate missing assertions for verifying exported lineage files; consider adding checks to ensure the output directory matches the input data in count, file names, and JSON content equivalence.
// TODO: Compare the exported files (testLineageOutputDir) with the original directory (testLineageInputDir)
producer-rest-core/src/main/scala/za/co/absa/spline/producer/rest/controller/ExecutionPlansController.scala:202
- [nitpick] The new GET endpoints document only 200 responses; consider adding a 404 response in
@ApiResponsesfor cases where the requested execution plan or its events are not found.
@ApiResponses(Array(
…o attributes and expressions, but without them as separate components yet).
…tion-plans/{id}` request.
… request (returns plan IDs).
…vents` request (returns evens list).
…rvice/model/ExecutionPlanApiModelAssembler.scala Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ngle object in the "event-" file.
…tance from "__expr" representation.
d9655dc to
79a2a18
Compare
|



Fixes #815
Adds CLI commands:
lineage-importlineage-exportAdds Producer REST API endpoitns:
GET /execution-plans-- returns execution plan IDsGET /execution-plans/{planID}-- returns the givenExecutionPlan(Producer API v1.1)GET /execution-plans/{planID}/events-- returns a list ofEvecutionEvents of the givenExecutionPlan