[ 
https://issues.apache.org/jira/browse/CASSANDRA-21807?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18131451#comment-18131451
 ] 

Dmitry Konstantinov commented on CASSANDRA-21807:
-------------------------------------------------

Root cause analysis results: An earlier test in the same CI split changes the 
Python process's working directory to a temp dir and never changes it back. 
test_wide_row_repair_lcs then builds its file path from that wrong directory.

*Details (collected by Claude)*

repair_tests/repair_test.py:1182 builds the path as os.path.join(os.getcwd(), 
'stress_profiles/repair_wide_rows.yaml.tmpl'). At that point the working 
directory was .../build/run-python-dtest.yT0KAp/tmpkyh_4wbr instead of the 
dtest checkout, so the file wasn't found.

What changed the directory

configuration_test.py:113-117, in test_relative_paths (CASSANDRA-17084):
cassdir = tempfile.mkdtemp()
os.mkdir(os.path.join(cassdir, 'bin'))
os.chdir(cassdir) # never restored
 - Only chdir: this is the only os.chdir in cassandra-dtest, and ccm has none.
 - The path's name: a plain mkdtemp() gives $TMPDIR/tmpXXXXXXXX, which matches 
tmpkyh_4wbr. Cluster dirs use the dtest- prefix (dtest_setup.py:125), so they 
can't be the source.
 - Run order: the split's stage log on nightlies.apache.org shows one pytest 
process running 18 tests. test_relative_paths is 4th and 
test_wide_row_repair_lcs is 12th.
 - Other variants: in the dtest and dtest-latest targets, the same test runs in 
split 20/64 and passes. test_relative_paths runs in split 40/64 there, so the 
two never share a process.

> Test failure: TestRepair.test_wide_row_repair_lcs 
> --------------------------------------------------
>
>                 Key: CASSANDRA-21807
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-21807
>             Project: Apache Cassandra
>          Issue Type: Bug
>          Components: Test/dtest/python
>            Reporter: Dmitry Konstantinov
>            Priority: Normal
>
> [https://ci-cassandra.apache.org/job/Cassandra-trunk/2642/testReport/junit/dtest-novnode.repair_tests.repair_test/TestRepair/Tests___dtest_novnode_jdk11_44_64___test_wide_row_repair_lcs/]
>  
> {code:java}
> FileNotFoundError: [Errno 2] No such file or directory: 
> '/home/cassandra/cassandra/build/run-python-dtest.yT0KAp/tmpkyh_4wbr/stress_profiles/repair_wide_rows.yaml.tmpl'
>  {code}
> {code}
> self = <repair_tests.repair_test.TestRepair object at 0x7f2af62bd940>
>     @since('4.0')
>     def test_wide_row_repair_lcs(self):
> >       self._test_wide_row_repair('LeveledCompactionStrategy')
> /home/cassandra/cassandra-dtest/repair_tests/repair_test.py:1196: 
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> _ 
> self = <repair_tests.repair_test.TestRepair object at 0x7f2af62bd940>
> compaction_strategy = 'LeveledCompactionStrategy'
>     def _test_wide_row_repair(self, compaction_strategy):
>         """
>         @jira_ticket CASSANDRA-13899
>         Make sure compressed vs uncompressed blocks are handled correctly 
> when stream decompressing
>         """
>         cluster = self.cluster
>         cluster.set_configuration_options(values={'hinted_handoff_enabled': 
> False})
>         cluster.populate(2).start()
>         node1, node2 = cluster.nodelist()
>         node2.stop(wait_other_notice=True)
>         template_path = os.path.join(os.getcwd(), 
> 'stress_profiles/repair_wide_rows.yaml.tmpl')
> >       with open(template_path) as profile_template:
> E       FileNotFoundError: [Errno 2] No such file or directory: 
> '/home/cassandra/cassandra/build/run-python-dtest.yT0KAp/tmpkyh_4wbr/stress_profiles/repair_wide_rows.yaml.tmpl'
> /home/cassandra/cassandra-dtest/repair_tests/repair_test.py:1183: 
> FileNotFoundError
> {code}



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to