-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
Add Nebra software version #290
Comments
Since this is the very first task of my new role I'd like to check my understanding: In the current state hm-diag does not report the version of the Nebra firmware and we'd like to get it in that report. Is this correct? Will that be the version of helium-miner-software or hm-diag's? How do we track our releases? |
@marvinmarnold think maybe we were going to scrap this as we are now just appending a number to the Helium firmware version and we have the settings.ini from the main repo? Unless we want to expose all of the versions from settings.ini as ENV variables into the diagnostics container perhaps? |
I'm seeing an ENV variable in docker-compose file. I think this is what we'd like to report back. I see that hm-diag version doesn't match to helium-miner-software's version. and the most logical one would be to report helium-miner-software's. What do you think? |
I don't see a settings.ini file in the main repo. Is that created dynamically on first run or carried by another repo? Sorry, these are really silly questions, but please bare with me while I try to explore everything :) Edit Note: Found my answer in PR helium-miner-software#341. |
@MuratUrsavas at the moment we have the firmware version in diagnostics already and it takes the format from helium version such as What I'm not sure of is whether @vpetersson and @marvinmarnold think it's still relevant to have a separate Nebra version number and helium firmware version or whether we could keep this incrementing way. Alternatively / as well as this we could host use the short SHAs in the settings.ini file for each container version perhaps. Not sure exactly what is best |
Thanks for the explanation Aaron. I thought the same. One readable version in the main repo should be enough. We can pull the SHA's of the sub repos at build time (need to check the possibility). IMHO we don't need to track every sub repo individually with readable versions. I'll wait for a consensus on this issue. Edit Note: We're using the SHA in the "image" variable anyway. I think that variable could be used for version tracking / reporting for the sub repos. |
Yeah I agree I'm not sure there's much merit in having all the SHAs. The end user doesn't really care and we can already cross reference back to them. FYI in helium-miner-software repo the files are built and stored in device-compose-files folder and this is what is pushed to balena. So not sure there's any real need to do anything else with that particularly But yeah maybe just see what @marvinmarnold and @vpetersson think as there may be something I'm not remembering here |
So what I'm thinking is we do something like You might need to check with @SebastianMaj or @kashifpk to ensure that we export this as an environment variable in the docker-compose file generated in helium-miner-software. |
@shawaj Excuse my ignorance but I can't see this folder anywhere. Obviously "balena push" builds the image on balena-cloud. Therefore I tried to build the image locally with "balena build" command, switched the device to local mode but yet to see it. Neither on my dev machine nor on my test device. |
@MuratUrsavas so i wouldn't recommend using 'local mode' as it doesn't exactly mimic the remote setup. What we do instead is to create a dedicated developer fleet for you that you can use. |
Things are moving really fast. Now I know why ı didn't see it. Master does not look like the same as on Monday :) I had forked it as usual and was taking a look with it. Now deleted the fork and cloned the original repo as said in the onboarding doc. |
I'm planning to add version information as |
I'd brake them into two ENV variables instead. |
I also think it should be two separate values. I also think the Nebra version should be based on semantic versioning like Aaron suggested in the past. We would then stop appending Related to: NebraLtd/hm-pyhelper#20 |
OK, two values then. So should we implement semantic versioning in this issue or leave it to another one? Since I'm pretty newbie, I'd leave it to a new issue :) I need to figure out how to bump patch and prerelease version numbers. |
Sure, |
Yep, sure thing! |
I thought that adding "xxxxxxx-dirty" flag could be nice to check if someone has done something manually on that particular release (say a newcomer developer like me). For this I need to check the dirtiness status of the repo and done it easily in a git installed environment. (not libgit2). First question: is git already installed on "ubuntu-latest" machine in the pipeline? Second question: If so, then it would be better to keep all the logic inside of |
It's impossible to get a dirty state in GitHub Actions as it just pulls from upstream.
If you ever feel the need to invoke
Yes, you will need to build this into All you need to do is:
Should really be rather straight forward. No need to manually interact with |
@vpetersson The basic logic was ready. Then I thought it would be nice to see the dirtiness. As you've mentioned it pulls from upstream and the environment would never be dirty. OK, I'll continue with github.actions ENV variable and will document a method to test this locally with dirtiness information. |
I wouldn't worry about dirtiness. We never push to testnet or production from a local environment. |
Even |
See balena-cli-action. That's what is used for pushing to Balena. Basically, it will use the |
Thanks Viktor. My only concern was to test them on our test fleets locally under personal Balena accounts. But as you've mentioned grouping our test devices under Nebra would be a better idea. |
I'm less worried about testing this particular change as it is fairly simple change. |
First part is ready. Now it's time to use it in hm-diag reports. |
is Planning to put it everywhere where |
Probably enough to do it in |
Yes @vpetersson, HPT reads this info and also logs it on screen and to syslog (hence in logtail too). |
FYI, seems related to this: https://engineering.helium.com/2022/01/24/firmware-release-containerized-miner.html. Haven't dug into it much but we should be able to change the miner version independently of our firmware. |
Do we want to auto update the miner aromatically though? We have had various incidences of breaking changes not properly reported etc so not sure if maybe it's better not to? |
I'm not in favor of auto updating. There has been way too many breaking changes in the past. Now that we will be doing various things over RPC etc, we need predictable behavior. |
Agreed, not in favor of auto-updating. Just meant that there's an established pattern for updating miner independently of firmware. |
I had been already added the information where the FIRMWARE_VERSION is reported. The PR's are ready. NebraLtd/helium-miner-software#350 The tests are OK thanks to @ilyastrodubtsev. If you can approve them, we can close this ticket and follow-up the rest in NebraLtd/helium-miner-software#351. |
Asking for the next sprint: We don't think using semantic auto versioning is better than what we have (date based versions) right now, hm-miner would get updated manually to fetch upstream changes and the release procedure would be kept as usual. Am I correct? |
@vpetersson & @marvinmarnold Should we close this issue with the merge of NebraLtd/helium-miner-software#350 and then discuss the new version style in NebraLtd/helium-miner-software#351? |
We need to add this to diagnostics once implemented...
NebraLtd/hm-miner#47
The text was updated successfully, but these errors were encountered: