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

Fixes failing task tests for new engine #13456

Merged
merged 6 commits into from
May 20, 2024
Merged

Fixes failing task tests for new engine #13456

merged 6 commits into from
May 20, 2024

Conversation

desertaxle
Copy link
Member

@desertaxle desertaxle commented May 19, 2024

This PR fixes the remaining failing tests for tasks with the new engine. 5 tests still fail because they involve calling async tasks in sync flows or the SequentialTaskRunner. Makes a couple of fixes in caching and adds support for input resolution and wait_for for flows in the new engine.

Example

Checklist

  • This pull request references any related issue by including "closes <link to issue>"
    • If no issue exists and your change is not a small fix, please create an issue first.
  • If this pull request adds new functionality, it includes unit tests that cover the changes
  • This pull request includes a label categorizing the change e.g. maintenance, fix, feature, enhancement, docs.

For documentation changes:

  • This pull request includes redirect settings in netlify.toml for files that are removed or renamed.

For new functions or classes in the Python SDK:

  • This pull request includes helpful docstrings.
  • If a new Python file was added, this pull request contains a stub page in the Python SDK docs and an entry in mkdocs.yml navigation.

@desertaxle desertaxle changed the title Fixes some failing task tests for new engine Fixes failing task tests for new engine May 19, 2024
@desertaxle desertaxle added the enhancement An improvement of an existing feature label May 19, 2024
Comment on lines 173 to 181
# We sometimes call this prior to setting up the run context, so we create a temporary
# context here
# TODO: Should we set up the run context earlier in Engine.start?
log_prints = should_log_prints(self.task)
task_run_context = TaskRunContext(
task=self.task,
log_prints=log_prints,
task_run=self.task_run,
parameters=self.parameters,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a hack to get the tests to pass. Should we move the setup of the task run context before calling Engine.begin_run?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep this definitely feels out of place to me too. I think you're right about moving it earlier so we don't have to do this here

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a context setup before beginning the run in 2311030, which worked. We still need to set up the context on each execution to ensure we have the latest task run meta data, but I don't think there's any harm in that.

@desertaxle desertaxle marked this pull request as ready for review May 19, 2024 16:39
@desertaxle desertaxle requested a review from a team as a code owner May 19, 2024 16:39
@desertaxle desertaxle requested a review from cicdw May 19, 2024 16:39
Copy link
Collaborator

@chrisguidry chrisguidry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gaining ground!

Comment on lines 173 to 181
# We sometimes call this prior to setting up the run context, so we create a temporary
# context here
# TODO: Should we set up the run context earlier in Engine.start?
log_prints = should_log_prints(self.task)
task_run_context = TaskRunContext(
task=self.task,
log_prints=log_prints,
task_run=self.task_run,
parameters=self.parameters,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep this definitely feels out of place to me too. I think you're right about moving it earlier so we don't have to do this here

@desertaxle desertaxle merged commit e5b8ff1 into main May 20, 2024
25 checks passed
@desertaxle desertaxle deleted the fix-task-tests branch May 20, 2024 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An improvement of an existing feature migration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants