Repository navigation
FIX: Repeat the update request with the product, as the specification says - #270
Merged
Merged
Conversation
… says On a 300 that lists AvailableUris, the data file update service now repeats its first request to the configured address with the Product value added, rather than following the URI the Distributor offers. When data_update_product_type is set, every request carries that product, including the first, and a 300 to it is not followed. With none set, no Product parameter is sent. The update examples name a product only when given one.
Draft
A 300 answer whose AvailableUris list is empty or gives no Product value is reported by its status, as any other response is and as the data updates specification says, rather than as a product not offered. The test checks the empty list and the list with no product.
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.
Why
#268 handled the Distributor's 300 answer, sent when a license key holds several products, by following the URI the Distributor offers. The data updates specification (51Degrees/specifications#194) instead repeats the first request to the configured address with only the
Productvalue added, and it adds a configured product. This brings python into line with it.What changes
AvailableUrislist, the service repeats its first request withProduct=<value>added, using the product of the loaded data file, with the sameIf-Modified-Sincedate.data_update_product_typeis the configured product. When it is set, every request carriesProduct, including the first, and a 300 to such a request is not followed. With none set, noProductparameter is sent, and the formatter drops an empty one.data_update_product_type, which the published packages already have. The Device Detection example's keyed test still passes V4TAC.Locationheader a 300 carries is not followed. Two new tests send a 300 whoseLocationpoints at another product and fail if it is followed.Tests
SeveralProductsTestsinpipeline/fiftyone_pipeline_engines/tests/test_datafile_update_http.pycovers the second request, the configured product, theLocationheader, and a 300 whose list is empty or names no product, which is reported by its status.python -m pytest tests/test_datafile_update_http.pyinpipeline/fiftyone_pipeline_engineson Python 3.12 gives 90 passed at this head.