Breaking changes and their impact == 25 million minutes a year

This topic has come up several times in the past and it quickly devolves into arguments over the necessity of one or more specific changes being implemented in the current revision of Home Assistant. I’m posting this to open a broader discussion on the impact of breaking changes and how they are approached by individual contributors along with the project team as a whole.

First, let’s all acknowledge that Home Assistant is a huge project, with an incredible pace of development and well over a thousand individual contributors. Organizing an open source project of this scale is a massive undertaking, and we’re all the beneficiaries of this work. Further, due to the fact that this project integrates with so many external devices, each with their own development roadmap, it’s inevitable that outside forces are going to create situations such that Home Assistant components need to be updated on occasion, and those updates may require changes to how the user’s configuration is put together.

Calculating the impact of breaking changes

With all this acknowledged, let’s talk about the impact that a single breaking change has on the user population as a whole. I’ve asked around for an estimate of how many Home Assistant users there are today. I don’t have a firm answer, but it was suggested that the number is somewhere north of 100k, so I’m going to frame the argument below with that number.

Home Assistant releases are (generally) published on a two-week release schedule. Every two weeks we have the potential for breaking changes to be introduced, and a blog post is published outlining any such changes made. As I write this today, the most-recent release of Home Assistant is version 0.105 which comes with a list of 33 breaking changes along with 4 components removed.

This means, every two weeks, every user of Home Assistant is required to review a list of 37 things against their configuration and to address the issues outlined. Each change may only impact a small subset of the overall user base, but no user can safely upgrade without reviewing this list at a minimum. If a user chooses to skip an upgrade cycle they are free to do so, but the breaking changes are cumulative, which means at some point they are going to have to address the list regardless of whether they are upgrading on every cycle. The technical debt incurred just piles up for a later day.

Let’s take a conservative estimate of 5 minutes to review this list of 37 things and to implement any required changes to one’s own environment. If we figure there are 100,000 users, this means the collected Home Assistant community spends 500,000 minutes, every two weeks, dealing with the breaking change list. If we figure on 50 releases a year, that’s 25,000,000 minutes a year worth of burden placed upon the community.

Using the fictional “Full Time Equivalent” metric for project management (meaning, a full time employee putting in 1645 hours per year), in one year the Home Assistant project creates 253 FTEs worth of work for the collected userbase dealing with breaking changes alone.

I put these (admittedly highly-artificial) numbers out there to make a point: it feels like the individual developer, while contributing code to Home Assistant, is not really keeping in mind the impact that breaking changes have on the larger community as a whole. The common response is “it only takes a couple minutes to fix”, which is true, but that doesn’t take into account the massive userbase impacted. “It only takes a couple minutes” turns into 200,000 minutes of work required.

With all this in mind, how can we address these changes in such a way as to not place additional burden on the userbase every couple of weeks? Can we collectively come up with a process for reviewing PRs such that required changes don’t break existing configurations, and allow for deprecated config values to exist without adversely affecting the user?

7 Likes

Releases are every three weeks and there is a break at the end/beginning of the year with no releases so you’re going to have to number crunch again. :grinning:

In all seriousness, I don’t see this as that big of an issue. Run some numbers on how much time people spend tweaking their front end to make it look just right, or making automation for just about everything. Im sure that time pales in comparison to your 25,000,0000 minutes.

There are already avenues in place to discuss breaking changes, through issues in the home assistant github page. It’s just that users on this community forum do not take these avenues. You’re welcome to go through the PR’s and comment when a change does not bode with you.

3 Likes

I understand this response, but again let’s frame it in terms of time spent. Instead of reviewing the blog post with each release, you’re suggesting each of the 100k users should now be manually reviewing every single PR. I think it’s safe to presume that this approach blows that “25 million minutes” number out of the water.

“Review all the PRs” is the Vogon solution to the problem.

2 Likes

How do you get the 50 releases a year if a release is every 2 weeks?

I think it’s important to remember that Home Assistant can still be considered alpha software, since it has not reached v1.0.0 yet. Everything in semantic versioning v0.x.x is allowed breaking changes between any version.

Remember that the HA team is actually volunteers writing open source for fun. Their job is not to cater to you, but to the source code itself (until they are ready for a stable 1.0.0 release). They are also working hard at getting to a v1.0.0 release, which will require a lot of breaking changes in the short term.

2 Likes

This is open source package. Either they do it, a volunteer, or a paid employee does it. Are you volunteering?

1 Like

Whoops, accidentally deleted my earlier post so I’ll just reply again here:

I knew while posting this the first response would be taking issue with the numbers presented.

To be clear - They are a strawman SWAG, nothing more. The argument presented stands regardless of the actual direct impact in terms of minutes spent. It’s “a lot”, and I think we can all agree upon that.

Implicit in your post is the suggestion that things MUST operate this way, that every breaking change should and must require every user to react with every release.

Are there no alternatives? Can we, as members of a community around this project, come up with a better way to handle this?

Alpha aside, breaking changes are still going to occur, just less. And @luma is trying to just discuss ways to handle it.

Currently we handle it after the change occurs. He’s looking for ways to discuss prior to the changes, to potentially reduce the breaking changes.

2 Likes

What alternatives do we have? Take a look at this thread. A breaking change is occurring and the USERS on this forum came up with a solution prior to release:

1 Like

I guess one way to handle it would be to create a topic for breaking changes and possible solutions that are being edited on the first post? Instead of “spamming” the blog post about it to rather collect them?

Avoidance of breaking changes in this kind of project, at this early stage in the lifecycle will result in overly complex code for the long term. Decisions which were made with the right intentions but have, with hindsight, been wrong get baked in and workarounds rather than fixes are implemented. Leading to massive maintenance issues long term, code bloat and a host of other issues such as bugs and security vulnerabilities

This is alpha software and anyone using it should understand and accept that it comes with caveats.

If there’s anything wrong, it is that point is not made clearly enough for newcomers.

4 Likes

To keep this thread on-track, allow me to throw out some ideas.

Don’t crash on deprecated configuration statements

Several times in the past we’ve seen phase-in for a breaking change where a warning will be thrown for several versions when a particular statement is encountered. Eventually, a release will be issued where the configuration is officially deprecated and Home Assistant will fail to load.

This may still be required for substantial changes to an individual component, but there are a whole lot of situations where a particular statement simply doesn’t make sense anymore due to other changes that were made in the component.

For example, the vizio component long ago had a problem where it would log spew due to the self-signed SSL cert used by Vizio. Instead of fixing the problem, a configuration value suppress_warning was added to the component that would simply silence these errors.

Later, the issue was resolved somehow and the suppress_warning statement was deprecated. Anyone who had implemented this workaround now had to go back and remove the workaround or Home Assistant wouldn’t load.

Maybe, instead of breaking Home Assistant, one could simply ignore the deprecated configuration statement, and possibly log an error somewhere to let the user know it was happening? This is done temporarily, why not just leave it this way so we don’t break things that have no bearing on the user’s configuration?

Obviously this does not fit all breaking changes, but addresses some subset that otherwise would require user attention.

1 Like

The first commit to master was in 2013. Seven years later, are we still thinking we’re in the “early” stage of development?

1 Like

Its nothing to do with time, it’s to do with the stated position of the project. It is not a v1 released application. Any one basing their config or the config of their ‘users’ on that needs to accept they take the rough with the smooth.

It feels like your argument boils down to “there’s nothing we can do”. I feel differently, I think there might be some ideas we can agree upon collectively that will make the upgrade experience better for everyone.

Certainly agree that some of these breaking changes could be posted in this forum for (quick?) discussion / opinions before being implemented in, what to some can feel like, an autocratic fashion.

The one that comes to mind, for me, is the state_color: discussion that permeated the .105 Blog post/thread.

Seems an RFC: Breaking Change - Automatic Icon Color thread started in the forum could have elicited quick, honest, likely even helpful, feedback - before users were upset at the already-been-implemented change.

It clearly wouldn’t makes sense to create RFC threads for EVERY breaking change, but seems some of them could benefit from proactive solutions / productive comments vs. reactive frustration.

Certainly realize that it’s IMPOSSIBLE to please EVERYONE regarding EVERY change - SOMEONE will ALWAYS be unhappy w/ the decision. Also not looking to consume valuable developer time/energy reading forums / opinions on every change…

2 Likes

Yes, which is why I keep hammering on the ‘who is going to do this’ aspect. I’d personally rather have new bells and whistles and improved performance over breaking changes. Which can be actively ignored by not updating.

2 Likes

There might be ways to improve things but there is no perfect solution. Some points I haven’t seen mentioned.

  1. Some people like breaking changes for various reasons. They see them a positive movement. They see them as fun and things to tinker with that relate to a hobby they enjoy.

  2. Breaking changes aren’t always Home Assistants fault. Many cloud services change APIs, discontinue products, etc etc etc that are out of our control.

  3. The powers that be have already said in some form that they aren’t too worried about having breaking changes before 1.0. After that I think they will re-evaluate and see.

1 Like