API succeeds if invalid parameter is passed
Bug #1785690 reported by
Andres Rodriguez
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Invalid
|
Low
|
Unassigned |
Bug Description
I passed an invalid parameter over the API and it succeeded without showing me an error.
In this case, the resource_pool parameter doesn't exist, but the operation succeeded.
ubuntu@maas00:~$ maas admin machine update k8s4kq resource_
Success.
Machine-readable output follows:
{
"volume_
"cpu_speed": 2300,
"storage": 120034.123776,
"status_
"zone": {
"name": "test1",
"id": 1,
},
"tag_names": [],
"status_
Changed in maas: | |
milestone: | none → 2.5.0alpha2 |
importance: | Undecided → High |
status: | New → Triaged |
description: | updated |
Changed in maas: | |
milestone: | 2.5.0alpha2 → 2.5.0beta1 |
Changed in maas: | |
assignee: | nobody → Mike Pontillo (mpontillo) |
tags: | added: api |
Changed in maas: | |
milestone: | 2.5.0beta1 → 2.5.0beta2 |
Changed in maas: | |
milestone: | 2.5.0beta2 → 2.5.0rc1 |
Changed in maas: | |
milestone: | 2.5.0rc1 → 2.5.x |
Changed in maas: | |
status: | Opinion → Triaged |
importance: | High → Low |
assignee: | Mike Pontillo (mpontillo) → nobody |
milestone: | 2.5.x → none |
summary: |
- [2.5, API] API succeeds if invalid parameter is passed + API succeeds if invalid parameter is passed |
tags: |
added: cli removed: api |
To post a comment you must log in.
This is a large API design change that would need to be discussed further before implementing.
Each API endpoint differs in how it accepts parameters (some are tightly coupled to Django forms, and some aren't, for example).
Implementing it generally may also cause forward- compatibility problems (such as if we support a new optional parameter in MAAS 2.6, and API clients make use of it before it is available).
Finally, this is a risky change to treat as a bug fix, since it would touch the entire surface of the API.
Thus, marking this 'Opinion' until we discuss further.