Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migration for 1.5.0 broken #362

Open
axelfontaine opened this issue Dec 18, 2024 · 7 comments
Open

Migration for 1.5.0 broken #362

axelfontaine opened this issue Dec 18, 2024 · 7 comments
Assignees

Comments

@axelfontaine
Copy link

axelfontaine commented Dec 18, 2024

In https://github.com/tembo-io/pgmq/blob/main/pgmq-extension/sql/pgmq--1.4.5--1.5.0.sql

WIthout this change applying it fails with

SQL State  : 42883
Error Code : 0
Message    : ERROR: function pgmq.send(text, jsonb, unknown, timestamp with time zone) does not exist
  Hint: No function matches the given name and argument types. You might need to add explicit type casts.

and

SQL State  : 42883
Error Code : 0
Message    : ERROR: function pgmq.send_batch(text, jsonb[], unknown, timestamp with time zone) does not exist
  Hint: No function matches the given name and argument types. You might need to add explicit type casts.

respectively.

What really should happen here, is that all the migrations should be automatically integration tested as part of the release process to prevent this from occurring again.

@ChuckHend
Copy link
Member

Thanks for raising the issue @axelfontaine . There is a CI job that checks the upgrade path from v1.0.0, but what you've shown tells me there must be a bug in how that test is being executed, or we are just missing test coverage.

@ChuckHend ChuckHend added the bug Something isn't working label Dec 18, 2024
@ChuckHend
Copy link
Member

@axelfontaine do you want to get a PR up to resolve this? We can release v1.5.1 quickly afterwards, then work on fixing how these tests work.

@ChuckHend
Copy link
Member

@axelfontaine, I opened a PR, but I haven't been able to quite reproduce this yet.

You're seeing this error when calling send and send_batch using one of the new 4 parameter variants, correct? If so, could you confirm exactly which values you are using? If you're having an issue with the delay parameter needs to be explicitly typed, so either pass in an integer like 10 or explicitly cast it '10'::integer.

@axelfontaine
Copy link
Author

axelfontaine commented Dec 19, 2024

No, I am seeing the error when running the 1.5.0 migration against a 1.4.5 schema.

@ChuckHend
Copy link
Member

can you provide the output you get when you run it? something like:

\dx pgmq
                                 List of installed extensions
 Name | Version | Schema |                             Description                             
------+---------+--------+---------------------------------------------------------------------
 pgmq | 1.4.5   | pgmq   | A lightweight message queue. Like AWS SQS and RSMQ but on Postgres.
(1 row)

alter extension pgmq update to '1.5.0';
ALTER EXTENSION
postgres=# \dx pgmq
                                 List of installed extensions
 Name | Version | Schema |                             Description                             
------+---------+--------+---------------------------------------------------------------------
 pgmq | 1.5.0   | pgmq   | A lightweight message queue. Like AWS SQS and RSMQ but on Postgres.
(1 row)

@ChuckHend ChuckHend removed the bug Something isn't working label Jan 7, 2025
@ChuckHend
Copy link
Member

@axelfontaine , can you confirm how you are executing the migration script? They are not meant to be executed directly, rather by alter extension pgmq update

@axelfontaine
Copy link
Author

@ChuckHend Sorry for the late reply. I've been busy with the launch of our new product https://sprinters.sh (10x cheaper GitHub Actions on your own AWS account). I'll get back to this in a few days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants