Skip to content

Conversation

@cretz
Copy link
Member

@cretz cretz commented Sep 14, 2022

What was changed

  • Added support for Temporalite
  • Use Rust wrapper for ephemeral servers which also downloads and runs them
  • Convert Python tests to use the test framework
    • Some tests had to be disabled for the time skipping server
    • Tests for TLS and search attributes are still using Go-based Temporalite for their programmatic needs but we should be able to fix in Temporalite soon
  • Update CI to run with Temporalite and test server

Checklist

  1. Closes Convert all tests to use test framework and multiple server forms #120

@cretz cretz requested a review from a team September 14, 2022 22:02
@cretz cretz force-pushed the test-server-update branch from 9a54b2e to bcbe4fa Compare September 14, 2022 22:18
@cretz cretz marked this pull request as ready for review September 14, 2022 22:18
interceptors.append(_TimeSkippingClientInterceptor(self))
super().__init__(_client_with_interceptors(client, *interceptors))
self._server = server
self._auto_time_skipping = True
Copy link
Member

Choose a reason for hiding this comment

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

nit: It reads a bit funny that this always is initted to true even if skipping is unsupported.

Copy link
Member Author

Choose a reason for hiding this comment

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

Agreed, but luckily internal only. I can clarify in a comment this has no meaning when time skipping unsupported.

logger = logging.getLogger(__name__)

# TODO(cretz): Remove this when Temporalite supports search attributes and TLS
class ExternalGolangServer:
Copy link
Member

Choose a reason for hiding this comment

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

Why call this a GolangServer? Maybe just LocalSrcServer or something? Temporalite is a "golang" server too, they all are really, so it doesn't draw much distinction

Or maybe even GoBuildServer

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 what it was called before, I just moved it from another file. And it's a "golang" server in that it is the only reason I have to have Go in the Python repository and I literally go-build it live whereas Temporalite could be written in anything.

The goal is to delete this, I just have to get some features into Temporalite first which are gonna have to wait on server 1.18 for dynamic config cleanup.

@cretz cretz marked this pull request as draft September 15, 2022 14:24
@cretz
Copy link
Member Author

cretz commented Sep 15, 2022

I am currently "debugging in CI" a problem that only happens on non-windows Python 3.7. There is something with the event loop implementation on this older version that is clashing with the test implementation.

@cretz cretz force-pushed the test-server-update branch 4 times, most recently from a75b040 to ed4bd4e Compare September 16, 2022 13:14
@cretz cretz marked this pull request as ready for review September 16, 2022 13:34
@cretz
Copy link
Member Author

cretz commented Sep 16, 2022

Ok, CI fixed in core and upgraded here.

@cretz cretz requested a review from bergundy September 16, 2022 17:09
non_retryable_error_types: Optional[Sequence[str]] = None


@workflow.defn(name="kitchen_sink")
Copy link
Member

Choose a reason for hiding this comment

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

Are you keeping this kitchen sink workflow around long term?

Copy link
Member Author

Choose a reason for hiding this comment

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

Not sure yet. It powers client and activity tests since those were written prior to workflows even being available. It's pretty small for what it does.

@@ -0,0 +1,151 @@
use pyo3::exceptions::{PyRuntimeError, PyValueError};
Copy link
Member

Choose a reason for hiding this comment

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

This is so much nicer with pyo3 than neon :(

)

@staticmethod
async def start_local(
Copy link
Member

Choose a reason for hiding this comment

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

Nice work on this, I'll copy more of it over to TS

@cretz cretz merged commit 5b0e1c8 into temporalio:main Sep 16, 2022
@cretz cretz deleted the test-server-update branch September 16, 2022 20:23
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 this pull request may close these issues.

Convert all tests to use test framework and multiple server forms

3 participants