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

feat: add persistence for data-plane-selector #1475

Conversation

ndr-brt
Copy link
Contributor

@ndr-brt ndr-brt commented Jul 31, 2024

WHAT

Add sql persistence for data-plane-selector

WHY

it was missing

FURTHER NOTES

  • removed duplicated dependency from the version catalog

Closes #1474

Verified

This commit was signed with the committer’s verified signature.
booc0mtaco Andrew Holloway
@ndr-brt ndr-brt added the enhancement New feature or request label Jul 31, 2024
public class DataPlaneInstancePostgresqlMigrationExtension extends AbstractPostgresqlMigrationExtension {
private static final String NAME_SUBSYSTEM = "dataplaneinstance";

protected String getSubsystemName() {

Check notice

Code scanning / CodeQL

Missing Override annotation Note

This method overrides
AbstractPostgresqlMigrationExtension.getSubsystemName
; it is advisable to add an Override annotation.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Comment on lines +15 to +34
CREATE TABLE IF NOT EXISTS edc_lease
(
leased_by VARCHAR NOT NULL,
leased_at BIGINT,
lease_duration INTEGER NOT NULL,
lease_id VARCHAR NOT NULL
CONSTRAINT lease_pk
PRIMARY KEY
);


CREATE TABLE IF NOT EXISTS edc_data_plane_instance
(
id VARCHAR NOT NULL PRIMARY KEY,
data JSON,
lease_id VARCHAR
CONSTRAINT data_plane_instance_lease_id_fk
REFERENCES edc_lease
ON DELETE SET NULL
);
Copy link
Contributor

Choose a reason for hiding this comment

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

Do the schemas of these tables match the old tables, so that in case of an upgrade of the edc (even if it is not supported) there should be no problems?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

what do you mean with "match the old tables"?
in case of upgrade (that AFAIR should be actually possible) edc_lease won't be created as already existent and edc_data_plane_instance will be created.

@ndr-brt ndr-brt requested a review from florianrusch-zf July 31, 2024 12:34
@rafaelmag110
Copy link
Contributor

This is a relevant fix for 0.7.3, as that version already ships the dataplane self-registration extension.

gradle/libs.versions.toml Outdated Show resolved Hide resolved
@ndr-brt ndr-brt force-pushed the 1474-data-plane-selector-persistence branch from 974e55c to ca678af Compare August 5, 2024 07:02
Copy link

sonarqubecloud bot commented Aug 5, 2024

@ndr-brt ndr-brt merged commit ce21133 into eclipse-tractusx:main Aug 5, 2024
35 checks passed
@ndr-brt ndr-brt deleted the 1474-data-plane-selector-persistence branch August 5, 2024 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Merged
Development

Successfully merging this pull request may close these issues.

data-plane-selector sql persistence
5 participants