Architecture #20190
closedMake consistant id+revision format accross rule, directive, techniques in API
Description
For now, we have two format for revison in rules/directives/techniques for GET details API:
- when the object is the one requested, we output in the id
field only the uid part, and in a second revision
field, we have the revision; that second field is optionnal and not given when the revision is head;
- when we reference other objects, we use a uid+revision
format, for exemple in the directive list of rules.
- when we give ID as an input (in GET, of POST), we use various format (@GET .../{id}?revision=... ; POST .../id -d {"revision":"..."} ; etc).
Here, we want to homogeneize to:
- an id field is always in the format `uid+revision`, be it in input or output; the revision part is optionnal and when omitted (in input of outpu), it means "last revision of the object";
- when we GET
details about an object, the revision
field is always in the response and contain the returned revision (as seen by our revision base) of the object. When the requested id doesn't have a revision
part, then revision
is the current revision of the object.
Updated by François ARMAND about 3 years ago
- Status changed from In progress to Pending technical review
- Assignee changed from François ARMAND to Vincent MEMBRÉ
- Pull Request set to https://github.com/Normation/rudder/pull/3962
Updated by François ARMAND about 3 years ago
- Status changed from Pending technical review to Pending release
Applied in changeset rudder|d2a49f86f2b869b33001ae82307136d594698c14.
Updated by Vincent MEMBRÉ about 3 years ago
- Status changed from Pending release to Released
This bug has been fixed in Rudder 7.0.0~beta3 which was released today.