Skip to content

feat(cli): executor mvp#820

Merged
dieppa merged 5 commits intodevelopfrom
cli_executor_mvp
Feb 4, 2026
Merged

feat(cli): executor mvp#820
dieppa merged 5 commits intodevelopfrom
cli_executor_mvp

Conversation

@dieppa
Copy link
Member

@dieppa dieppa commented Feb 4, 2026

Introduces the Flamingock CLI, a command-line tool that enables running Flamingock process independently from the normal application lifecycle.

Execution Model

The CLI operates by spawning the user's application as a subprocess with a controlled configuration:

  1. The CLI packages and executes the user's Spring Boot application JAR
  2. It activates the flamingock-cli Spring profile, which triggers Flamingock to run in CLI mode
  3. Once the changes are applied, the application shuts down automatically

This approach ensures that changes run in the exact same environment as production, using the same dependencies, configurations, and connection settings defined in the application.

Bean Control Annotations

To optimize CLI execution and avoid loading unnecessary components (web servers, schedulers, message listeners, etc.), two new annotations are provided:

Annotation Behavior
@FlamingockCliExcluded Bean is excluded when running via CLI
@FlamingockCliOnly Bean is only loaded when running via CLI

Example usage:

@Component
@FlamingockCliExcluded
public class KafkaConsumer {
    // Not loaded during CLI execution
}

@Configuration
public class AppConfig {

    @Bean
    @FlamingockCliExcluded
    public WebServer webServer() {
        // Excluded during CLI execution
    }

    @Bean
    @FlamingockCliOnly
    public DataSource minimalDataSource() {
        // Only loaded during CLI execution
    }
}

These annotations are meta-annotations wrapping Spring's @Profile, so they integrate seamlessly with existing Spring profile mechanisms.

@dieppa dieppa merged commit c2cfd92 into develop Feb 4, 2026
4 checks passed
@dieppa dieppa deleted the cli_executor_mvp branch February 9, 2026 12:24
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