Skip to content

Conversation

@Synicix
Copy link
Contributor

@Synicix Synicix commented Jul 1, 2025

Added

  • test case for containers that fail at start due to bad command (Required some status code handling)
  • test case for container that fail during execution (runtime exception)
  • is_failed_to_start_pod and get_container_name func for orca for testing purposes
  • names to filters when querying for container info in get_info to prevent collision with other containers
  • Started and Undefined for status to deal with certain docker container status return

Other stuff:

@Synicix Synicix added bug Something isn't working enhancement New feature or request labels Jul 1, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds new failure handling tests, status variants, and refactors orchestration logic to improve error reporting and cleanup.

  • Introduce tests for pods that fail at start or during execution and refactor basic_test into execute_wrapper
  • Extend orchestrator to report FailedToStartPod errors and new Starting/Undefined statuses, with polling for results
  • Clean up container listing filters and centralize run-info extraction in core implementation

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/orchestrator.rs Refactored test helper, added failure tests, and cleaned up list assertions
src/uniffi/orchestrator/mod.rs Added Starting/Undefined statuses and derived PartialEq on PodRun
src/uniffi/orchestrator/docker.rs Wrapped start_container errors in a FailedToStartPod kind and added wait polling
src/uniffi/error.rs Defined FailedToStartPod error variant and helper methods
src/core/orchestrator/docker.rs Centralized run-info extraction and added name-based filters
src/core/error.rs Updated Debug impl to include the new error variant
Comments suppressed due to low confidence (5)

tests/orchestrator.rs:168

  • The comment says the pod should be deleted, but the assertion below checks that it exists in the list. Update the comment to match the intent, or adjust the assertion.
        // Make sure the pod has been deleted after failing to start

src/uniffi/error.rs:137

  • The doc comment is incomplete. Expand it to explain when get_container_name returns Some and what it represents.
    /// Returns container name if the

src/uniffi/orchestrator/mod.rs:27

  • New Starting and Undefined status variants were added but not exercised by any tests. Consider adding tests that cover these states to ensure correct handling.
    Starting,

tests/orchestrator.rs:1

  • The crate-level attribute block is indented by one space, which prevents it from being applied. Move #![expect(...)] to column 0 so it’s recognized.
#![expect(

src/core/orchestrator/docker.rs:12

  • There is no bollard::secret module. Import ContainerInspectResponse and ContainerSummary from bollard::models instead to compile correctly.
    secret::{ContainerInspectResponse, ContainerSummary},

Comment on lines 206 to 208
pod.image = "alpine:3.14".to_owned();
pod.command = "python file_does_not_exist.py".to_owned();

Copy link

Copilot AI Jul 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This assignment is immediately overwritten on the next line. Remove the redundant pod.image (and the first pod.command) to keep the test setup clear.

Suggested change
pod.image = "alpine:3.14".to_owned();
pod.command = "python file_does_not_exist.py".to_owned();

Copilot uses AI. Check for mistakes.
@codecov
Copy link

codecov bot commented Jul 1, 2025

Codecov Report

❌ Patch coverage is 96.80000% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/core/orchestrator/docker.rs 97.53% 2 Missing ⚠️
src/core/error.rs 0.00% 1 Missing ⚠️
src/uniffi/error.rs 87.50% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@eywalker eywalker merged commit 8c772b5 into nauticalab:dev Oct 14, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants