Skip to content

fix(cli): do not validate contexts in ado delete context#841

Merged
michael-johnston merged 1 commit into
mainfrom
ap_819_ado_delete_invalid_context
Apr 13, 2026
Merged

fix(cli): do not validate contexts in ado delete context#841
michael-johnston merged 1 commit into
mainfrom
ap_819_ado_delete_invalid_context

Conversation

@AlessandroPomponio
Copy link
Copy Markdown
Member

Summary

Refactors the context deletion logic to remove unnecessary Pydantic validation and simplify the code by directly accessing YAML configuration values instead of validating the entire ProjectContext model.

Resolves #819

Files Changed

📄 orchestrator/cli/resources/context/delete.py

Simplifies the context deletion flow by removing Pydantic model validation. Instead of validating the entire ProjectContext model from the YAML file, the code now loads the YAML as a dictionary and uses get_nested_value() utility to directly access the metadataStore.scheme field. This removes the dependency on pydantic and ProjectContext model, eliminates error handling for validation errors, and makes the code more lightweight since full model validation is unnecessary for the delete operation that only needs to check the database scheme type.

Signed-off-by: Alessandro Pomponio <alessandro.pomponio1@ibm.com>
@AlessandroPomponio AlessandroPomponio added this pull request to the merge queue Apr 13, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 13, 2026
@michael-johnston michael-johnston added this pull request to the merge queue Apr 13, 2026
Merged via the queue into main with commit 1963e96 Apr 13, 2026
19 checks passed
@michael-johnston michael-johnston deleted the ap_819_ado_delete_invalid_context branch April 13, 2026 18:11
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.

bug(cli): cannot delete an invalid context with ado delete context

2 participants