Skip to content

Implementing the new methods introduced in provider/interfaces

Aman Verma requested to merge users/amaverma/updateOtherCSPs into master

This is the third MR for implementing ADR #51

Details:

Implementing the new methods introduced in MR !145 (merged) for IBM, GCP and AWS.

Summary of changes:

The central theme for changes is this:

  • There are two types of method signatures dealing with tenant specific operations. One is where dataPartitionId is included in method arguments and other where dataPartitionId is being read from the headers. Examples:
tenantSpecificOperation1(Val val, String datapartitionId) {
// some logic
}

tenantSpecificOperation2(Val val) {
dataPartitionId = headers.getDataPartitionId();
// some logic
}
  • For each tenant specific operation, there's an equivalent operation for system schemas, hence there's a system schema related operation for the same. In these methods, we are setting data-partition-id equal to the shared tenant id and calling the corresponding tenant specific method. Examples:

private void updateDataPartitionId() {
    headers.put(SchemaConstants.DATA_PARTITION_ID, sharedTenant);
}

SystemSchemaOperation1(Val val) {
tenantSpecificOperation1(val, sharedTenant);
}

SystemSchemaOperation1(Val val) {
updateDataPartitionId();
tenantSpecificOperation2(val);
}
  • This is needed because other CSPs are still using the sharedTenant (usually common) to handle the system schemas. Note that for azure there's no common tenant now and system schemas are being put in a dedicated resource group.

  • The same pattern is repeated for all the CSPs/ all the classes/ all the methods.

Similar MR for azure CSP: !146 (merged) Previous MR in schema-core for updating interface: !145 (merged)

Edited by Aman Verma

Merge request reports

Loading