-
Notifications
You must be signed in to change notification settings - Fork 94
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
tests/i: add reflog fixture #5826
Conversation
Possible counter-example: async def test_reflog(flow, scheduler, run, reflog, complete):
id_ = flow({
'scheduler': {
'allow implicit tasks': 'true'
},
'scheduling': {
'graph': {
'R1': 'foo:failed => bar'
}
},
})
schd = scheduler(id_, paused_start=False)
async with run(schd):
triggers = reflog(schd)
await complete(schd)
breakpoint(header=f'{triggers=}')
assert triggers == {
('1/foo', None),
('1/bar', ('1/foo',)), # This may well not be right, but we're not getting any trigger at all here
} |
This example should hang because you haven't configured Try setting |
Try |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice
6cc9477
to
2b9476e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like it's made the TUI integration tests flaky? At least, getting different failures on each python version
Would be very surprised if chaing TZ made Tui tests unstable? Will take a look at them once I've cleared my bug backlog. |
* Add an itegration test pattern for implementing reference tests.
* We were using the pytest-env plugin to run the tests in a non-UTC time zone. * The pytest-env plugin doesn't work with pytest-xdist so this was being ignored. * Also due to the way TZ support works in Python, changing the env var whilst Python is running may or may not result in changes.
Co-authored-by: Ronnie Dutta <[email protected]>
5a27190
to
de7cb17
Compare
Got to the bottom of the test failure, it's caused by a bug in simulation mode fixed on #5721 I've put in a temporary patch which can be removed in or after that PR depending on merge order. |
# https://github.com/cylc/cylc-flow/pull/5721 | ||
'root': { | ||
'simulation': { | ||
'default run length': 'PT1M', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The patch, short runtimes could cause tasks to go through running & succeeded even whilst the workflow is paused.
@@ -3,11 +3,11 @@ | |||
<span style="color:#000000;background:#e5e5e5">│</span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5">Path: mypath </span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5">│</span> | |||
<span style="color:#000000;background:#e5e5e5">│</span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5"><</span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#e5e5e5;background:#000000">S</span><span style="color:#000000;background:#e5e5e5">elect File </span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5">></span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5">│</span> | |||
<span style="color:#000000;background:#e5e5e5">│</span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5">│</span> | |||
<span style="color:#000000;background:#e5e5e5">│</span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5">[runtime] </span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5">│</span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The order of the [scheduling]
and [runtime]
sections of the config changed as a result of prepending the default simulation runtime.
Manylinux failures are unrelated, see this run on master: https://github.com/cylc/cylc-flow/actions/runs/7197952698 |
Add a reflog fixture to the integration tests for trigger testing.
Check List
CONTRIBUTING.md
and added my name as a Code Contributor.setup.cfg
(andconda-environment.yml
if present).CHANGES.md
entry included if this is a change that can affect users?.?.x
branch.