-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix missing pipeline implementations. #1514
base: main
Are you sure you want to change the base?
Conversation
@@ -91,6 +99,20 @@ def test_default_fallback_playbook_explanation(self): | |||
log, | |||
) | |||
|
|||
# 'dummy' does not have a ChatBot pipeline | |||
@override_settings(ANSIBLE_AI_MODEL_MESH_CONFIG=json.dumps(CHATBOT)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can do without the json.dumps
call here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ANSIBLE_AI_MODEL_MESH_CONFIG
must be a string
containing either JSON or YAML.
Using a dict
is not supported (remember, the value is loaded from an environment variable).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean, CHATBOT
can just be a plain YAML string :-)
|
||
return {k: v_or_default(k, v) for k, v in REGISTRY[pipeline_provider].items()} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this runs during the module loading, it will be a bit tricky to properly unit-test it. I feel like it would be better to isolate this in a dedicated function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like you're right (I've added a test but it's not being detected as covering this code).
I'll move it out.
2e1700d
to
edd5623
Compare
edd5623
to
189e0da
Compare
Quality Gate passedIssues Measures |
This PR does not need a corresponding Jira item.
Description
It was possible for a User to configure a pipeline to use a provider that did not support a given feature.
In such scenarios
get_model_pipeline(<feature>)
returnedNone
leading to RTEs.This PR ensures a
NOP
implementation is returned if an explicit implementation does not exist.Testing
See "Steps to test"
Steps to test
ANSIBLE_AI_MODEL_MESH_CONFIG
to include:Scenarios tested
See "Steps to test"
Production deployment