Skip to content

Commit

Permalink
[API] Update Function Minimal Format (#5692)
Browse files Browse the repository at this point in the history
mod function spec

Co-authored-by: quaark <a.melnick@icloud.com>
  • Loading branch information
quaark and quaark committed Jun 3, 2024
1 parent e1908f1 commit 61e0d47
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion mlrun/common/formatters/function.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,14 @@ def format_method(_format: str) -> typing.Optional[typing.Callable]:
["metadata"],
["status"],
["spec", "description"],
["spec", "command"],
["spec", "image"],
["spec", "default_handler"],
["spec", "entry_points"],
["spec", "default_class"],
["spec", "graph"],
["spec", "preemption_mode"],
["spec", "node_selector"],
["spec", "priority_class_name"],
]
),
}[_format]
7 changes: 6 additions & 1 deletion tests/api/db/test_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,14 @@ def test_list_functions_with_format(db: DBInterface, db_session: Session):
"status": {"state": "online"},
"spec": {
"description": "some_description",
"command": "some_command",
"image": "some_image",
"default_handler": "some_handler",
"entry_points": "some_entry_points",
"default_class": "some_class",
"graph": "some_graph",
"preemption_mode": "some_preemption_mode",
"node_selector": "some_node_selector",
"priority_class_name": "some_priority_class_name",
"extra_field": "extra_field",
},
}
Expand Down

0 comments on commit 61e0d47

Please sign in to comment.