-
Notifications
You must be signed in to change notification settings - Fork 0
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
The publish
action should increment the minor version component
#16
Comments
Oh no, I wasn't expecting that to be the case. I was intending for the publish action to only run when something was merged to main. I thought this line would do that:
Do we need to push any images if they're on a branch? I can see how that might be useful, but it adds quite a bit of complexity. Maybe it would be better to fix the publish action, so that it does what I originally intended instead. |
Sorry for the confusion, @lucyb. You are correct! I will remove "which is run on dispatch, on PR, and on push to This is undesirable from our perspective because it breaks semver. In other words, this is undesirable because it violates the principle of least surprise. This is also undesirable from a user's perspective, because the user can't pin the version of a dev container. (We should recognise that whilst it makes our life easier if they don't do so, it won't make their life easier.) |
I'm taking this off the board while we discuss it.
I disagree. Tagging new images as "v0" shows they are the latest version of that major version. This is desirable because users will get the latest version without having to make any changes. However, I do think we need to tag images with the minor version as well. This would match up with the versioning proposal document. This would allow users to pin to an unchanging minor version if they wanted. Is part of the problem that we're using "v0"? Should we actually be moving to v1 at this point?
Just to clarify, a Codespace can live for longer than 14 days. They are automatically deleted when they've been inactive for 14 days. I'm unsure what changes are pulled in when a Codespace is restarted though, which will happen more frequently (at least daily, I imagine). |
Thanks, @lucyb. I think that we've been circling around the implementation of a version and the concept of a version. I agree that we should tag each image with its major and minor components. For example, by executing both I do not think we should be using "v1" at present. "v0" gives us flexibility. If we move to "v1", then we need to be very careful not to break backwards compatibility. I don't think our tests are comprehensive enough at present. |
One consideration here I just noticed. As things stand, as I understand it, any merge to It might be that the image hasn't actually changed since the last publication; for example, editing the tests, which would give an incremented |
I don't think there's anything wrong with incrementing the patch version under that scenario. It means you don't have to remember to use a conventional commit, right after you forget to use a conventional commit. |
At present, the
publish
action tags a new image as "v0", meaning that "v0" can resolve to different images at different times.research-template-docker/.github/workflows/main.yml
Lines 70 to 76 in 6ec03c1
Semver considers using major version zero for initial development to be optional:
However, it also considers modifying the package's contents after the package is released to be an absolute prohibition:
So, whilst we are doing the right thing by using major version zero 🙂, we are doing the wrong thing by repeatedly tagging new images as "v0" 🙁. Instead, we should be incrementing the minor version component.
We took a similar approach when developing ehrQL. A user specified "v0" in their
project.yaml
, with the minor version component resolving to the most recent available release in the execution context (the local context tended to lag the secure backend context). The inconvenience of a backwards-incompatible change was deferred by specifying the minor version component. The user was expected to refactor at a more convenient time, as the most recent available release in the secure backend context really was the most recent available release overall.The text was updated successfully, but these errors were encountered: