Ensure AsyncTAPJob.result strictly follows TAP spec result ID requirement #644
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.
Description of Issue
In the process of using
pyvo
with our TAP service at the Rubin Observatory for inspecting job endpoints, I've noticed an issue when usingAsyncTAPJob
to fetch results for a job that does not have a result entry withid="result"
.Sample Snippet:
Sample Job:
Currently this will produce the following output for our case, where we include informative/debugging entries in our results:
DALServiceError: No connection adapters were found for 'uws:executing:10'
This is because it tries to find a result with id="results", and if none are found it will default to the first result entry.
Summary of fix
This PR updates the
AsyncTAPJob.result
method to strictly follow the TAP specification requirement that ADQL query results must have id="result".Per TAP spec section 2.2:
Changes:
Potential Impact:
Testing:
Alternative options
If you think this change is likely to have an impact on non-compliant services that pyvo should continue to support, perhaps there could be an alternative fix I could add to check the existence of the HTTP protocol in the string we get from result_uri.
Feedback welcome on balancing strict compliance vs backwards compatibility.
I can add some tests if this looks like a valid fix for the issue described.