-
Notifications
You must be signed in to change notification settings - Fork 22
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
[stable] Make version pinning optional #89
[stable] Make version pinning optional #89
Conversation
155dbdd
to
f50f539
Compare
@sombrafam your approach looks interesting however I wonder if it could also be solved by cherry-picking commit e3d4e0c and commit 1e312c8? |
So, I considered that 20.04 is supported across focal and jammy, and therefore would make sense to test the Python versions present there. Does that make sense? |
the stable/20.03 branch is currently failing pep8 tests with: $ tox -epep8 So even if we fix the ability to run tests they won't pass. These were fixed by other patches that have not been backported: To get things moving I will propose a backport of these patches and combine with the fix to tox to get it passing. |
#91 proposed. Once that is landed you can rebase your patch without the extras and should work this time. |
That doesn't address the issue of not having coverage in Focal. We should have that since 20.03 runs in Focal and Jammy. |
How would you run 20.03 on Jammy? To get to Jammy you would also have to upgrade to 22.03 since that is the version of ovn in Jammy. |
Also the 20.03 charms do not support Jammy, see https://charmhub.io/ovn-chassis?channel=20.03/stable for example so you would never be able to run this code on Jammy. |
0dca980
to
1897fb7
Compare
.github/workflows/tests.yaml
Outdated
@@ -6,10 +6,10 @@ on: | |||
|
|||
jobs: | |||
build: | |||
runs-on: ubuntu-latest | |||
runs-on: ubuntu-focal |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use ubuntu-20.04
here or stay with ubuntu-latest
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think you need to pin the OS version of the runner. Unless pip
compiles a Python module the OS version shouldn't really matter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For future reference, here is a list of supported OS names:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the review Nicolas. If I don't pin the version how will pip know that I want to run python 3.8/3.9? Since the backports are for focal, we need to use those python versions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The actions/setup-python
action will set up the correct Python version. When you then run something using python3
or similar in the runner it will use the Python version you had set up with that action.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where would that go? I don't see that file or section in this project or in tests.yaml file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah ok, got it. So, if "python-version: [3.8, 3.9]" is set, "actions/setup-python@v2" will configure PIP for those two versions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it will create two VMs, one for each of the Python versions you put in that list.
89c0e0a
to
8b5402b
Compare
@nicolasbock do you have powers to trigger the CI? There is a build pending. |
8b5402b
to
020c979
Compare
Sorry for asking again but I pushed my last commit without adding the change. Can you re-trigger it one more time? |
Sorry, no, I can't. You can rebase the commit though. That would trigger CI again. |
@nicolasbock, do you have any suggestions on how to fix this or debug this? I can't reproduce the issue locally, and it's only occurring here. |
The OVN charms prepared for the upgrade from OVN 20.03 to newer versions by unconditionally enabling version pinning. Since then we have reached agreement with upstream that rolling upgrades should work when upgrading within the previous upstream LTS version and the next. Having the pinning enabled may cause unnecessary grief for anyone already upgraded to OVN 22.03. Add a charm configuration option to allow controlling the version pinning. Closes-Bug: #2030944 Signed-off-by: Frode Nordahl <[email protected]> (cherry picked from commit f68ecbd) (cherry picked from commit 2a61104) (cherry picked from commit bde8c8c) Fix github build versions
d51dfeb
to
bb8a4a4
Compare
The OVN charms prepared for the upgrade from OVN 20.03 to newer versions by unconditionally enabling version pinning.
Since then we have reached agreement with upstream that rolling upgrades should work when upgrading within the previous upstream LTS version and the next.
Having the pinning enabled may cause unnecessary grief for anyone already upgraded to OVN 22.03.
Add a charm configuration option to allow controlling the version pinning.
Closes-Bug: #2030944
Signed-off-by: Frode Nordahl [email protected]
(cherry picked from commit f68ecbd) (cherry picked from commit 2a61104) (cherry picked from commit bde8c8c)