Skip to content

Feature/spline 815 export import#1436

Merged
wajda merged 22 commits into
release/0.8from
feature/spline-815-export_import
Jul 14, 2025
Merged

Feature/spline 815 export import#1436
wajda merged 22 commits into
release/0.8from
feature/spline-815-export_import

Conversation

@wajda

@wajda wajda commented Jul 11, 2025

Copy link
Copy Markdown
Contributor

Fixes #815

Adds CLI commands:

  • lineage-import
  • lineage-export

Adds Producer REST API endpoitns:

  • GET /execution-plans -- returns execution plan IDs
  • GET /execution-plans/{planID} -- returns the given ExecutionPlan (Producer API v1.1)
  • GET /execution-plans/{planID}/events -- returns a list of EvecutionEvents of the given ExecutionPlan

@wajda wajda requested a review from cerveada as a code owner July 11, 2025 23:00
@wajda wajda marked this pull request as draft July 11, 2025 23:00
@wajda

wajda commented Jul 11, 2025

Copy link
Copy Markdown
Contributor Author

Snyk checks have failed. 6 issues have been found so far.

Icon Severity Issues
Critical 0
High 2
Medium 1
Low 3

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.

@wajda wajda linked an issue Jul 11, 2025 that may be closed by this pull request
@wajda wajda requested review from Copilot and removed request for cerveada July 11, 2025 23:20

This comment was marked as outdated.

@wajda wajda marked this pull request as ready for review July 14, 2025 01:11
@wajda wajda requested a review from Copilot July 14, 2025 01:11

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-export CLI commands and corresponding integration tests.
  • Extends ExecutionProducerRepository with health check and fetch methods (isDatabaseOk, fetchExecutionPlanIds, fetchExecutionPlan, fetchExecutionEvents) and implements them in ExecutionProducerRepositoryImpl.
  • Refactors key‐creation logic into ExecutionPlanKeyConverter and ExecutionEventKeyConverter, and adds an ExecutionPlanApiModelAssembler for 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 getExecutionPlanIDs uses uppercase "ID" twice; consider renaming to getExecutionPlanIds to 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 @ApiResponses for cases where the requested execution plan or its events are not found.
  @ApiResponses(Array(

wajda and others added 20 commits July 14, 2025 03:59
…o attributes and expressions, but without them as separate components yet).
…rvice/model/ExecutionPlanApiModelAssembler.scala

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@wajda wajda force-pushed the feature/spline-815-export_import branch from d9655dc to 79a2a18 Compare July 14, 2025 01:59
@sonarqubecloud

Copy link
Copy Markdown

@wajda wajda merged commit 1bbf892 into release/0.8 Jul 14, 2025
4 of 6 checks passed
@wajda wajda deleted the feature/spline-815-export_import branch July 14, 2025 05:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Export / Import lineage data

2 participants