fix: /PUT state not following spec with 409 - Conflict#105
Open
chomatdam wants to merge 1 commit intoyetanalytics:masterfrom
Open
fix: /PUT state not following spec with 409 - Conflict#105chomatdam wants to merge 1 commit intoyetanalytics:masterfrom
chomatdam wants to merge 1 commit intoyetanalytics:masterfrom
Conversation
Author
|
I opened an issue regarding 2.0.0 conformance tests not matching the spec: |
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.
Problem
State resources (
/xapi/activities/state) were incorrectly subject to concurrency header requirements (If-Match/If-None-Match) when a document already existed. Per the xAPI 1.0.3 spec §3.1 and xAPI 2.0.0, state resources are explicitly exempt from concurrency header requirements:This meant that a second PUT to a state resource (overwriting an existing document) without concurrency headers would incorrectly return a
409 Conflictinstead of succeeding.Impact
(since last LRSQL release)
Articulate Storyline/Rise courses using
scormdriver.jsfor xAPI communication do not sendIf-MatchorIf-None-Matchheaders when updating state documents. This caused state PUT requests to fail with409 Conflictwhen a state document already existed, breaking Articulate content playback and progress tracking.Changes
src/main/com/yetanalytics/lrs/pedestal/routes/documents.cljcparams-typeis:xapi.activities.state.PUT.request/params, PUTs without concurrency headers are allowed regardless of whether a document already existssrc/test/com/yetanalytics/lrs_test.cljAdded
document-concurrency-testthat validates version-aware concurrency behavior: