Add Schema parameter to API endpoint requests#517
Add Schema parameter to API endpoint requests#517tp wants to merge 3 commits intoriverqueue:masterfrom
Conversation
|
Hi @tp! Thanks for reporting this and attempting a fix. Two requests for you before we proceed further:
|
8b5c95d to
67023ad
Compare
|
I signed the CLA. Adding the test seems a bit tricky, because the test setup here already uses schemas for test isolation, and therefore the test driver behaves differently than a production setup. Hence the test code Claude came up with it not very straightforward/production like. While I also often use the "schema per test case" pattern for "normal" test isolation, I wonder if the specific schema testing would warrant something like https://testcontainers.com/guides/getting-started-with-testcontainers-for-go? So while the tests now pass, they also did so before the fix (due to the implicitly applied schema)… |
|
@bgentry Are my updates what you had in mind, or do you need anything else from me here to get this fixed? I think the underlying tensions I describe (schema switches being a legitimate feature vs. also being used for tests) is a real problem for now, maybe something to tackle separately, and for now just rely on expert judgement (since this is basically just an alignment with how other River UI APIs work) and end-user integration test runs. |


I just noticed errors like
when using the autocomplete in the job list.
As this was my first hour using River, I just gave the error to Claude who immediately pointed out the inconsistencies between the 2 fixed methods (which did not pass the schema) and the others which do.
Depending on if you're fine with this, I could take more time later on to align this more with the repo style or add tests. Whatever is desired :)