Implement core command infrastructure and build command logic#2
Merged
jeffreyaven merged 3 commits intomainfrom Feb 12, 2026
Merged
Implement core command infrastructure and build command logic#2jeffreyaven merged 3 commits intomainfrom
jeffreyaven merged 3 commits intomainfrom
Conversation
Implements the complete deployment orchestration engine matching the Python stackql-deploy project: - Core modules (src/core/): config rendering (globals, properties, merge operations), .env file loading, SQL query templating with anchor parsing, and StackQL execution utilities with retry logic - Template engine: Replaced simple variable substitution with Tera-based Jinja2-compatible engine including custom filters (from_json, base64_encode, merge_lists, merge_objects, generate_patch_document, sql_list, sql_escape) - Build command: Full deployment workflow with smart state checking (3 flows: traditional, optimized exports proxy, basic exists), create/update/createorupdate support, post-deploy verification - Teardown command: Reverse-order resource deletion with pre-delete existence checks, post-delete confirmation with configurable retries - Test command: Resource validation via statecheck queries or exports proxy optimization, with stack-level exports output - Base command runner: Shared resource processing (conditional evaluation, script execution, provider pulling, export handling, stack-level JSON output) - Manifest extensions: Added sql, run, skip_validation, auth fields and support for dict-style export remapping - Updated print_unicode_box to support BorderColor parameter https://claude.ai/code/session_01ShAyjRLWBYC3tPsusCxggv
Migrated the documentation site from the Python stackql-deploy project with all references updated for the Rust-based binary distribution model: - Installation via Homebrew tap, Chocolatey, MSI, Linux bundle, Mac pkg - New /install page covering all platform-specific installation methods - Removed Python-specific flags (--download-dir, --custom-registry) - Updated CLI reference docs (info, upgrade, shell, build, teardown, test) - Updated GitHub Actions docs for binary-based workflow - Replaced all PyPI/pystackql/pip references with binary equivalents - Updated repo links to stackql-labs/stackql-deploy-rs - Added template-filters to sidebar navigation https://claude.ai/code/session_01ShAyjRLWBYC3tPsusCxggv
- Restructured build.yml into 4 parallel/sequential jobs: fmt, clippy, test (run in parallel), then build (runs after all pass) - Fixed all clippy warnings (dead_code, unwrap-after-is_some, collapsible-if, map_or simplification, lifetime elision, etc.) - Applied rustfmt formatting across all source files https://claude.ai/code/session_01ShAyjRLWBYC3tPsusCxggv
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.
Summary
This PR implements the core infrastructure for stackql-deploy commands, including a new
CommandRunnerbase class that encapsulates shared resource processing logic, along with comprehensive implementations of configuration, templating, utilities, and environment handling modules. The build command is refactored to use this new infrastructure.Key Changes
Core Infrastructure
New
src/commands/base.rs: IntroducesCommandRunnerstruct that serves as the Rust equivalent of Python'sStackQLBaseclass. Handles:New
src/core/config.rs: Configuration module for:New
src/core/utils.rs: Low-level utility functions including:New
src/core/templating.rs: Query template handling:.iqlfilesNew
src/core/env.rs: Environment variable management:.envfilesCommand Updates
src/commands/build.rs: Refactored to useCommandRunnerinfrastructure with full resource deployment logicsrc/commands/teardown.rs: Updated with new command structuresrc/commands/test.rs: Updated with new command structuresrc/commands/mod.rs: Addedbasemodule exportTemplate Engine Enhancements
src/template/engine.rs: Extended with additional rendering capabilitiessrc/template/context.rs: Enhanced context managementDocumentation
Build & Configuration
Cargo.tomlwith additional dependenciesImplementation Details
CommandRunnerfollows a builder pattern for initialization, loading all necessary components (manifest, environment, providers) in sequencehttps://claude.ai/code/session_01ShAyjRLWBYC3tPsusCxggv