Skip to content

fix cli#30

Merged
tomjemmett merged 7 commits into
mainfrom
fix_cli
May 22, 2026
Merged

fix cli#30
tomjemmett merged 7 commits into
mainfrom
fix_cli

Conversation

@tomjemmett

Copy link
Copy Markdown
Member
  • fixes the status checks
  • fixes clean up, looks up container group name from ats
  • adds vscode debug support
  • improves the status cli command

Copilot AI review requested due to automatic review settings May 20, 2026 15:31
@tomjemmett tomjemmett requested a review from a team as a code owner May 20, 2026 15:31
@tomjemmett tomjemmett added enhancement New feature or request priority: should MoSCoW priority labels May 20, 2026
@tomjemmett tomjemmett self-assigned this May 20, 2026
@tomjemmett tomjemmett requested a review from yiwen-h May 20, 2026 15:31
@codecov

codecov Bot commented May 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (f8dafd8) to head (33e0a8e).

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #30   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           11        11           
  Lines          325       352   +27     
  Branches        33        37    +4     
=========================================
+ Hits           325       352   +27     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates the NHP ACI CLI to improve status reporting and cleanup behavior by linking ACI container groups back to model-run metadata in Azure Table Storage, plus adds VS Code debug configuration.

Changes:

  • clean now resolves the ACI container group name via Table Storage status before deleting queue blobs / container groups (and adds tests for missing status/container group).
  • status output is reformatted into a table and status/progress selection logic is updated.
  • Current model runs listing now enriches ACI container groups with (dataset, model_run_id) from Table Storage, and adds a VS Code launch.json.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/unit/nhp/aci/test_clean_up.py Updates/extends cleanup tests for dataset+model_run_id lookup and edge cases.
tests/unit/nhp/aci/test___main__.py Adjusts CLI status tests for new progress keys and table output.
tests/unit/nhp/aci/status/test_status_list_current_model_runs.py Adds coverage for ATS incomplete-run lookup + updated shape of get_current_model_runs().
src/nhp/aci/status/list_current_model_runs.py Adds ATS query for incomplete runs and enriches ACI status results.
src/nhp/aci/clean_up.py Makes cleanup depend on model-run status to find container group name before deleting resources.
src/nhp/aci/main.py Changes status output formatting and progress display logic; updates clean invocation.
.vscode/launch.json Adds VS Code debugpy launch configuration.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/nhp/aci/status/list_current_model_runs.py Outdated
Comment thread src/nhp/aci/__main__.py
Comment thread .vscode/launch.json Outdated
@tomjemmett

Copy link
Copy Markdown
Member Author

@copilot can you re-review the changes? I dismissed all previous comments as either fixed or not implementing

Copilot AI commented May 20, 2026

Copy link
Copy Markdown
Contributor

@copilot can you re-review the changes? I dismissed all previous comments as either fixed or not implementing

Re-reviewed the current changes — all 73 tests pass and linting is clean. Here's a summary of the current state:

  • list_current_model_runs.py: _get_incomplete_model_runs_from_ats now correctly accepts credential/config from the caller and passes them through — no longer creates its own credentials ✓
  • clean_up.py: clean_up_model_run resolves the container group name via Table Storage before deleting, with guards for missing status or missing container group name ✓
  • .vscode/launch.json: args is now an array ["${command:pickArgs}"]
  • __main__.py status table: detail_status safely uses .get("detail_status", "unknown"); the state key access (v["aci_status"]["state"]) remains a direct lookup — get_container_group_current_state can return {} when instance_view is absent, which would raise a KeyError here. If this edge case should be guarded, I can add .get("state", "unknown") there too.

No new issues introduced beyond that one pre-existing concern.

Comment thread src/nhp/aci/status/list_current_model_runs.py

@yiwen-h yiwen-h left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you! Tested starting model runs, checking status of all current runs, checking status of a single model run, and cleaning model runs - all work great.

@tomjemmett tomjemmett merged commit c91b228 into main May 22, 2026
7 checks passed
@tomjemmett tomjemmett deleted the fix_cli branch May 22, 2026 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request priority: should MoSCoW priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants