scylladb / scylla-ccm

Cassandra Cluster Manager, modified for Scylla
Apache License 2.0
20 stars 62 forks source link

scylla_extract_mode: fix regex pattern to match mode #492

Closed bhalevy closed 11 months ago

bhalevy commented 11 months ago

The current regular expression failed to match the mode for e.g https://downloads.scylladb.com/unstable/scylla/master/relocatable/latest/scylla-debug-unified-5.4.0~dev-0.20230801.37b548f46365.x86_64.tar.gz

See https://jenkins.scylladb.com/view/master/job/scylla-master/job/dtest-debug/247/consoleText

[2023-08-06T05:45:02.790Z] SCYLLA_UNIFIED_PACKAGE=/jenkins/workspace/scylla-master/dtest-debug/scylla/build/debug/dist/tar/scylla-debug-unified-5.4.0~dev-0.20230801.37b548f46365.x86_64.tar.gz

https://jenkins.scylladb.com/view/master/job/scylla-master/job/dtest-debug/247/artifact/logs-full.debug.052/dtest-gw0.log

07:54:08,036 790     errors                         ERROR    conftest.py         :208  | test_cluster_expansion_with_cdc[Single_cluster]: test failed:
...
            try:
>               self.wait_for_binary_interface(from_mark=from_mark, process=self._process_scylla, timeout=t)

../scylla/.local/lib/python3.11/site-packages/ccmlib/scylla_node.py:318:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../scylla/.local/lib/python3.11/site-packages/ccmlib/node.py:537: in wait_for_binary_interface
    self.watch_log_for("Starting listening for CQL clients", **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <ccmlib.scylla_node.ScyllaNode object at 0x7f4150514410>
exprs = 'Starting listening for CQL clients', from_mark = 0, timeout = 420

timeout should have been 900 seconds for debug mode if it was matched properly.

fruch commented 11 months ago

@bhalevy maybe adding those cases in test_scylla_extract_mode ?

fruch commented 11 months ago

and that test is failing:

>       assert scylla_extract_mode('url=https://s3.amazonaws.com/downloads.scylladb.com/downloads/scylla-enterprise/'
                                   'relocatable/scylladb-2022.1/scylla-enterprise-debug-aarch64-package-2022.1.rc0.0.20220331.f3ee71fba.tar.gz') == 'debug'
E       AssertionError: assert 'release' == 'debug'
E         - debug
E         + release
bhalevy commented 11 months ago

nice to have a test for this, will fix

bhalevy commented 11 months ago

I couldn't run the test locally, but I think I found the problem and fixed it in the latest version that searches the regex pattern only on the last component of the url prefix