Dmitry Konstantinov created CASSANDRA-21834:
-----------------------------------------------

             Summary: Flaky test: AssertionError: Could not update git in 
upgrade tests
                 Key: CASSANDRA-21834
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-21834
             Project: Apache Cassandra
          Issue Type: Bug
          Components: Test/dtest/python
            Reporter: Dmitry Konstantinov


Example: 
https://ci-cassandra.apache.org/job/Cassandra-5.0/696/testReport/junit/dtest-upgrade-novnode.upgrade_tests.cql_tests/TestCQLNodes3RF3_Upgrade_indev_4_0_x_To_indev_5_0_x/Tests___dtest_upgrade_novnode_jdk11_63_128___test_ticket_5230/

{code}
self = <abc.TestCQLNodes3RF3_Upgrade_indev_4_0_x_To_indev_5_0_x object at 
0x7f44b18e3fd0>

    def test_ticket_5230(self):
>       cursor = self.prepare()

upgrade_tests/cql_tests.py:2897: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
upgrade_tests/upgrade_base.py:89: in prepare
    cluster.set_install_dir(version=self.UPGRADE_PATH.starting_version)
../cassandra/build/venv/lib/python3.8/site-packages/ccmlib/cluster.py:137: in 
set_install_dir
    dir, v = self.load_from_repository(version, verbose)
../cassandra/build/venv/lib/python3.8/site-packages/ccmlib/cluster.py:119: in 
load_from_repository
    return repository.setup(version, verbose)
../cassandra/build/venv/lib/python3.8/site-packages/ccmlib/repository.py:63: in 
setup
    (cdir, version, fallback) = __setup(version, verbose)
../cassandra/build/venv/lib/python3.8/site-packages/ccmlib/repository.py:120: 
in __setup
    clone_development(GITHUB_REPO, version, verbose=verbose)
../cassandra/build/venv/lib/python3.8/site-packages/ccmlib/repository.py:282: 
in clone_development
    raise e
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

git_repo = 'https://github.com/apache/cassandra'
version = 'github:apache/cassandra-4.0', verbose = False, alias = False

    def clone_development(git_repo, version, verbose=False, alias=False):
        print_(git_repo, version)
        target_dir = directory_name(version)
        assert target_dir
        if 'github' in version:
            git_repo_name, git_branch = github_username_and_branch_name(version)
        elif 'local:' in version:
            git_repo_name = 'local_{}'.format(git_repo)  # add git repo 
location to distinguish cache location for differing repos
            git_branch = version.split(':')[-1]  # last token on 'local:...' 
slugs should always be branch name
        elif alias:
            git_repo_name = 
'alias_{}'.format(version.split('/')[0].split(':')[-1])
            git_branch = version.split('/')[-1]
        else:
            git_repo_name = 'apache'
            git_branch = version.split(':', 1)[1]
        local_git_cache = os.path.join(__get_dir(), '_git_cache_' + 
git_repo_name)
    
        logfile = lastlogfilename()
        logger = get_logger(logfile)
    
        try:
            # Checkout/fetch a local repository cache to reduce the number of
            # remote fetches we need to perform:
            if not os.path.exists(local_git_cache):
                common.info("Cloning Cassandra...")
                process = subprocess.Popen(
                    ['git', 'clone', '--bare',
                     git_repo, local_git_cache],
                    cwd=__get_dir(), stdout=subprocess.PIPE, 
stderr=subprocess.PIPE)
                out, _, _ = log_info(process, logger)
                assert out == 0, "Could not do a git clone"
            else:
                common.info("Fetching Cassandra updates...")
                process = subprocess.Popen(
                    ['git', 'fetch', '-fup', 'origin',
                     '+refs/heads/*:refs/heads/*', '+refs/tags/*:refs/tags/*'],
                     cwd=local_git_cache, stdout=subprocess.PIPE, 
stderr=subprocess.PIPE)
                out, _, _ = log_info(process, logger)
>               assert out == 0, "Could not update git"
E               AssertionError: Could not update git

../cassandra/build/venv/lib/python3.8/site-packages/ccmlib/repository.py:189: 
AssertionError
{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