Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ This is a multi-module Gradle project using Kotlin DSL.
- Base context contains runner ID and core configuration
- Plugin contexts merged via `PriorityContextResolver`
- External frameworks (Spring Boot) contribute dependency contexts
- **Critical**: Hierarchical context MUST be built before driver initialization
- **Critical**: Hierarchical context MUST be built before AuditStore initialization

**Pipeline Architecture**: Change execution organized in stages:
- `LoadedPipeline` - Executable pipeline with stages and changes
Expand All @@ -136,7 +136,7 @@ This is a multi-module Gradle project using Kotlin DSL.
- `flamingock-graalvm` - GraalVM native image support

**Community Modules** (`community/`):
- Database-specific drivers (MongoDB, DynamoDB, Couchbase)
- Database-specific AuditStores (MongoDB, DynamoDB, Couchbase)
- `flamingock-importer` - Import from legacy systems (Mongock)
- Version-specific implementations (e.g., Spring Data v3 legacy)

Expand Down Expand Up @@ -202,11 +202,11 @@ When modifying the builder pattern in `AbstractFlamingockBuilder.build()`:
1. Template loading must occur first
2. Base context preparation before plugin initialization
3. Plugin initialization before hierarchical context building
4. Hierarchical context MUST be complete before driver initialization
4. Hierarchical context MUST be complete before AuditStore initialization
5. AuditStore initialization provides auditPersistence for audit writer registration
6. Pipeline building contributes dependencies back to context

Violating this order will cause runtime failures due to missing dependencies during driver initialization.
Violating this order will cause runtime failures due to missing dependencies during AuditStore initialization.

## License Header Management

Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ plugins {

allprojects {
group = "io.flamingock"
version = "1.0.0-beta.7"
version = "1.0.0-beta.8"

repositories {
mavenCentral()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
import io.flamingock.cli.factory.DynamoDBClientFactory;
import io.flamingock.cli.factory.MongoClientFactory;
import io.flamingock.cli.factory.SqlDataSourceFactory;
import io.flamingock.community.couchbase.driver.CouchbaseAuditStore;
import io.flamingock.community.dynamodb.driver.DynamoDBAuditStore;
import io.flamingock.community.mongodb.sync.driver.MongoDBSyncAuditStore;
import io.flamingock.community.sql.driver.SqlAuditStore;
import io.flamingock.store.couchbase.CouchbaseAuditStore;
import io.flamingock.store.dynamodb.DynamoDBAuditStore;
import io.flamingock.store.mongodb.sync.MongoDBSyncAuditStore;
import io.flamingock.store.sql.SqlAuditStore;
import io.flamingock.internal.common.core.audit.AuditEntry;
import io.flamingock.internal.common.core.context.Context;
import io.flamingock.internal.common.core.context.Dependency;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.flamingock.community.couchbase.driver;
package io.flamingock.store.couchbase;

import com.couchbase.client.core.io.CollectionIdentifier;
import com.couchbase.client.java.Bucket;
import com.couchbase.client.java.Cluster;
import io.flamingock.community.couchbase.internal.CouchbaseLockService;
import io.flamingock.store.couchbase.internal.CouchbaseLockService;
import io.flamingock.internal.common.core.error.FlamingockException;
import io.flamingock.internal.util.constants.CommunityPersistenceConstants;
import io.flamingock.internal.core.store.lock.community.CommunityLockService;
Expand All @@ -28,7 +28,7 @@
import io.flamingock.internal.core.store.audit.community.CommunityAuditPersistence;
import io.flamingock.internal.core.store.CommunityAuditStore;
import io.flamingock.internal.common.core.context.ContextResolver;
import io.flamingock.community.couchbase.internal.CouchbaseAuditPersistence;
import io.flamingock.store.couchbase.internal.CouchbaseAuditPersistence;
import io.flamingock.targetsystem.couchbase.CouchbaseTargetSystem;

public class CouchbaseAuditStore implements CommunityAuditStore {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.flamingock.community.couchbase;
package io.flamingock.store.couchbase;

import com.couchbase.client.core.io.CollectionIdentifier;
import io.flamingock.internal.util.constants.CommunityPersistenceConstants;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.flamingock.community.couchbase.internal;
package io.flamingock.store.couchbase.internal;

import com.couchbase.client.java.Bucket;
import com.couchbase.client.java.Cluster;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.flamingock.community.couchbase.internal;
package io.flamingock.store.couchbase.internal;

import com.couchbase.client.core.error.CouchbaseException;
import com.couchbase.client.java.Bucket;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.flamingock.community.couchbase.internal;
package io.flamingock.store.couchbase.internal;

import com.couchbase.client.core.error.DocumentNotFoundException;
import com.couchbase.client.java.Bucket;
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
io.flamingock.community.couchbase.driver.CouchbaseAuditStore
io.flamingock.store.couchbase.CouchbaseAuditStore
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,17 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.flamingock.community.couchbase;
package io.flamingock.store.couchbase;

import com.couchbase.client.core.io.CollectionIdentifier;
import com.couchbase.client.java.Bucket;
import com.couchbase.client.java.Cluster;
import com.couchbase.client.java.Collection;
import com.couchbase.client.java.json.JsonObject;
import io.flamingock.community.couchbase.changes.failedWithoutRollback._001__create_index;
import io.flamingock.community.couchbase.changes.failedWithoutRollback._002__insert_document;
import io.flamingock.community.couchbase.changes.failedWithoutRollback._003__execution_with_exception;
import io.flamingock.community.couchbase.changes.happyPath._003__insert_another_document;
import io.flamingock.community.couchbase.driver.CouchbaseAuditStore;
import io.flamingock.store.couchbase.changes.failedWithoutRollback._001__create_index;
import io.flamingock.store.couchbase.changes.failedWithoutRollback._002__insert_document;
import io.flamingock.store.couchbase.changes.failedWithoutRollback._003__execution_with_exception;
import io.flamingock.store.couchbase.changes.happyPath._003__insert_another_document;
import io.flamingock.targetsystem.couchbase.CouchbaseTargetSystem;
import io.flamingock.internal.common.core.util.Deserializer;
import io.flamingock.internal.common.core.audit.AuditEntry;
Expand Down Expand Up @@ -83,7 +82,7 @@ void tearDownEach() {


@Test
@DisplayName("When standalone runs the driver should persist the audit logs and the test data")
@DisplayName("When standalone runs the AuditStore should persist the audit logs and the test data")
void happyPath() {
//Given-When
Bucket bucket = cluster.bucket(BUCKET_NAME);
Expand All @@ -92,8 +91,8 @@ void happyPath() {

try (MockedStatic<Deserializer> mocked = Mockito.mockStatic(Deserializer.class)) {
mocked.when(Deserializer::readPreviewPipelineFromFile).thenReturn(PipelineTestHelper.getPreviewPipeline(
new Trio<>(io.flamingock.community.couchbase.changes.happyPath._001__create_index.class, Collections.singletonList(Collection.class)),
new Trio<>(io.flamingock.community.couchbase.changes.happyPath._002__insert_document.class, Collections.singletonList(Collection.class)),
new Trio<>(io.flamingock.store.couchbase.changes.happyPath._001__create_index.class, Collections.singletonList(Collection.class)),
new Trio<>(io.flamingock.store.couchbase.changes.happyPath._002__insert_document.class, Collections.singletonList(Collection.class)),
new Trio<>(_003__insert_another_document.class, Collections.singletonList(Collection.class)))
);

Expand Down Expand Up @@ -130,7 +129,7 @@ void happyPath() {


@Test
@DisplayName("When standalone runs the driver and execution fails (with rollback method) should persist all the audit logs up to the failed one (ROLLED_BACK)")
@DisplayName("When standalone runs the AuditStore and execution fails (with rollback method) should persist all the audit logs up to the failed one (ROLLED_BACK)")
void failedWithRollback() {
//Given-When
Bucket bucket = cluster.bucket(BUCKET_NAME);
Expand All @@ -139,9 +138,9 @@ void failedWithRollback() {

try (MockedStatic<Deserializer> mocked = Mockito.mockStatic(Deserializer.class)) {
mocked.when(Deserializer::readPreviewPipelineFromFile).thenReturn(PipelineTestHelper.getPreviewPipeline(
new Trio<>(io.flamingock.community.couchbase.changes.failedWithRollback._001__create_index.class, Collections.singletonList(Collection.class)),
new Trio<>(io.flamingock.community.couchbase.changes.failedWithRollback._002__insert_document.class, Collections.singletonList(Collection.class)),
new Trio<>(io.flamingock.community.couchbase.changes.failedWithRollback._003__execution_with_exception.class, Collections.singletonList(Collection.class), Collections.singletonList(Collection.class)))
new Trio<>(io.flamingock.store.couchbase.changes.failedWithRollback._001__create_index.class, Collections.singletonList(Collection.class)),
new Trio<>(io.flamingock.store.couchbase.changes.failedWithRollback._002__insert_document.class, Collections.singletonList(Collection.class)),
new Trio<>(io.flamingock.store.couchbase.changes.failedWithRollback._003__execution_with_exception.class, Collections.singletonList(Collection.class), Collections.singletonList(Collection.class)))
);

assertThrows(PipelineExecutionException.class, () -> {
Expand Down Expand Up @@ -176,7 +175,7 @@ void failedWithRollback() {
}

@Test
@DisplayName("When standalone runs the driver and execution fails (without rollback method) should persist all the audit logs up to the failed one (FAILED)")
@DisplayName("When standalone runs the AuditStore and execution fails (without rollback method) should persist all the audit logs up to the failed one (FAILED)")
void failedWithoutRollback() {
//Given-When
Bucket bucket = cluster.bucket(BUCKET_NAME);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.flamingock.community.couchbase;
package io.flamingock.store.couchbase;

import com.couchbase.client.java.Cluster;
import com.couchbase.client.java.Collection;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.flamingock.community.couchbase;
package io.flamingock.store.couchbase;

import io.flamingock.api.StageType;
import io.flamingock.api.annotations.TargetSystem;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.flamingock.community.couchbase.changes.failedWithRollback;
package io.flamingock.store.couchbase.changes.failedWithRollback;

import com.couchbase.client.java.Collection;
import io.flamingock.api.annotations.Change;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.flamingock.community.couchbase.changes.failedWithRollback;
package io.flamingock.store.couchbase.changes.failedWithRollback;

import com.couchbase.client.java.Collection;
import com.couchbase.client.java.json.JsonObject;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.flamingock.community.couchbase.changes.failedWithRollback;
package io.flamingock.store.couchbase.changes.failedWithRollback;

import com.couchbase.client.java.Collection;
import com.couchbase.client.java.json.JsonObject;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.flamingock.community.couchbase.changes.failedWithoutRollback;
package io.flamingock.store.couchbase.changes.failedWithoutRollback;

import com.couchbase.client.java.Collection;
import io.flamingock.api.annotations.Change;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.flamingock.community.couchbase.changes.failedWithoutRollback;
package io.flamingock.store.couchbase.changes.failedWithoutRollback;

import com.couchbase.client.java.Collection;
import com.couchbase.client.java.json.JsonObject;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.flamingock.community.couchbase.changes.failedWithoutRollback;
package io.flamingock.store.couchbase.changes.failedWithoutRollback;

import com.couchbase.client.java.Collection;
import com.couchbase.client.java.json.JsonObject;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.flamingock.community.couchbase.changes.happyPath;
package io.flamingock.store.couchbase.changes.happyPath;

import com.couchbase.client.java.Collection;
import io.flamingock.api.annotations.Change;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.flamingock.community.couchbase.changes.happyPath;
package io.flamingock.store.couchbase.changes.happyPath;

import com.couchbase.client.java.Collection;
import com.couchbase.client.java.json.JsonObject;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.flamingock.community.couchbase.changes.happyPath;
package io.flamingock.store.couchbase.changes.happyPath;

import com.couchbase.client.java.Collection;
import com.couchbase.client.java.json.JsonObject;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.flamingock.community.dynamodb.driver;
package io.flamingock.store.dynamodb;

import io.flamingock.community.dynamodb.internal.DynamoDBLockService;
import io.flamingock.store.dynamodb.internal.DynamoDBLockService;
import io.flamingock.internal.common.core.error.FlamingockException;
import io.flamingock.internal.util.constants.CommunityPersistenceConstants;
import io.flamingock.internal.core.store.lock.community.CommunityLockService;
Expand All @@ -25,7 +25,7 @@
import io.flamingock.internal.core.store.audit.community.CommunityAuditPersistence;
import io.flamingock.internal.core.store.CommunityAuditStore;
import io.flamingock.internal.common.core.context.ContextResolver;
import io.flamingock.community.dynamodb.internal.DynamoDBAuditPersistence;
import io.flamingock.store.dynamodb.internal.DynamoDBAuditPersistence;
import io.flamingock.targetsystem.dynamodb.DynamoDBTargetSystem;
import software.amazon.awssdk.services.dynamodb.DynamoDbClient;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.flamingock.community.dynamodb;
package io.flamingock.store.dynamodb;

import io.flamingock.internal.common.core.context.ContextResolver;
import io.flamingock.internal.util.constants.CommunityPersistenceConstants;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.flamingock.community.dynamodb.internal;
package io.flamingock.store.dynamodb.internal;

import io.flamingock.internal.common.core.audit.AuditEntry;
import io.flamingock.internal.core.configuration.community.CommunityConfigurable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.flamingock.community.dynamodb.internal;
package io.flamingock.store.dynamodb.internal;

import io.flamingock.internal.core.store.audit.LifecycleAuditWriter;
import io.flamingock.internal.core.store.audit.community.CommunityAuditReader;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.flamingock.community.dynamodb.internal;
package io.flamingock.store.dynamodb.internal;

import io.flamingock.internal.util.dynamodb.entities.LockEntryEntity;
import io.flamingock.internal.core.store.lock.community.CommunityLockService;
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
io.flamingock.community.dynamodb.driver.DynamoDBAuditStore
io.flamingock.store.dynamodb.DynamoDBAuditStore
Loading
Loading