Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement migration for adapter and pipeline element configurations #2077

Conversation

bossenti
Copy link
Contributor

@bossenti bossenti commented Oct 23, 2023

Purpose

see #2045

See detailed explanation

Remarks

PR introduces (a) breaking change(s): no

PR introduces (a) deprecation(s): yes

Deprecations

  • Deprecate create() methods of ProcessingElementBuilder that do not contain a version
  • Deprecate create() methods of AdapterConfigurationBuilder that do not contain a version

dominikriemer and others added 22 commits October 9, 2023 16:24
…on-for-adapter-and-pipeline-element-configurations

# Conflicts:
#	ui/projects/streampipes/platform-services/src/lib/model/gen/streampipes-model.ts
#	ui/src/app/add/components/endpoint-item/endpoint-item.component.ts
#	ui/src/scss/sp/main.scss
…pter-and-pipeline-element-configurations' into 2045-implement-migration-for-adapter-and-pipeline-element-configurations

# Conflicts:
#	streampipes-extensions-api/src/main/java/org/apache/streampipes/extensions/api/migration/AdapterMigrator.java
#	streampipes-extensions-api/src/main/java/org/apache/streampipes/extensions/api/migration/MigrationResult.java
#	streampipes-extensions-api/src/main/java/org/apache/streampipes/extensions/api/migration/ModelMigrator.java
#	streampipes-extensions-management/src/main/java/org/apache/streampipes/extensions/management/model/SpServiceDefinition.java
#	streampipes-extensions-management/src/main/java/org/apache/streampipes/extensions/management/model/SpServiceDefinitionBuilder.java
…on-for-adapter-and-pipeline-element-configurations
@github-actions github-actions bot added dependencies Pull requests that update a dependency file java Pull requests that update Java code ui Anything that affects the UI backend Everything that is related to the StreamPipes backend labels Oct 23, 2023
@github-actions github-actions bot added the testing Relates to any kind of test (unit test, integration, or E2E test). label Oct 23, 2023
@bossenti bossenti changed the title 2045 implement migration for adapter and pipeline element configurations implement migration for adapter and pipeline element configurations Oct 27, 2023
@bossenti bossenti linked an issue Oct 27, 2023 that may be closed by this pull request
@bossenti bossenti added the deprecation Assigned to pull requests or issues that introduce a deprecation. label Oct 27, 2023
@bossenti bossenti marked this pull request as ready for review October 27, 2023 08:48
if (obj instanceof ModelMigrator<?, ?>) {
return this.config().equals(((ModelMigrator<?, ?>) obj).config());
}
return false;
Copy link
Member

Choose a reason for hiding this comment

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

Just out of curiosity, where is this equals method used? Is this the only reason the AdapterMigrator has to be an abstract class instead of an interface?

@dominikriemer
Copy link
Member

@bossenti Is there a reason why we have two endpoints at the core side for managing migrations of adapters and pipeline elements?
Does it have any implications if we remove the filtering logic from ExtensionsModelSubmitter to the core and have a single migration method there for adapters and pipeline elements?
This would ease managing the status of services.

@dominikriemer
Copy link
Member

dominikriemer commented Oct 28, 2023

I created a PR which breaks down the migration into smaller code units and creates a single request from extensions to core for submitting migration configs: #2101

* Extract MigrationResource logic into smaller units

* Use single request for submitting migrations from extensions to core

* refactor: remove dead code

* style: change formatting

---------

Co-authored-by: bossenti <[email protected]>
@bossenti
Copy link
Contributor Author

@dominikriemer you already addressed all your comments in your PR #2101, right?

…on-for-adapter-and-pipeline-element-configurations

# Conflicts:
#	streampipes-model/src/main/java/org/apache/streampipes/model/base/InvocableStreamPipesEntity.java
@dominikriemer
Copy link
Member

@bossenti I didn't address the comments above - do you know where the equals method is used from the AdapterMigrator or can we change it to an interface?

@bossenti
Copy link
Contributor Author

@dominikriemer Yes it is. We use it to determine if a migration has already been registered at the extensions service so that we can't register the same migration multiple times.

@bossenti bossenti merged commit a34a4dd into dev Oct 30, 2023
17 of 18 checks passed
@bossenti bossenti deleted the 2045-implement-migration-for-adapter-and-pipeline-element-configurations branch October 30, 2023 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Everything that is related to the StreamPipes backend connect Related to the `connect` module (adapters) dependencies Pull requests that update a dependency file deprecation Assigned to pull requests or issues that introduce a deprecation. java Pull requests that update Java code pipeline elements Relates to pipeline elements testing Relates to any kind of test (unit test, integration, or E2E test). ui Anything that affects the UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement migration for adapter and pipeline element configurations
3 participants