Skip to content

Hub 0.8.31#103

Merged
pbrassel merged 3 commits intomainfrom
hub-0.8.31
Mar 5, 2026
Merged

Hub 0.8.31#103
pbrassel merged 3 commits intomainfrom
hub-0.8.31

Conversation

@pbrassel
Copy link
Member

@pbrassel pbrassel commented Mar 5, 2026

Summary by CodeRabbit

  • New Features
    • Added the ability to build master images on demand. Users can now trigger master image builds by providing the image identifier through the client API. The system submits the build command to the Hub and automatically validates that the request was properly accepted.

@coderabbitai
Copy link

coderabbitai bot commented Mar 5, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a2516ad8-03df-44b5-8a96-b990fa882ead

📥 Commits

Reviewing files that changed from the base of the PR and between 955427f and 56b5170.

📒 Files selected for processing (3)
  • flame_hub/_core_client.py
  • tests/test_auth.py
  • tests/test_core.py

📝 Walkthrough

Walkthrough

A new public method build_master_image() is added to command the Hub to build specified master images via POST request. Concurrently, test expectations are adjusted: one test is marked as expected-fail due to pending policy requirements, and build completion validation is refined to remove progress assertions while maintaining status checks.

Changes

Cohort / File(s) Summary
New Master Image Build Feature
flame_hub/_core_client.py
Added build_master_image() method to CoreClient that sends a POST command to the Hub with "build" instruction, normalizes input to UUID, validates ACCEPTED response status, and raises API errors on failure.
Test Expectation Adjustments
tests/test_auth.py, tests/test_core.py
Marked test_update_permission as xfail due to pending optional policy id requirement; removed build_progress == 100 assertion in _wait_for_successful_build while retaining build status validation to account for Hub behavior.

Sequence Diagram(s)

sequenceDiagram
    actor Client
    participant CoreClient
    participant Hub API
    participant Response Handler

    Client->>CoreClient: build_master_image(master_image_id)
    activate CoreClient
    CoreClient->>CoreClient: Normalize to UUID
    CoreClient->>Hub API: POST /master-images/command<br/>{command: "build", image_id}
    activate Hub API
    Hub API-->>CoreClient: Response (status code)
    deactivate Hub API
    
    activate Response Handler
    CoreClient->>Response Handler: Validate status == ACCEPTED (202)
    alt Status is ACCEPTED
        Response Handler-->>CoreClient: Validation passed
    else Status is not ACCEPTED
        Response Handler-->>CoreClient: Raise APIError
    end
    deactivate Response Handler
    
    CoreClient-->>Client: Method completes / raises error
    deactivate CoreClient
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • Hub 0.8.27 #102: Introduces the ProcessStatus "executed" build status that is now validated in test assertions, providing the foundation for the refined build completion checks in this PR.

Poem

🐰 Hop! Hop! The images now build with a command so grand,
We check their status as they progress across the land,
No longer fussing o'er the progress bar reaching end,
For "executed" tells us when the Hub's work is penned! ✨

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch hub-0.8.31

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@pbrassel pbrassel merged commit 526a050 into main Mar 5, 2026
6 of 7 checks passed
@pbrassel pbrassel deleted the hub-0.8.31 branch March 5, 2026 16:20
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