-
Notifications
You must be signed in to change notification settings - Fork 97
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
Fix get_result(wait=True)
and support Python 3.12
#1949
Merged
Merged
Conversation
This file contains 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
cjao
force-pushed
the
improve-result-api
branch
2 times, most recently
from
May 21, 2024 21:48
0a3b19c
to
5f4adfb
Compare
cjao
changed the title
API: redesign implementation of
Redesign implementation of May 21, 2024
get_result(wait=True)
get_result(wait=True)
cjao
force-pushed
the
improve-result-api
branch
2 times, most recently
from
May 29, 2024 18:42
40b509d
to
f98d1eb
Compare
cjao
changed the title
Redesign implementation of
Fix May 29, 2024
get_result(wait=True)
get_result(wait=True)
cjao
force-pushed
the
improve-result-api
branch
2 times, most recently
from
June 14, 2024 23:01
9138a30
to
dd00785
Compare
~~@cjao can you see if you make this true in a way for other waits as well like env and deployment ? ~~ Please ignore |
cjao
force-pushed
the
improve-result-api
branch
from
September 11, 2024 18:33
8c4dcb8
to
520df3b
Compare
cjao
force-pushed
the
improve-result-api
branch
from
January 16, 2025 21:04
520df3b
to
52db4a2
Compare
cjao
force-pushed
the
improve-result-api
branch
from
January 16, 2025 21:51
52db4a2
to
131f6f8
Compare
cjao
changed the title
Fix
Fix Jan 16, 2025
get_result(wait=True)
get_result(wait=True)
and support Python 3.12
The previous `GET /dispatches/{dispatch_id}` endpoint was trying to do too much. Its responsibilities are now separated into two endpoints: * `GET /dispatches`: bulk query dispatch summaries (including status) with options to filter by `dispatch_id`, sort chronologically, and also limit the output to status only. * `GET /dispatches/{dispatch_id}`: download manifest To achieve the desired behavior of `get_result(id, wait=True)`, the client 1. Polls the dispatch status by querying the first endpoint. 2. Downloads the manifest after the dispatch has reached a final status. The server no longer returns 503 errors when the dispatch is not yet "ready". A 503 status code is not entirely accurate here because it is intended to convey temporary service unavailablity resulting from server overload or rate limiting. However, the fact that the workflow is still running does not indicate any fault of the server. These changes will allow `get_result(dispatch_id, wait=True)` to wait as long as required instead of erroring out after some time. Supporting improvements: DAL: Add sorting and pagination to Controller DAL: improve bulk get when retrieving only some columns Directly select the specified columns instead of retrieving the whole ORM entities and deferring column loading using load_only
cjao
force-pushed
the
improve-result-api
branch
from
January 17, 2025 14:45
131f6f8
to
82e46de
Compare
FyzHsn
requested changes
Jan 17, 2025
for more information, see https://pre-commit.ci
FyzHsn
approved these changes
Jan 17, 2025
wjcunningham7
approved these changes
Jan 17, 2025
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.
get_result(wait=True)
will still error out after some time. Thi PR proposes a fix using a combination of API and SDK improvements.The previous
GET /dispatches/{dispatch_id}
endpoint was trying to do too much. Its responsibilities are now separated into two endpoints:GET /dispatches
: bulk query dispatch summaries (including status) with options to filter bydispatch_id
, sort chronologically, and also limit the output to status only.GET /dispatches/{dispatch_id}
: download manifestTo achieve the desired behavior of
get_result(id, wait=True)
, the clientPolls the dispatch status by querying the first endpoint.
Downloads the manifest after the dispatch has reached a final status.
The server no longer returns 503 errors when the dispatch is not yet "ready". A 503 status code is not appropriate here because it is intended to convey temporary service unavailablity resulting from server overload or rate limiting. However, the fact that the workflow is still running does not indicate any fault of the server.
These changes will allow
get_result(dispatch_id, wait=True)
to wait as long as required instead of erroring out after some time.Fixes #1539
Fixes #1973
Fixes ENG-2039