News for hackers. Stuff that matters.
Re:How Shopify Manages API Versioning and Breaking Changes by Judson on Thursday December 19, 2019 @09:10AM (#21834990)
It's interesting to compare and contrast this method of API management with Stripe.

As far as I understand, the Stripe api would continue to work indefinitely so long as you lock your api version, whereas Shopify would eventually break the app as they essentially backport breaking changes to older api versions.

Initially, I thought Stripe's method was superior, and would provide the best API experience, but realized that Stripe and Shopify have different incentives w/r/t their api.

For Stripe, breaking a functioning site harms revenue, and generally the developer is the Stripe customer.

For Shopify, their customer is the store owner, and for the most part, the store will continue to function because that is mostly controlled by shopify. The developer api is for added functionality, and it is in the interest of Shopify and the merchant that those apps continue to be updated and utilizing the latest features.

So, two different ways of managing breaking changes, but both are ultimately centered around providing the best customer experience.

Re:How Shopify Manages API Versioning and Breaking Changes by mr__y on Thursday December 19, 2019 @10:20AM (#21835583)
>those apps continue to be updated and utilizing the latest features.

while this is orthogonal to Shopify API or your post at all, since you mentioned the need of updates, I just wanted to use that opportunity to vent my frustration with the constant push to update everything all the time and judging any piece of software by using "when was the last update" as a metric.

The problem I see is that not all apps or libs need (frequent) updates, many (maybe most) do need them, but some don't. They provide some functionality, they do that well and you could call them "complete". Maybe some security fix could be needed from time to time, but with a mature code being in use for many years event those are not frequent.

For example, consider something like ping utility. It does what it does for many decades. There was a need to add IPv6 support, but that was almost two decades ago. Why would anyone need to update it? I do not want any additional functionality, I don't want it to send emails or have social media share button. I want it to send ICMP echo requests and receive ICMP echo replies and nothing more. Aside from some security fixes no updates should be needed for 10+ years. This utility is done. It should not be thrown upon just because there were no updates for many years.

While of course neither ecommerce or Shopify platform are "done" and they get many updates now and will get updates in future it does not mean that some functionalities could have reached "done" stage.

For a "complete and done" addon, there could be a need for a security fix from time to time. There could be a need for some adjustments if a major browser introduces a new deviation from JS/CSS/HTML standards and forces everyone to update their code. But those events happen from time to time, possibly not that frequently. This means that some addon/plugin would not require any updates during the periods between those events and those periods could be many months/years long. But hey: "this addon did not receive any updates for 13 months, it must be really bad and should be avoided". This leads to a situation where a competing solution with tons of bugs will look better just because it receives two updates a week.

Re:How Shopify Manages API Versioning and Breaking Changes by pc86 on Thursday December 19, 2019 @12:44PM (#21837232)
Well first of all I think it's a straw man to imply that anyone would want to send emails or share to Facebook out a ping utility. That's sort of a big thing that makes utilities different than applications.

Edit: I deleted a couple sentences and realize now this might not convey exactly what I meant. Utilities are easy to call "done," applications are not. Applications interact with external forces who do change constantly (other software, business processes, law and regulation, etc). I think in general, updating applications is a necessary thing, bordering on good, regardless of circumstances.

Re:How Shopify Manages API Versioning and Breaking Changes by pilom on Thursday December 19, 2019 @02:09PM (#21838140)
I think the parent is saying that API's should be utilities and not applications.
Re:How Shopify Manages API Versioning and Breaking Changes by sbilstein on Thursday December 19, 2019 @02:12PM (#21838170)
100%

Companies may have really good reasons to break old APIs. I’ve done this before...retiring an old framework and set of APIs that was inherently much less secure than what the bulk of customers needed.

Re:How Shopify Manages API Versioning and Breaking Changes by t0astbread on Friday December 20, 2019 @06:43AM (#21843388)
The question is, is everything that uses the Shopify API an application?
Re:How Shopify Manages API Versioning and Breaking Changes by dwild on Thursday December 19, 2019 @03:24PM (#21838854)
> I just wanted to use that opportunity to vent my frustration with the constant push to update everything all the time and judging any piece of software by using "when was the last update" as a metric.

The update in theses cases are not necessary to keep the most recent feature, but to stay connected to the interface that does change with time.

Someone needs to update the interface between the two while things evolve. Like it or not, but that's need to be done. If the tool is used and like by a few, then why not push that requirement toward the ones theses few that used it and like it, instead of supporting everything, even what's no longer used?

Re:How Shopify Manages API Versioning and Breaking Changes by wvh on Thursday December 19, 2019 @04:43PM (#21839642)
One reason would be to make sure somebody's still around. I'd make tiny updates to let dependents know that I'm still watching the code base. Where I work, code is (sadly enough) dead pretty much when workers' contracts or consultant hiring agreements end.

Sporadic updates tell those who depend on the code that stability and security updates are still being handled, even if the code is "complete". I'm not sure I'd have a lot of faith in code that looks abandoned.

Re:How Shopify Manages API Versioning and Breaking Changes by stickfigure on Thursday December 19, 2019 @10:33PM (#21841529)
> ping...Why would anyone need to update it?

How about being able to ping TCP ports? I need this for debugging all the time. Yeah, I use tcping instead... but why is this a separate tool? Dumb.

I'm pretty sure that for every tool you think is "done", there's someone out there screaming at its inadequacy.

Re:How Shopify Manages API Versioning and Breaking Changes by celticninja on Thursday December 19, 2019 @11:20PM (#21841692)
Do one thing, do it well. You could always bind tcping to a shorter alias or create your own ping that does what you need.
Re:How Shopify Manages API Versioning and Breaking Changes by stickfigure on Friday December 20, 2019 @12:38PM (#21845849)
You think "one thing" is probe connectivity over ICMP and I think "one thing" is probe connectivity. Someone else could reasonably argue that "one thing" is probe the network.

People use this phrase a lot but I feel that they emphasize the wrong part. It's all about "do it well", no matter what you do.

Re:How Shopify Manages API Versioning and Breaking Changes by pbreit on Thursday December 19, 2019 @12:58PM (#21837390)
I don't mind updates that are incremental and backwards compatible.

I LOATHE breaking changes. They are almost never actually necessary.

Re:How Shopify Manages API Versioning and Breaking Changes by gingerlime on Thursday December 19, 2019 @09:38AM (#21835232)
Funny that you mention Stripe, because it was definitely the canonical backwards compatibility API for me.

... Until just recently in mid Nov they changed some behavior that caused us to double/triple/quadruple charge customers unintentionally in some not-so-uncommon edge cases... I’m still trying to square this one with their support, so details are a bit thin. But definitely a big surprise for me to see this happening when previously I never imagined something like this can happen given the API versioning stability.

Re:How Shopify Manages API Versioning and Breaking Changes by Judson on Thursday December 19, 2019 @10:17AM (#21835547)
You know, you just jogged my memory here. We did have an issue with Stripe changing the order / timing of payment_failed webhooks, which caused them to be sent before the next payment attempt was known.

We used the payment failed hook to send an email to our customers and let them know when we'd be retrying the charge, which was no longer possible because the next_payment_attempt field was null. Before the change, a next_payment_attempt=null meant the charge would not be retried.

I reported the issue and the webhook changes were rolled back a month later. Really threw a wrench into our flow.

I will say that generally speaking, Stripe is the canonical backwards compatibility API in my mind. With a few edge cases.

Re:How Shopify Manages API Versioning and Breaking Changes by rudasn on Thursday December 19, 2019 @12:04PM (#21836749)
Not sure if this helps but there was an issue with chrome submitting forms multiple times recently. It has been fixed in the recent 79 release.
Re:How Shopify Manages API Versioning and Breaking Changes by gingerlime on Thursday December 19, 2019 @07:16PM (#21840652)
It’s not that. Purely a Stripe backend change in this case. They confirmed it but I’m still waiting for more details.