M8F-152: Fix NATS consumer initialization error #80
Merged
auslin-aot merged 1 commit intoAOT-Technologies:mainfrom Mar 19, 2026
Merged
Conversation
andrepestana-aot
approved these changes
Mar 16, 2026
Collaborator
andrepestana-aot
left a comment
There was a problem hiding this comment.
Looks great! Thanks!
abilpraju-aot
approved these changes
Mar 19, 2026
auslin-aot
reviewed
Mar 19, 2026
Collaborator
auslin-aot
left a comment
There was a problem hiding this comment.
please resolve conflicts
…nvironment variable configuration.
56bb82d to
0fd3cee
Compare
|
auslin-aot
approved these changes
Mar 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



JIRA Ticket
M8F-152
Description
This PR optimizes the orchestration of NATS-related services by making them optional via Docker Compose profiles and environment variable configuration. It also addresses a database race condition by disabling migrations in the NATS consumer container.
Type
Changes
Changes Details
natsandm8flow-nats-consumerservices are now assigned to thenatsprofile, preventing them from starting by default during a standarddocker compose up.required: falseto thenatsservice dependencies in bothm8flow-backendandm8flow-nats-consumer. This ensures the Docker Compose project remains valid and can start the remaining services even when thenatsprofile is inactive.M8FLOW_NATS_ENABLED=falseby default. Modified m8flow-docker-compose.yml to dynamically inherit this value across services.sqlalchemy.exc.NoSuchTableErrorby disabling database migrations in them8flow-nats-consumercontainer (M8FLOW_BACKEND_UPGRADE_DB: "false"). This ensures only the main backend handles schema updates, preventing the consumer from attempting migrations before tables are created.Testing
docker compose up -d(NATS services remain stopped).docker compose --profile nats up -d.Related Issues
Closes #