Avoid flash wearing by altering behavior originally introduced by Espressif (the inventor of the ESP8266)

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.

Would you like to make good-intended, but backward-incompatible changes to WiFi setup?

Poll ended at Sun Jan 08, 2017 7:55 am

Yes, I think this change is good, even though it's backward-incompatible and will confuse some users. We'll get thru it.
36
100%
No, I don't think this change is sound technically or that making backward-incompatible changes of such scale is good.
0
No votes
 
Total votes: 36

Lysenko
Posts: 62
Joined: Wed Aug 17, 2016 1:21 pm

Re: Avoid flash wearing by altering behavior originally introduced by Espressif (the inventor of the ESP8266)

Post by Lysenko » Fri Nov 11, 2016 8:50 am

Roberthh wrote:
given there's no technical reason against it, was there anything wrong with the compromise solution proposed?
Hello Woodat. Without knowing the details, I assume that even that implementation requires a change in the esp-sdk toolchain, if possible at all, which then would have to be maintained. And that's what Paul want to avoid, I guess.
It doesn't require an SDK change since the SDK (now) supports both mechanisms and the additional API can be surfaced. The issue is whether to break userspace by changing default behaviour and therefore silently invalidating existing code and documentation.

User avatar
pythoncoder
Posts: 4577
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Avoid flash wearing by altering behavior originally introduced by Espressif (the inventor of the ESP8266)

Post by pythoncoder » Fri Nov 11, 2016 9:06 am

kfricke wrote:.... What pfalcon wants to avoid is the additional support he feats from that change.
If the original behaviour remains the default I'd have thought the level of support would be minimal. If you override a default it's a case of caveat implementator and RTFM I'd have thought.
Peter Hinch

torwag
Posts: 220
Joined: Fri Dec 13, 2013 9:25 am

Re: Avoid flash wearing by altering behavior originally introduced by Espressif (the inventor of the ESP8266)

Post by torwag » Fri Nov 11, 2016 9:06 am

Hi,

just wanted to add, because I believe it was at the heat peak wrongly received, from what I understood (including pm to me), pfalcon is not against this pull request. Nor is he in favour for any other solution.

He simply wanted to point out that this particular pull request might introduce a break of user experience. That this pull request might lead to a lot of confused users and that it might not be understood by users of other esp-based environments.
In addition, there are other parts on the esp which requires work and fixes and he simply didn't see himself in the position to create in the near future the "big-everyone-happy-solution" for that particular case.

Thus, he was reluctant to "simply accept it as it is".

That does not mean that we couldn't work on it. If someone with enough time and capabilities jumps up and gets a solution which is less disruptive and does somehow catch up well all users on both sides... well the core dev team is very happy for any helping (coding) hand.

In the mean time pfalcon only tried to suggest that this pull request needs time and preparation. We might need to add "Ready-to-come"-announcements in the changelog and release notes first. We might need REPL-based warning messages, or any other method to catch as many users as possible and after we have the feeling that most users know pretty much that this change is going to happen, we have to print it bold and big in the changelogs, release notes, webpages, docu and blogs to announce it.
Please thing about all those independent blogs, discussions, webpage, tutorials, etc. All those authors need time to fix there content. The worst we could do is a "silent" push and burry it somehow deep in the git-changelog .

Thus pfalcons intention was not to reject something he dislikes, he simply argued that this kind of change needs much evaluation, more considerations and more time and preparation as many of us might thought of.

From a maintainers point of view, you do not want this changes to happen every now and then. Those needs careful introductions and careful considerations. If changes like this are introduced to frequently it will be more destructive to the community then helpful.
E.g. take something as big a the Linux kernel which clearly states "The Linux way; never ever break user experience" and then think of the screams, pain and endless discussions, the python2 to python3 (even done well prepared and for the good) switch introduced to the python community.

TLTR: Flash wear out is bad and we need to fix it! Due to current user experience, we need to do this carefully and well prepared, thus it will take time.

Hope this helps to clarify the situation a bit.

User avatar
kfricke
Posts: 342
Joined: Mon May 05, 2014 9:13 am
Location: Germany

Re: Avoid flash wearing by altering behavior originally introduced by Espressif (the inventor of the ESP8266)

Post by kfricke » Fri Nov 11, 2016 9:15 am

Lysenko wrote:... The issue is whether to break userspace by changing default behaviour and therefore silently invalidating existing code and documentation.
This statement does ex-aggregate the situation. Yes it does change the behavior and maybe break existing code and documentation needs to be adepted (my pull request does include update to the documentation of course!). But only a small part of existing code will get broken by this PR.
Most ESP users do expect from their code that they do not need to specify the wireless network credentials on every boot. This pull request does not change that. It does only need code-changes to the situations in which the settings do get persisted into flash. This is simply done with an explicit call to "esp.save_config()". It simply does not happen every time you do call "wlan.connect(...)".

In short: Your arguments are of course valid in general, but the real impact on code is not that huge as you try to tell people.

User avatar
pythoncoder
Posts: 4577
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Avoid flash wearing by altering behavior originally introduced by Espressif (the inventor of the ESP8266)

Post by pythoncoder » Fri Nov 11, 2016 9:16 am

I'm still struggling to see the problem if the default behaviour remains unchanged.
Peter Hinch

Lysenko
Posts: 62
Joined: Wed Aug 17, 2016 1:21 pm

Re: Avoid flash wearing by altering behavior originally introduced by Espressif (the inventor of the ESP8266)

Post by Lysenko » Fri Nov 11, 2016 9:55 am

kfricke wrote: In short: Your arguments are of course valid in general, but the real impact on code is not that huge as you try to tell people.
That depends on what you are doing. In a production environment changing one character or 100 lines can be much the same thing because you still have to update the whole build pipeline, rerun the entire test suite, update the build, test and user documentation in three different languages, etc.

That's why I agree with:

"If a change results in user programs breaking, it's a bug in the
kernel. We never EVER blame the user programs. How hard can this be to
understand?"

...and

"WE DO NOT BREAK USERSPACE!"

Full (NSFW) rant with swearing: https://lkml.org/lkml/2012/12/23/75

Note that I don't disagree with your change on technical grounds. In a V2 release I would support it. But in a patch, no.

User avatar
deshipu
Posts: 1378
Joined: Thu May 28, 2015 5:54 pm

Re: Avoid flash wearing by altering behavior originally introduced by Espressif (the inventor of the ESP8266)

Post by deshipu » Fri Nov 11, 2016 1:17 pm

torwag wrote:Thus pfalcons intention was not to reject something he dislikes, he simply argued that this kind of change needs much evaluation, more considerations and more time and preparation as many of us might thought of.
Perhaps we should let @pfalcon explain his intentions, instead of putting words in his mouth.

User avatar
kfricke
Posts: 342
Joined: Mon May 05, 2014 9:13 am
Location: Germany

Re: Avoid flash wearing by altering behavior originally introduced by Espressif (the inventor of the ESP8266)

Post by kfricke » Fri Nov 11, 2016 1:42 pm

He has clearly told his intentions and concerns already. He also had made clear that he does not want to get disturbed further from this direction of discussion.

We should stick here to the topic and talk the pull request and it's possible reception in the community. That will give the maintainers the possibility to estimate the impact and support costs of it.

User avatar
kfricke
Posts: 342
Joined: Mon May 05, 2014 9:13 am
Location: Germany

Re: Avoid flash wearing by altering behavior originally introduced by Espressif (the inventor of the ESP8266)

Post by kfricke » Fri Nov 11, 2016 1:45 pm

For the records: 50 hours into discussion and 19 vs 0 votes in favor of the PR.

User avatar
deshipu
Posts: 1378
Joined: Thu May 28, 2015 5:54 pm

Re: Avoid flash wearing by altering behavior originally introduced by Espressif (the inventor of the ESP8266)

Post by deshipu » Fri Nov 11, 2016 2:38 pm

kfricke wrote:For the records: 50 hours into discussion and 19 vs 0 votes in favor of the PR.
Yay, only 981 to go, good luck.

Post Reply