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

Iron out steps for resolving serializer changes with Core's server #2375

Closed
joshmeek opened this issue Apr 21, 2020 · 3 comments · Fixed by #2386
Closed

Iron out steps for resolving serializer changes with Core's server #2375

joshmeek opened this issue Apr 21, 2020 · 3 comments · Fixed by #2386
Assignees

Comments

@joshmeek
Copy link

I am currently working on #2369 and in turn adding a new serializer effectively breaks its use with Core's server due to the version of prefect that the server has being behind (using the latest build).

In [14]: f = Flow('a', environment=RemoteDaskEnvironment(address="yes"))

In [15]: f.register()
Result Handler check: OK
---------------------------------------------------------------------------
ClientError                               Traceback (most recent call last)
<ipython-input-15-11702a1d3250> in <module>
----> 1 f.register()

~/Desktop/code/prefect/src/prefect/core/flow.py in register(self, project_name, build, labels, set_schedule_active, version_group_id, no_url, **kwargs)
   1371             set_schedule_active=set_schedule_active,
   1372             version_group_id=version_group_id,
-> 1373             no_url=no_url,
   1374         )
   1375         return registered_flow

~/Desktop/code/prefect/src/prefect/client/client.py in register(self, flow, project_name, build, set_schedule_active, version_group_id, compressed, no_url)
    624                     serialized_flow=serialized_flow,
    625                     set_schedule_active=set_schedule_active,
--> 626                     version_group_id=version_group_id,
    627                 )
    628             ),

~/Desktop/code/prefect/src/prefect/client/client.py in graphql(self, query, raise_on_error, headers, variables, token)
    223             elif "Malformed Authorization header" in str(result["errors"]):
    224                 raise AuthorizationError(result["errors"])
--> 225             raise ClientError(result["errors"])
    226         else:
    227             return GraphQLResult(result)  # type: ignore

ClientError: [{'message': "Invalid flow: {'environment': {'type': ['Unsupported value: RemoteDaskEnvironment']}}", 'locations': [{'line': 2, 'column': 5}], 'path': ['create_flow_from_compressed_string'], 'extensions': {'code': 'INTERNAL_SERVER_ERROR', 'exception': {'errors': [{'message': "Invalid flow: {'environment': {'type': ['Unsupported value: RemoteDaskEnvironment']}}", 'locations': [], 'path': ['create_flow_from_compressed_string']}]}}}]

This means that once #2369 (or any future serializers) are merged then when running the Core server images you would need to specify a --version master in order for it to work. I'm opening this issue as a discussion point on if this is the functionality we want or if there is a better way.

@cicdw
Copy link
Member

cicdw commented Apr 21, 2020

@joshmeek I think we can use a form of our prefect version logic for Docker storage and choose a versioned tag based on that.

We could then update the default setting here: https://github.com/PrefectHQ/prefect/blob/master/src/prefect/cli/server.py#L94

@joshmeek
Copy link
Author

Good call I like that approach and it should cover almost all cases when using the master branch. The main issue though will be for local development when working with the serializer changes before merge. In those cases I will run the services directly

@cicdw
Copy link
Member

cicdw commented Apr 21, 2020

Yea exactly, if you're truly developing at that level then you should install server directly

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.

2 participants