Skip to content

test(load): update error loadtest endpoint to generate hint#4839

Merged
wolfgangwalther merged 1 commit intoPostgREST:mainfrom
taimoorzaeem:test/loadtest/update-error-test-target
Apr 24, 2026
Merged

test(load): update error loadtest endpoint to generate hint#4839
wolfgangwalther merged 1 commit intoPostgREST:mainfrom
taimoorzaeem:test/loadtest/update-error-test-target

Conversation

@taimoorzaeem
Copy link
Copy Markdown
Member

@taimoorzaeem taimoorzaeem commented Apr 23, 2026

This endpoint didn't generate error hint which is not desired for loadtest. Now it does. As discussed in #4837 (comment).

postgrest-with-pg-18 -f test/load/fixtures.sql postgrest-run
curl -i localhost:3000/rpc/call_me_x?name=John
HTTP/1.1 404 Not Found
Date: Thu, 23 Apr 2026 18:22:20 GMT
Server: postgrest/15 (pre-release)
Content-Type: application/json; charset=utf-8
Content-Length: 282
Proxy-Status: PostgREST; error=PGRST202

{
  "code":"PGRST202",
  "details":"Searched for the function test.call_me_x with parameter name, but no matches were found in the schema cache.",
  "hint":"Perhaps you meant to call the function test.call_me",
  "message":"Could not find the function test.call_me_x(name) in the schema cache"
}

@taimoorzaeem taimoorzaeem force-pushed the test/loadtest/update-error-test-target branch from 6127365 to e5a7211 Compare April 23, 2026 18:15
This endpoint didn't generate error hint which is not desired
for loadtest.

Signed-off-by: Taimoor Zaeem <taimoorzaeem@gmail.com>
@taimoorzaeem taimoorzaeem force-pushed the test/loadtest/update-error-test-target branch from e5a7211 to 9a754e0 Compare April 23, 2026 18:16
@taimoorzaeem taimoorzaeem marked this pull request as draft April 23, 2026 18:35
@taimoorzaeem
Copy link
Copy Markdown
Member Author

taimoorzaeem commented Apr 23, 2026

I think another issue in our loadtest (errors) is that we barely have any tables and functions in our loadtest fixtures (2 tables and 1 function), which is why the loadtest result looks unbudged. We should have more tables and functions to accurately load test the hint generation.

EDIT: We should open another issue for this, I guess this PR can be merged, since it now generates the hint.

@wolfgangwalther wolfgangwalther marked this pull request as ready for review April 24, 2026 10:30
@wolfgangwalther wolfgangwalther merged commit c9253ed into PostgREST:main Apr 24, 2026
24 checks passed
@taimoorzaeem taimoorzaeem deleted the test/loadtest/update-error-test-target branch April 24, 2026 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants