Modify compound ingest operation to wait for table build completion#970
Merged
Modify compound ingest operation to wait for table build completion#970
Conversation
anoto-moniz
reviewed
Oct 10, 2024
| """:Optional[dict[str, str]]: job output properties and results""" | ||
|
|
||
| @property | ||
| def status(self) -> Union[JobStatus, str]: |
Collaborator
There was a problem hiding this comment.
Since BaseEnumeration has str as a superclass, returning a JobStatus would not lead to a change in behavior, so this is not an API break.
anoto-moniz
reviewed
Oct 10, 2024
| return self._status | ||
|
|
||
| @status.setter | ||
| def status(self, value): |
anoto-moniz
reviewed
Oct 10, 2024
| @status.setter | ||
| def status(self, value): | ||
| if resolved := JobStatus.from_str(value, exception=False): | ||
| if resolved not in [JobStatus.RUNNING, JobStatus.SUCCESS, JobStatus.FAILURE]: |
Collaborator
There was a problem hiding this comment.
Shouldn't this support any valid JobStatus value? If so, you can use list(JobStatus) to ensure it's resilient against typos and future code changes.
Collaborator
There was a problem hiding this comment.
Oh, I see. That's strange, that the Response can't take the other statuses. Not even Pending?
Collaborator
Author
There was a problem hiding this comment.
That's what's documented. This ought to just be a read only object, so maybe we don't care about the fact that the far end will only ever return a subset.
anoto-moniz
previously approved these changes
Oct 10, 2024
anoto-moniz
approved these changes
Oct 11, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Citrine Python PR
Description
This PR updates the poll_for_job_completion method in ingestion to continue blocking until a table is built if the build_table option was true.
This PR also
PR Type:
Adherence to team decisions