-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
node.info() should return better information about the actual NodeMCU version #2398
Comments
We already edit |
I'm not sure if git commit ID is a number that could be compared with another number to find out whether a node is running an outdated NodeMCU or not. That's why I suggested the Granted, it wouldn't identify git builds, but it would work for released ones. Maybe we'd need both things - the exact commit of the build and also a version number that does increase on release. |
All releases are published on the basis of a git commit, so any release has a unique git HEAD. What you seem to be wanting is an ordered value rather than a unique one. What about the DTS of the commit: git show -s --format=%ci HEAD |
Well, that would work (more or less) if turned into an integer YYYYMMDD. I realize it doesn't allow for two releases in one day but I don't think that's an issue given that releases are at least two months apart. But I'm surprised that we have |
I didn't check the code but IIRC those values represent the SDK version. |
@marcelstoer just a small FYI: the NodeMCU build prints that it's based on SDK 2.2.1 (since April) but the devVer still contains 0 so even if these *Ver fields were representing the SDK they don't match with the actual information shown at boot. And if they indeed represent the SDK (which is not documented so IIRC) then we definitely need a new version field that will represent the NodeMCU itself. |
If we are going to embed a unique identifier, then the solution has to work for |
I understand the need of unique ID based on git but if the releases are going to be marked by YYYYMMDD (like they're now, and I like it much) then I'd like to also have this "release ID" accessible from within the Lua program, because it's immediately obvious how old the firmware is and it's easy to find out what's missing or wrong there. So maybe we're aiming at two new fields in |
One reason is that any solution that we use has to work for both |
One reason to leave the git ID in there somewhere is folks are building using the cloud builder on dev and master. It would be good to know when they submit trouble tickets which build they were built off of. |
We shouldn't be arguing about whether field X should be part of
|
I agree with @marcelstoer because I realized that the DTS (@TerryE 's idea) does not carry the information about branch, and since dev can differ from master a lot the YYMMDD-HHMM mark would be ambiguous... |
Should be fixed with #2830 |
Expected behavior
node.info()
returns something concrete that identifies the version properly. At the very least thedevVer
would increment on each master release. Or a newreleaseDate
would be added to thenode.info()
table that would contain20180608
, a number derived from date that would increase on each release.Actual behavior
node.info()
returns2, 2, 0
in its Ver fields for both the April and June releases, even though there were important bugfixes and even API changes in the latter.I wish a Lua application was able to identify the NodeMCU build precisely enough so I'd know which nodes need updating the NodeMCU firmware when a new release with an important bugfix gets available.
Test code
NodeMCU version
2.2.0-master_20180608
Hardware
ESP-07
The text was updated successfully, but these errors were encountered: