Currently we relatively often push new releases with one or more serious bugs, affecting network connectivity, time sync => SSL errors, permissions and such. This is due to a quite fast development with many new features, core improvements and such.
Results are hotfix releases, which are not always separated from other new features (currently multiple WiFi SSIDs e.g.) possibly leading to other new bugs and unhappy users.
Reason is clearly that we have on the one hand many great ideas from users and devs about new features and improvements but lack the devs/time and in my case possibilities to test those changes on every device and possible setup.
My suggestion is, even that it is an additional effort and slows down development a bid, to implement an open beta/RC branch.
E.g. we do a moreless monthly release with new features and improvements. But we do a beta/rc release one week earlier, that hopefully many interested users can test, and concentrate our efforts then on fixing bugs that may have been introduced, before merging it into final release.
This would mean e.g. that we develop always in a new "development"/"dev" branch, but backport only bug fixes to the RC branch (could be the testing branch) in regular RCs during the testing week, using subsubversion strings to allow updates for the beta users.
Additional effort is the backports that need to be done, but at least bug fixes are usually small code snippets. And it should clearly increase our release quality, at least if we find enough users that are willing to join the beta/testing branch.
Another topic is bugs, that break APT, time sync and such and by this break the ability to update without manual pre-fixes. Perhaps we can move current emergency update steps into an own small pre-update file/script, that is applied as very first update step, at best available via non-SSL source? But maybe there is an easier solution, as I think APT and SSL are the only reason why this might be needed. In the past we did ATP upgrade after applying the incremental patch file, but that brings other possible issues when we expect current packages for certain steps.
These are just suggestions and the current ideas and solutions I have in mind. My most important intention is to start discussion/idea collection about how to make DietPi more robust for production systems.
@MichaIng
Reason is clearly that we have on the one hand many great ideas from users and devs about new features and improvements but lack the devs/time and in my case possibilities to test those changes on every device and possible setup.
My suggestion is, even that it is an additional effort and slows down development a bid, to implement an open beta/RC branch.
Great idea, agree ๐
The only issue I see, is after we roll out Testing > Beta and need beta users to update, we'd essentially need to increase the subversion to notify update. Which results in master branch skipping a few versions per release?
Perhaps we can move current emergency update steps into an own small pre-update file/script, that is applied as very first update step, at best available via non-SSL source?
Yep, i've been thinking about this for a while, moving EMR patches to a patch_prefile, which runs:
It can then be used for pre-timesync emergency patches.
at best available via non-SSL source?
We can use SSL source with simply the --no-check-certificate option to prevent non-timesync'd system failing. Essentially, we could use Github for patch_prefile I believe.
My most important intention is to start discussion/idea collection about how to make DietPi more robust for production systems.
Yep I agree. However, this will only improve with these new systems, if we have users who are willing to help test.
@Fourdee
Beta = Pre-release testing, open to all users
Testing = In dev, potentially unstable
Beta = testing and testing = dev is perhaps a bid confusing? This is why I thought to use the current "testing" branch for testing/beta and implement a new "development"/"dev" branch for what we currently do on "testing"? But this means that we need to switch e.g. local git branches and such, so when this is too much effort, your suggestion would work as well of course ๐.
The only issue I see, is after we roll out Testing > Beta and need beta users to update, we'd essentially need to increase the subversion to notify update. Which results in master branch skipping a few versions per release?
I would add sub-subversion for this, e.g. v6.17.0 for initial RC/beta, then v6.17.1 for next etc.
We can use SSL source with simply the --no-check-certificate option to prevent non-timesync'd system failing. Essentially, we could use Github for patch_prefile I believe.
Ah that's true, the wget download does also work with ignoring untrusted SSL cert, right?
Yep I agree. However, this will only improve with these new systems, if we have users who are willing to help test.
Jep, I hope we find enough that it is worth it, making some advertising for it on twitter and forum e.g. ๐.
@MichaIng
the wget download does also work with ignoring untrusted SSL cert, right?
Yep, however, using http:// has the same effect. Both are the only option we have pre time sync.
Jep, I hope we find enough that it is worth it, making some advertising for it on twitter and forum e.g.
Yep ๐
This is why I thought to use the current "testing" branch for testing/beta and implement a new "development"/"dev" branch for what we currently do on "testing"?
Yep, probably a better idea, we should rename the testing branch to 'dev'.
Then with the beta branch, we can roll out dev to beta, when everything is completed. This will then allow users to update and test.
I would add sub-subversion for this, e.g. v6.17.0 for initial RC/beta, then v6.17.1 for next etc.
Yep, this would allow for beta updates from 'dev' branch once we fix issues.
Ok so?
@Fourdee
Yep, however, using http:// has the same effect. Both are the only option we have pre time sync.
Ah this is great. So we can pre-patch everything besides broken network itself ๐.
Ok so?
- Rename 'testing' to 'dev'
- Create 'beta' branch, which is a copy of 'dev' once we are ready for release
- Allow 'beta' branch to test for X days, before we merge to 'master'
- Use an additional 'beta' version to allow for 'beta' branch to update when 'dev' updates are applied, during the RC stage
- 'beta' version ignored on 'master' branch.
- Release 'beta' to 'master' when stability testing is completed after X days
- Patch notes:
-- Switch 'testing' to 'dev'- Web notes:
-- Create BETA_BRANCH.md
-- rename 'testing' to 'dev'
Sounds great. I am thinking, if we should use sub-sub-versions for beta updates only and simply ignore them on master/release update check, or as well implement them for master releases (for smaller, properly still needed hotfix releases). As long as every system just checks it's own GitHub branch for current server version string, both should work fine, but has impact on patch_file complexity.
Also about sub-sub-version updates:
As we already touch the updating system:
Further thinking about pre-patch, downloaded via HTTP. Actually I am not too happy with this for security reasons. I know there are many other cases (3rd party software, non-HTTPS APT sources, ...) where simple HTTP is used, but I would like to use HTTPS where we have control.
Sadly this case HTTPS would break one of the main reasons for pre-patching: time sync or other HTTPS related issues. Maybe we can instead further improve our G_CHECK_URL to check output for HTTPS related errors. If check fails, but --no-check-certificate does not, e.g. this would be a clear indication after which we can print some usual checks+solutions.
Also I thought about some kind of (optional) news/announcement inside dietpi-banner, or a "New announcement available, call "dietpi-announcement" print, which only appears until the script is called once (and not unchecked by user, dietpi.txt entry, allowed to toggle within the script itself?).
There we could publish some current issues, important bugs and such, possibly based on distro, device and/or installed software of end user. Or simply inform about other interesting things. Stay closer in touch with users, who are open to it.
@MichaIng
Sadly this case HTTPS would break one of the main reasons for pre-patching: time sync or other HTTPS related issues.
Yep, its a catch 22. We need one to do the other.
Would be nice to have, but yep, "security" and "risk" of http for a pre-patch isn't worth it.
Maybe we can instead further improve our G_CHECK_URL to check output for HTTPS related errors. If check fails, but --no-check-certificate does not, e.g. this would be a clear indication after which we can print some usual checks+solutions.
Nice idea ๐
Also I thought about some kind of (optional) news/announcement inside dietpi-banner, or a "New announcement available, call "dietpi-announcement" print, which only appears until the script is called once (and not unchecked by user, dietpi.txt entry, allowed to toggle within the script itself?).
There we could publish some current issues, important bugs and such, possibly based on distro, device and/or installed software of end user. Or simply inform about other interesting things. Stay closer in touch with users, who are open to it.
Yep, nice idea ๐
Although we could simplify this and have a link to https://github.com/Fourdee/DietPi/issues/2093 in the banner, then simply keep the ticket open and nudge v6.16 down after v6.17 release?
Ok in regards to changes:
testing > devGITBRANCH=testing to GITBRANCH=devtesting to devdev@MichaIng
I've made a start on this: https://github.com/Fourdee/DietPi/issues/2083#issuecomment-426842537
Please do any work on the new 'dev' branch:
https://github.com/Fourdee/DietPi/tree/dev
Note to self:
When we want to update 'beta' branch with new updates:
.version 3rd line to ++ numberWhen we want to merge from 'beta'/'dev' to 'master
.version 3rd line to 0 (reset for next release), as subversion takes priority.@Fourdee
RC version only used for 'beta' 'dev' branches. Master branch is always X.X.0
Why not keep RC version for release? This would also allow beta users to update to most current stable, when switching branch setting. E.g. they just test 1st RC, then for some reason miss 2. and 3. and release. Then they want to switch to release. But update would now be shown if server version is X.X.0.
Ah but let me test and revisit the code first before I can give qualified feedback ๐คฃ.
@MichaIng
Why not keep RC version for release?
To allow us to reset RC versions for each subversion release. As the RC version is used to allow updates for 'beta' branch.
Ah I see what you mean, just let the RC version roll upwards and never reset? Should work fine aswell.
Might confused our users though:
@Fourdee
I though to reset rc version to 0 on next subversion raise in dev branch.
Possible that dietpi-update needs little fix for this, although can't find a reason. But need to have a fresh look into it tomorrow. Idea:
Btw:
@Fourdee
Do we want to add branch info to dietpi-banner, e.g. into the version string line?
DietPi v6.17.3 (beta)/(release)/(MichaIng/custom)
Fourdee/master could be replaced by "release" and Fourdee/beta by "Beta" and "Fourdee/dev" by "development", but all custom owner/branches leave as "
Only issue is, that we need to store the git owner+branch separately on update (4. line of .version?) instead of reading from dietpi.txt, so the info is always correct, even if users changed dietpi.txt but did not yet run update? On the other hand, why would someone change git branch/user, if not want to do an update afterwards...
Although we could simplify this and have a link to #2093 in the banner, then simply keep the ticket open and nudge v6.16 down after v6.17 release?
I think a link would not do. Users know where to ask/search, if they face an issue. But some issues might occur with the update (although with pre-patch the risk is minimized), or it is not directly visible to users. To prevent users from running into it and searching the forum for workarounds, it would be most helpful if we directly warn/prompt about them in the header. But yeah, one might argue, that everyone should be able to and do the effort of having a look into forums/github oneself, when facing an issue ๐. This is really taking users by the hand. Although at least until certain degree this is anyway to idea behind DietPi, allowing simple and automated installs/configs and such.
It could further be used to assist forum/twitter announcements by also placing an info there. Bein closer in touch with users, besides bugs/issues.
Being more concrete, we could place a script into .meta, which similar to pre-patch contains some checks, and fills an announcement/notification string (flag file), based on checks results. dietpi-banner, on execution (or regularly via cron) downloads this script (silently), runs it and, if anything was added to the string (at least one check passed), shows a colourized hint, that a new notification/announcement is available and user can run dietpi-banner 2 (?) to see it.
Only issue is, that we also need to track, which notification was already read, so somehow need to store notification ID and read/unread or something ๐ค. Hmm becomes more complex to more I go into detail ๐คฃ. Yeah just an idea, perhaps not a good one...
@MichaIng
Do we want to add branch info to dietpi-banner, e.g. into the version string line?
DietPi v6.17.3 (beta)/(release)/(MichaIng/custom)
I believe for dev/beta we can add additional info. But with master branch, leave as is to keep it clean:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
DietPi | Update available
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
v6.17.3 | Odroid C2 (aarch64)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
eth0 | 192.168.0.113
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
On the other hand, why would someone change git branch/user, if not want to do an update afterwards...
Exactly ๐. I added a global for branch G_GITBRANCH, we could probably do the same for G_GITFORK.
Performance wise, should be faster to store/read the above info in .version as dedicated line. Might be worth doing.
Actually, we should update .version to be sourceable. We have the global vars now.
๐ฏ๏ธ Updated .version to be source-able.
@Fourdee
Great commit! Looks way more consistent like this. Tiny remark:
G_GITBRANCH export to PREP useless, besides one can cancel the whip menu.G_GITOWNER repo these branches are available.G_GITBRANCH and G_GITOWNER were not exported to script, thus as well only when G_GITOWNER default=Fourdee. Otherwise assume, users wants it the way provided by variables.Fourdee (official) as owner selection, Custom (unsupported) as second option to allow textbox entry.G_GITBRANCH and G_GITOWNER are not yet available (not exported/added to script).Found another inconsistency:
dietpi-globals read G_GITOWNER and G_GITBRANCH from new .version now, which is the currently installed version.dietpi-update however use this values now as well, instead of the ones from dietpi.txt which is the desired/target version. Thus effectively branch cannot be changed any more.dietpi-update read dietpi.txt for "target" branch/owner to use for server URLs.@Fourdee
Sugar plums!, accidentally committed to dev instead of PR: https://github.com/Fourdee/DietPi/commit/f62675e0ceaf93d4720db22d2c4b29dddecb0888
However will do some testing with this.
โฌ:
๐ฏ๏ธ VM Jessie, from v6.17.3
๐ฏ๏ธ VM Stretch, from v6.17.3, from v6.0
๐ฏ๏ธ VM Buster, from v6.17.3
Needed to send some more commits to bring consistency inside and fix some patches that break the new versioning system.
So sorry the commits/changes now have grown outside of a PR, I hope you agree with them.
What I did is:
$G_GIT* variables, which should be considered as currently applied branch, from dietpi.txt DEV_GIT* settings, which should be considered as target branch for updates.DEV_GIT* settings at all (comment them), every script in case applies defaults Fourdee/master.DEV_GIT* settings are never overwritten. dietpi-update only reads them to access desired branch and updates the "current" values from .version accordingly after update has finished.[[ ! $(sed -n 6p /DietPi/dietpi/.version) ]] now assures the most current .version scheme is applied to our current testing/dev systems via dietpi-update -1 and on somehow broken update attempts.Further tweaks I am thinking about:
G_VERSIONDB_SAVE(){
cat << _EOF_ > /DietPi/dietpi/.version
#!/bin/bash
export G_DIETPI_VERSION_CORE=$G_DIETPI_VERSION_CORE
export G_DIETPI_VERSION_SUB=$G_DIETPI_VERSION_SUB
export G_DIETPI_VERSION_RC=$G_DIETPI_VERSION_RC
export G_GITBRANCH=$G_GITBRANCH
export G_GITOWNER=$G_GITOWNER
_EOF_
chmod +x /DietPi/dietpi/.version
# - Auto reload
. /DietPi/dietpi/.version
}
export for those values should be never needed from within globals, since anyway every script that needs them, runs globals again.G_WHIP_RETURNED_VALUE does not need to be exported, since we do not use these values in sub scripts without giving them as arguments?G_PROGRAM_NAME actually also does not need to be exported. It is reset to empty string anyway during dietpi-globals load. Only reason could be, if we call a sub script that does not load globals but uses parent program name somehow. But G_DIETPI-NOTIFY/G_WHIP e.g. is not available then to call it.@MichaIng
Isn't writing and then reassigning the exactly same variables somehow doubled effort?
Yep, not sure why I did that lol ๐
Personally I would reduce export to the vars, where it's really needed:
Agree, will send commit.
Beta system now live, we can mark this as closed.
Most helpful comment
@Fourdee
Why not keep RC version for release? This would also allow beta users to update to most current stable, when switching branch setting. E.g. they just test 1st RC, then for some reason miss 2. and 3. and release. Then they want to switch to release. But update would now be shown if server version is X.X.0.
Ah but let me test and revisit the code first before I can give qualified feedback ๐คฃ.