Riza Suminto has posted comments on this change. ( http://gerrit.cloudera.org:8080/23319 )
Change subject: IMPALA-14333: [part 1] Make all pytest compatible with Python3 ...................................................................... Patch Set 3: (5 comments) http://gerrit.cloudera.org:8080/#/c/23319/1//COMMIT_MSG Commit Message: http://gerrit.cloudera.org:8080/#/c/23319/1//COMMIT_MSG@7 PS1, Line 7: part 1] > This patch tries to keep tests working with both Python2 and Python3 - once My intention with splitting the adjustment vs the default switch is to make sure everything is in working order before the default switch, and make it easy to revert just the default switch part if things goes wrong that we have not seen. But I agree with your thought, and I can squash the second part to this first part. I'll file a new JIRA under https://issues.apache.org/jira/browse/IMPALA-8508 to cleanup Python2 remnants. I do wish to consult with Joe first before doing that. http://gerrit.cloudera.org:8080/#/c/23319/1//COMMIT_MSG@17 PS1, Line 17: Set timezone='Europe/Budapest' in test_sort and test_top_n to get : consistent result for reading functional_parquet.complextypes_structs : and functional_orc_def.complextypes_structs. : : Skip testing HBase at test_except and test_partitioned_top_n because : HBase does not return return rows where alltypesagg.tinyint_col is null. : : Add _run_query_with_client() in test_ranger.py to allow reusing single : Impala client for running several queries. Make sure to close the : clients when test is done. Mark several tests in test_ranger.py with : SkipIfFS.hive because they run query through beeline + HiveServer2, but : Ozone and S3 build environment does not start HiveServer2 by default. : > I don't get these changes - these seem to change test logic, and I don't kn Ranger adjustment is done because I found it failing with a bunch of Impyla stacktrace of "TSocket read 0 bytes". I thought it might be related to the nature of this test where it always open new client to execute impala testcase queries using _run_query_as_user(). Changing it to reuse client resolved the issue in Python3, but admittedly, I have not dig deeper into it. For others, there is a different permutation behavior between Python2 vs Python3 that cause our test run silently not exercise some test vector (https://issues.apache.org/jira/browse/IMPALA-13125). Python3 reveal test breakage in some of these unexercised vector. Hence these adjustment. http://gerrit.cloudera.org:8080/#/c/23319/1//COMMIT_MSG@49 PS1, Line 49: test_decimal_queries.py for json file format because table date_tbl and : decimal_tiny is contrained only for json/none/none (functional_json). : > Same as for line 17 - how is this related to Python 2 vs 3? Explained in https://gerrit.cloudera.org/c/23319/1//COMMIT_MSG#29 http://gerrit.cloudera.org:8080/#/c/23319/3//COMMIT_MSG Commit Message: http://gerrit.cloudera.org:8080/#/c/23319/3//COMMIT_MSG@63 PS3, Line 63: python2 impala-shell > Would it be hard to keep python2 impala-shell tests alive? While the Python When I start this, Python3 pytest + Python2 shell test combo shows breakage in test_shell_commandline.py and test_shell_interactive.py. I'm just being pragmatic here in reducing test combination and moving the transition forward. I hope we can revisit this combo later after switching to Python3 by default. http://gerrit.cloudera.org:8080/#/c/23319/3/tests/custom_cluster/test_saml2_sso.py File tests/custom_cluster/test_saml2_sso.py: http://gerrit.cloudera.org:8080/#/c/23319/3/tests/custom_cluster/test_saml2_sso.py@221 PS3, Line 221: body = "SAMLResponse=%s&RelayState=%s" % (authn_resp, relay_state) > Where did the base64 encoding go? I'm not sure what happen here, but removing the base64 encoding make the test work in Python2 and Python3. Someone with more experience around SAML2 should chime in on this. -- To view, visit http://gerrit.cloudera.org:8080/23319 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I401a93b6cc7bcd17f41d24e7a310e0c882a550d4 Gerrit-Change-Number: 23319 Gerrit-PatchSet: 3 Gerrit-Owner: Riza Suminto <[email protected]> Gerrit-Reviewer: Csaba Ringhofer <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Jason Fehr <[email protected]> Gerrit-Reviewer: Riza Suminto <[email protected]> Gerrit-Comment-Date: Fri, 22 Aug 2025 14:15:22 +0000 Gerrit-HasComments: Yes
