Skip to content
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

flaky tests #325

Open
oliver-sanders opened this issue Jun 5, 2024 · 2 comments
Open

flaky tests #325

oliver-sanders opened this issue Jun 5, 2024 · 2 comments
Assignees
Milestone

Comments

@oliver-sanders
Copy link
Member

The tests appear to have become flaky, maybe ~3 weeks back?!

https://github.com/cylc/cylc-rose/actions/workflows/tests.yml?query=branch%3Amaster

@oliver-sanders oliver-sanders added this to the 1.4.0 milestone Jun 5, 2024
@MetRonnie
Copy link
Member

For reference:

________________ test_rose_fileinstall_uses_rose_template_vars _________________
[gw4] linux -- Python 3.11.9 /opt/hostedtoolcache/Python/3.11.9/x64/bin/python

tmp_path = PosixPath('/tmp/pytest-of-runner/pytest-0/popen-gw4/test_rose_fileinstall_uses_ros0')

    def test_rose_fileinstall_uses_rose_template_vars(tmp_path):
        # Setup source and destination dirs, including the file ``installme``:
        srcdir = tmp_path / 'source'
        destdir = tmp_path / 'dest'
        [dir_.mkdir() for dir_ in [srcdir, destdir]]
        (destdir / 'rose-suite.conf').touch()
        (srcdir / 'rose-suite.conf').touch()
        (srcdir / 'installme').write_text('Galileo No! We will not let you go.')
    
        # Create an SimpleNamespace pretending to be the options:
        opts = SimpleNamespace(
            opt_conf_keys='',
            defines=[f'[file:installedme]source={str(srcdir)}/installme'],
            rose_template_vars=[],
            clear_rose_install_opts=False
        )
    
        # Run both record_cylc_install options and fileinstall.
        record_cylc_install_options(srcdir, destdir, opts)
>       rose_fileinstall(destdir, opts)

/home/runner/work/cylc-rose/cylc-rose/tests/unit/test_functional_post_install.py:87: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/home/runner/work/cylc-rose/cylc-rose/cylc/rose/fileinstall.py:67: in rose_fileinstall
    config_pm(config_tree, "file")
/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/metomi/rose/config_processor.py:140: in process
    return processor.process(
/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/metomi/rose/config_processors/fileinstall.py:106: in process
    self._process(conf_tree, nodes, loc_dao, **kwargs)
/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/metomi/rose/config_processors/fileinstall.py:362: in _process
    job_runner(JobManager(jobs), conf_tree, loc_dao, work_dir)
/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/metomi/rose/job_runner.py:186: in run
    loop = asyncio.get_event_loop()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <asyncio.unix_events._UnixDefaultEventLoopPolicy object at 0x7fcf[487](https://github.com/cylc/cylc-rose/actions/runs/9376878123/job/25817545353#step:8:488)d5310>

    def get_event_loop(self):
        """Get the event loop for the current context.
    
        Returns an instance of EventLoop or raises an exception.
        """
        if (self._local._loop is None and
                not self._local._set_called and
                threading.current_thread() is threading.main_thread()):
            self.set_event_loop(self.new_event_loop())
    
        if self._local._loop is None:
>           raise RuntimeError('There is no current event loop in thread %r.'
                               % threading.current_thread().name)
E           RuntimeError: There is no current event loop in thread 'MainThread'.

/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/asyncio/events.py:681: RuntimeError

@oliver-sanders oliver-sanders modified the milestones: 1.4.0, 1.5.0 Jun 12, 2024
@wxtim wxtim self-assigned this Jun 25, 2024
@wxtim
Copy link
Member

wxtim commented Jun 25, 2024

@oliver-sanders: comparing the time of this post and looking at test failures in the week preceeding that: All these common failures are the one logged by Ronnie.

There is a set of failures I've found locally in tests/functional/test_rose_stem.py: But I'm not sure that I've ever seen it on CI - that's a test cleanup error, not a bug - willfix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants