-
Notifications
You must be signed in to change notification settings - Fork 277
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
[Python 3.9 Upgrade] OpenSearch-Build Repo Python Migration to 3.9 Version #3658
[Python 3.9 Upgrade] OpenSearch-Build Repo Python Migration to 3.9 Version #3658
Conversation
Codecov Report
@@ Coverage Diff @@
## main #3658 +/- ##
=======================================
Coverage 91.54% 91.54%
=======================================
Files 182 182
Lines 5419 5420 +1
=======================================
+ Hits 4961 4962 +1
Misses 458 458 |
Signed-off-by: Peter Zhu <[email protected]>
e67c7c0
to
5377789
Compare
Seems like windows is breaking with this in python-test with 3.9.13:
|
Windows can change to 3.9.7 with scoop here, no need to go to 3.9.13, tho need some checks on why this is failing tho: |
With Windows able to run Python3.9 now will debug more before merging this. |
Signed-off-by: Peter Zhu <[email protected]>
Signed-off-by: Peter Zhu <[email protected]>
Signed-off-by: Peter Zhu <[email protected]>
@@ -51,5 +51,5 @@ def test_main(self, mock_recorder: Mock, mock_bundles: Mock, getcwd: Mock, makeD | |||
call(os.path.join("curdir", "tar", "dist", "opensearch")) | |||
]) # manifest included in package | |||
|
|||
self.assertEqual(getcwd.call_count, 2) | |||
self.assertTrue(getcwd.called) |
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.
Should we not measure the call count?
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.
No we cant. Due to some changes between 3.7 and 3.9, the number of calls on Windows specifically is mistakenly reported as actual calls + 1
.
I am not able to find out exactly where this actual call is coming from or find any changes related to this in os package. Some more observation suggest even without any getcwd calls, the counter is still having a +1, which is happening even on powershell.
As of now since this is not a harmful call and the actual call is not +1, I will just pass this as called. Thanks.
@@ -26,7 +26,12 @@ def test(self) -> None: | |||
|
|||
return_code = process_handler.terminate() | |||
|
|||
self.assertIsNone(return_code) | |||
# In Python 3.9 it seems that Process Termination is not as stable in 3.7. |
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.
Will this lead to process being left in running state if termination is not successful? Maybe create an issue for this too to address it later?
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.
This is not related to the actual termination where a wait will happen until proper termination.
The test is trying to close a read call, that is always failing on 3.7 consistently, thus always None
.
In 3.9 on some OS like ubuntu github actions runner it is still observe as None
, while on macos and CentOS7 I have observed 1
which is correctly termination of the process. This is so inconsistent that even adding a 10seconds timer would not resolve this.
We probably will revisit this but this is more like a flaky test than a problematic implementation on the actual code. It is just it always fail on 3.7 but sometimes run correctly on 3.9. Thanks.
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 maybe open a bug? We can take help from community too.
Approved to proceed with the upgrade window. Thanks |
Signed-off-by: Peter Zhu <[email protected]>
Description
[Python 3.9 Upgrade] OpenSearch-Build Repo Python Migration to 3.9 Version
Issues Resolved
#3351
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.