flytekit
flytekit copied to clipboard
wip - Delete model files
Signed-off-by: Eduardo Apolinario [email protected]
TL;DR
Remove all mentions to model files
Type
- [ ] Bug Fix
- [x] Feature
- [ ] Plugin
Are all requirements met?
- [ ] Code completed
- [ ] Smoke tested
- [ ] Unit tests added
- [ ] Code documentation added
- [ ] Any pending items have an associated Issue
Complete description
Beware:
- Not all models are removed, so far I had to bring back
common.py,array_job.py,filters.py, andschedule.py, either because there is no equivalent protobuf messages (like the objects built infilters.py) or because there's adhoc logic in the model files that was not straightforward to bring back (for example, in some cases we were inheriting from the model files, but now that we're moving to protobuf messages, inheriting from protobuf messages is not allowed) - for
oneoffields, useWhichOneof("field")to check which field is set (read https://developers.google.com/protocol-buffers/docs/reference/python-generated#oneof for more details). - to check if a field is set, use
HasField("field") - use
ClearFieldto set a singular field to null. - remote is a mess. We also do not have great test coverage there, so proceed with caution
- No positional arguments allowed in protobuf stub constructors.
- Enums are a little weird. For example, look at the generated code for the BlobDimensionality enum. We can refer to each value using
BlobType.MULTIPARTorBlobType.BlobDimensionality.MULTIPART, where in the latter casepyright(the static type-checker I'm using in emacs) was complaining, even though it works in both cases. You'll notice that I chose the former case in most search-and-replace, but it might be confusing to use that form in the long run (since it won't be clear which enum is being used as the source for the value).
Tracking Issue
https://github.com/flyteorg/flyte/issues/
Follow-up issue
NA
OR
https://github.com/flyteorg/flyte/issues/