<p dir="ltr"><br>
On Jun 5, 2015 4:36 AM, "Sean Dague" <<a href="mailto:sean@dague.net">sean@dague.net</a>> wrote:<br>
><br>
> On 06/05/2015 01:28 AM, Adrian Otto wrote:<br>
> ><br>
> >> On Jun 4, 2015, at 11:03 AM, Devananda van der Veen<br>
> >> <<a href="mailto:devananda.vdv@gmail.com">devananda.vdv@gmail.com</a> <mailto:<a href="mailto:devananda.vdv@gmail.com">devananda.vdv@gmail.com</a>>> wrote:<br>
> >><br>
> >><br>
> >> On Jun 4, 2015 12:00 AM, "Xu, Hejie" <<a href="mailto:hejie.xu@intel.com">hejie.xu@intel.com</a><br>
> >> <mailto:<a href="mailto:hejie.xu@intel.com">hejie.xu@intel.com</a>>> wrote:<br>
> >> ><br>
> >> > Hi, guys,<br>
> >> ><br>
> >> > I’m working on adding Microversion into the API-WG’s guideline which<br>
> >> make sure we have consistent Microversion behavior in the API for user.<br>
> >> > The Nova and Ironic already have Microversion implementation, and as<br>
> >> I know Magnum <a href="https://review.openstack.org/#/c/184975/">https://review.openstack.org/#/c/184975/</a> is going to<br>
> >> implement Microversion also.<br>
> >> ><br>
> >> > Hope all the projects which support( or plan to) Microversion can<br>
> >> join the review of guideline.<br>
> >> ><br>
> >> > The Mircoversion specification(this almost copy from nova-specs):<br>
> >> <a href="https://review.openstack.org/#/c/187112">https://review.openstack.org/#/c/187112</a><br>
> >> > And another guideline for when we should bump Mircoversion<br>
> >> <a href="https://review.openstack.org/#/c/187896/">https://review.openstack.org/#/c/187896/</a><br>
> >> ><br>
> >> > As I know, there already have a little different between Nova and<br>
> >> Ironic’s implementation. Ironic return min/max version when the requested<br>
> >> > version doesn’t support in server by http-headers. There isn’t such<br>
> >> thing in nova. But that is something for version negotiation we need<br>
> >> for nova also.<br>
> >> > Sean have pointed out we should use response body instead of http<br>
> >> headers, the body can includes error message. Really hope ironic team<br>
> >> can take a<br>
> >> > look at if you guys have compelling reason for using http headers.<br>
> >> ><br>
> >> > And if we think return body instead of http headers, we probably<br>
> >> need think about back-compatible also. Because Microversion itself<br>
> >> isn’t versioned.<br>
> >> > So I think we should keep those header for a while, does make sense?<br>
> >> ><br>
> >> > Hope we have good guideline for Microversion, because we only can<br>
> >> change Mircoversion itself by back-compatible way.<br>
> >><br>
> >> Ironic returns the min/max/current API version in the http headers for<br>
> >> every request.<br>
> >><br>
> >> Why would it return this information in a header on success and in the<br>
> >> body on failure? (How would this inconsistency benefit users?)<br>
> >><br>
> >> To be clear, I'm not opposed to *also* having a useful error message<br>
> >> in the body, but while writing the client side of api versioning,<br>
> >> parsing the range consistently from the response header is, IMO,<br>
> >> better than requiring a conditional.<br>
> >><br>
> > +1. I fully agree with Devananda on this point. Use the headers<br>
> > consistently, and add helpful errors into the body only as an addition<br>
> > to that behavior, not a substitute.<br>
><br>
> I think the difference between Nova and Ironic here is that Nova doesn't<br>
> send all the headers all the time in the final implementation (that part<br>
> of the spec evolved out I think). Part of that was pressure about Header<br>
> bloat that people were concerned about, as that impacts caching layers.<br>
><br>
> I would a agree that if Ironic is sending all the headers all the time,<br>
> that's fine. However, for consistency it would be great to also put a<br>
> real body that explains the issue as well, </p>
<p dir="ltr">Agreed.<br></p>
<p dir="ltr">> as headers are not the first<br>
> place people look when things go wrong, and are often not logged by<br>
> client side tools on errors (where the body would be).<br>
><br>
>         -Sean<br>
><br>
> --<br>
> Sean Dague<br>
> <a href="http://dague.net">http://dague.net</a><br>
><br>
> __________________________________________________________________________<br>
> OpenStack Development Mailing List (not for usage questions)<br>
> Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
> <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
</p>