Closed TheOtherBrian1 closed 11 months ago
@TheOtherBrian1 Sorry for the late reply. The change looks good, but I'd like to bring back the test suite first. I'll do a PR and then we can rebase here.
Btw this needs a version update and a migration script, since the function definition changed. Example PR: https://github.com/supabase/pg_net/pull/83/files
I've also seen another PR that's missing a version upgrade: https://github.com/supabase/pg_net/pull/93
@TheOtherBrian1 Rebasing should make the tests green now. Just merged https://github.com/supabase/pg_net/pull/102
@steve-chavez There might be something wrong with the GitHub action variables. The tests gave the following error:
ERROR: extension "pg_net" has no installation script nor update path for version "0.7.2"
There might be something wrong with the GitHub action variables. The tests gave the following error: ERROR: extension "pg_net" has no installation script nor update path for version "0.7.2"
@TheOtherBrian1 Are you able to reproduce the above locally?
Thanks for your work here @TheOtherBrian1.
I've merged https://github.com/supabase/pg_net/pull/105, which should supersede this PR.
We'll also make a new release on https://github.com/supabase/pg_net/pull/109.
What kind of change does this PR introduce?
Bug fix:
A commit for
worker.c
altered its "is active" response message from"pg_net worker"
to"pg_net " VERSION " worker"
.However, the
net.check_worker_is_up()
function inpg_net.sql
hasn't been revised to accommodate this change. Consequently, it inaccurately concludes that the worker is always inactive. I've adjusted its test condition to align with the updated format.What is the current behavior?
Even when the worker is active, net.check_worker_is_up() returns:
What is the new behavior?
By updating the comparison in net.check_worker_is_up() to support versioning, the function is able to properly detect when the worker is active.
Old Comparison:
... where backend_type = 'pg_net worker')
New Comparison:
... where backend_type ~ 'pg_net \d+(\.\d+){0,2} worker')
Additional context
This pull request was informed by an error discussed in issue 98. The issuer utilized the net.check_worker_is_up function for debugging purposes. They observed that the function produced inaccurate outcomes: