Skip to content

Feat/docker compose setup#135

Open
tarungka wants to merge 2 commits intomasterfrom
feat/docker-compose-setup
Open

Feat/docker compose setup#135
tarungka wants to merge 2 commits intomasterfrom
feat/docker-compose-setup

Conversation

@tarungka
Copy link
Copy Markdown
Owner

@tarungka tarungka commented Oct 2, 2025

No description provided.

This commit introduces a Docker Compose setup to facilitate local development and end-to-end testing of the Wire application.

Key changes include:

- **`docker-compose.yml`**: Defines services for the Wire application, PostgreSQL, Kafka, Zookeeper, and Elasticsearch. This provides a complete, isolated environment for running and testing the application with its key dependencies.

- **`config.yml`**: A sample configuration file that sets up a pipeline from a Kafka source to PostgreSQL and Elasticsearch sinks. This allows for immediate testing of the data flow.

- **`README.md` Update**: Added a new section to the README with clear instructions on how to build, run, and test the application using the new Docker Compose setup.

- **`.gitignore` Update**: The `docker-compose.yml` file has been added to `.gitignore` to keep the local development setup out of version control.

- **Extensive Refactoring and Bug Fixes**:
  - Refactored the `DataSink` interface and its implementations (`elasticsearch`, `file`, `kafka`) to correct a design flaw in the pipeline's worker synchronization, which was causing deadlocks and race conditions in the tests. The `Write` method is now blocking and correctly manages its own goroutines.
  - Corrected the core pipeline logic in `internal/pipeline/pipeline.go` to properly manage the lifecycle of worker goroutines and prevent deadlocks.
  - Resolved numerous compilation errors in `internal/store/store.go` and `internal/pipeline/pipeline_test.go` that arose from inconsistencies with updated protobuf definitions and API changes.
  - Overhauled the test suite in `internal/pipeline/pipeline_test.go` to align with the refactored code, fixing incorrect mock expectations, assertions, and race conditions.
This commit introduces a Docker Compose setup to facilitate local development and end-to-end testing of the Wire application.

Key changes include:

- **`docker-compose.yml`**: Defines services for the Wire application, PostgreSQL, Kafka, Zookeeper, and Elasticsearch. This provides a complete, isolated environment for running and testing the application with its key dependencies.

- **`config.yml`**: A sample configuration file that sets up a pipeline from a Kafka source to PostgreSQL and Elasticsearch sinks. This allows for immediate testing of the data flow.

- **`README.md` Update**: Added a new section to the README with clear instructions on how to build, run, and test the application using the new Docker Compose setup.

- **`.gitignore` Update**: The `docker-compose.yml` file has been added to `.gitignore` to keep the local development setup out of version control.

- **Extensive Refactoring and Bug Fixes**:
  - Refactored the `DataSink` interface and its implementations (`elasticsearch`, `file`, `kafka`) to correct a design flaw in the pipeline's worker synchronization, which was causing deadlocks and race conditions in the tests. The `Write` method is now blocking and correctly manages its own goroutines.
  - Corrected the core pipeline logic in `internal/pipeline/pipeline.go` to properly manage the lifecycle of worker goroutines and prevent deadlocks.
  - Resolved numerous compilation errors in `internal/store/store.go` and `internal/pipeline/pipeline_test.go` that arose from inconsistencies with updated protobuf definitions and API changes.
  - Overhauled the test suite in `internal/pipeline/pipeline_test.go` to align with the refactored code, fixing incorrect mock expectations, assertions, and race conditions.
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.

1 participant