Updating workflows on numerous branches #882
Replies: 7 comments 23 replies
-
TL;DR: This is mostly a mole hill. We can probably support any range centered around the current version in Debian without any noticable consequences as long as we don't go too far in either direction. WRT updating our various branches, we definitely need assistance with establishing procedures that don't create as many problems as they solve. This is a generic problem that must already have good solutions. We just have to find them. IIUC, these tests are only applied when we attempt to merge new PRs, so they would have no direct effect on the viability of older saved versions of our code. Indirectly, if we introduce a change which is incompatibe with e.g. Python 3.6, that would make our develop branch and, eventually, our master branch, fail in some way on a system that is stuck at 3.6 - and - we wouldn't be alerted to this when merging the change. First, older systems usually expect to run older versions of applications for precisely this reason, so that's not a major concern. We just need to note changes to what our minimum versions are (of whatever comes up) in the changelog for each release. (I wouldn't go looking for these, just note them when they are brought to our attention.) Since we maintain a lot of older versions on GitiHub, this makes it easy for an affected user to remedy this situation. This brings up a related very minor concern. When should some of these older versions be removed from GitHub? Since our code base is tiny compared to a lot of other projects, space isn't a issue. It's just about useless old clutter. And, maybe, the implication that if we still host a very old version, we would still support it. Maybe we should add a note somewhere stating the range of versions which are supported. If someone asks about 0.90.4, I don't want to spend any time on that. Where to draw the line on newer versions isn't that obvious. I don't really want to support anything lower than 0.96, but since 0.95.10 is probably still widely installed, supporting that makes sense as well. On the other end, we probably don't care about twinkles in the developers eyes for Python 3.20, but it would be nice to know if we are introducing a change that will bite us in the less distant future. The question here is how far ahead do we want to look - because a failed test for e.g. Python 3.12 would block a merge now for a version of Python we may not have to actively deal with for a couple of years. If there is a way to make a failure in a distant version a non-blocking warning rather than a blocking error, that could allow us to look farther ahead without penalty. I'm not sure when these newest specs are frozen, so if we look ahead far enough, we could run into problems that might go away or change as the specs are revised. Since no projects/packages I'm aware of depend on AutoKey, there don't seem to be any pressing obligations for us to set a particular range of Python versions we support other than keeping our users happy and making sure we're not needlessly creating issues for our developers in the short- or mid-term. So, we have to support the current versions on Debian and Arch (Arch is usually newer). Anything beyond that depends on what it costs us to support. We shouldn't reject a PR because it won't work in 3.6 or 3.12. Other than that, we really don't know much about our actual user base so the choice of version range is somewhat arbitrary. Another concern: What if someone submits a PR which uses a new feature that only works in 3.11? Presumably, some or all of the older version tests would fail. What do we do then? |
Beta Was this translation helpful? Give feedback.
-
Then for the Python version range, I guess we should go with the lowest level supported by Python and for the highest level supported by the GitHub image. Does that sound good? The workflow tests are being run from the master drive and are controlled by the python-test.yml. It just so happens that the contents of the python-test.yml file on all three branches are identical other than the white-space (which will be easy to fix and should be made identical anyway). It occurs to me (and this may solve our synchronization issues if we do it everywhere from now on) that in an ideal world, the develop and beta branches would always be ahead of the master branch, so we should strive to make that true as much as possible. To that end, if I were to edit a file that exists on all branches on the master branch first, then the other two branches would display a notification that they're behind. GitHub would then extend an offer to synchronize the data at the push of a button (which I do all the time with my fork in response to the notification whenever you put a PR through). If I'm guessing correctly, that will mean that the other two files by the same name on the other two branches will be updated automatically by doing that and won't need to be updated separately. Not only that, but there should be no annoying notifications afterwards, either. We can test this theory with the python-test.yml file if you like, @josephj11, since it needs to be updated anyway. |
Beta Was this translation helpful? Give feedback.
-
Whenever we notice them. I'm not sure how often versions get updated on GitHub and Python, so it's just a good idea for all of us to occasionally look. |
Beta Was this translation helpful? Give feedback.
-
I'm not sure. We've never drawn a line in the sand on this. If it's working for us, maybe the "if it ain't broke, don't fix it" slogan would serve us well here. |
Beta Was this translation helpful? Give feedback.
-
I suspect that the future is too complex and unpredictable to adequately plan for, so it's probably best to do the very best possible job today in the hopes that that shores us up against whatever's coming.
I'm not sure on the timeline for new versions, either. As for the non-blocking vs blocking errors, version-specific changes often are significant enough that only a blocking error would do, but I suppose it's something that could be taken on a case-by-case basis. |
Beta Was this translation helpful? Give feedback.
-
I've never heard of such a thing, but even if it did exist, it would be something we would want to try to avoid or find a work-around or alternative for. The only other way I could see such a thing being addressed would be for us to put out a specific version of AutoKey as a specialty release with only that version of Python in it so that that particular feature could be enjoyed or used. That does seem a bit extreme and far-fetched to me, though, and not like something we'd want to do. |
Beta Was this translation helpful? Give feedback.
-
Well, I've attempted to get information that would be helpful for updating our workflows. Interestingly, despite numerous attempts (at varying times of day and night) to get live help on IRC, I seem to have the power of invisibility in the GitHub channel. That leaves the rest of the internet as the main resource, so I've attempted to decipher the discrepancies in what can be found in a million locations and distill it down to what, hopefully, is the actual truth. I'm not sure whether I've succeeded, but this is what I've got so far:
What that tells me is that we will always have new commits and new commit hashes no matter how we do things. Do you think I should cherry-pick when making identical changes on any two or more branches? This is the current plan:
Hopefully those will work fine. If not, please jump in with suggestions. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Choosing the version range
This discussion was opened in response to a comment by @josephj11 in which he noticed that Python 3.7 has reached end-of life and should be removed from the workflow tests.
We're going to need a range of Python versions to satisfy some of the files in the
/.github/workflows/
directory.If you look at GitHub's available images, the ubuntu-dd.04 image is the latest one being used by GitHub. If you do a search for python on that page and go to the third result. you'll see the range of versions supported for that image. Those are:
If you then visit python.org's Status of Python Versions page, you can see which versions are currently supported. Those are:
Version 3.8 (or 3.8.17 when that's needed to be specified) is still getting security updates until October of 2024, so we could make that the lowest version in our range.
Version 3.11 (or 3.11.4 when that's needed to be specified) is the highest version the current Ubuntu image support, so we could make that the highest version.
Lots of people (myself included at times) hang onto the security versions and only update when they no longer have any alternatives, so by choosing the lowest-possible version, we'd be including more users, but I'm not sure what our view is on that. What do you think?
Help wanted with advice on the best git practice for updating the workflow files
When doing these version updates, we'll be creating another another of our messy multiple commits, because none of the changelogs are the same on the various branches, yet they all have the same name, so this will create more aheads and behinds in our git history.
It distresses me to keep making our branch mess worse and I know the team would like it if we could do this as cleanly as possible. Does anyone have a suggestion for making such a change cleanly?
For those who are willing to read along, I've created this description of the dilemma:
We have three main branches: beta, develop, and master. Both beta and develop are based off of master, but all three branches have gone in different directions and are unique in many ways.
There are some files that exist on all three branches. Sometimes we want the contents of those to remain identical when we make updates, but in other cases, the contents need to remain different.
When changes are made to beta and develop, those branches are then considered to be ahead of master, which is fine and as it should be.
When, however, a change is made to master, then beta and develop are considered behind and need to be updated.
In a case where the file on master must remain different from the same file on beta and develop, the aheadness and/or behindness of the branches has to be left unresolved.
In an effort to make as little disruption as possible and cause the fewest possible aheads and behinds when trying to update a file that should be identical on beta and develop, what would my best technique be?
I've seen references to cherry-picking, merging, and rebasing, but have yet to make sense of it all.
Beta Was this translation helpful? Give feedback.
All reactions