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

We missed a place to update the cargo-pgx version. #442

Closed
wants to merge 2 commits into from
Closed

Conversation

epgts
Copy link
Contributor

@epgts epgts commented Jun 6, 2022

We really need to get a handle on this...

We really need to get a handle on this...
@epgts
Copy link
Contributor Author

epgts commented Jun 6, 2022

Why don't we run .github/workflows/patch_build.yml on every pull request?
Currently we limit it to

    paths:
      - 'docker/patch/**'
      - '.github/workflows/patch_build.yml'

but that means we miss breaking changes like the pgx upgrade.

Any change to the inputs to cargo pgx install or cargo run --manifest-path ../tools/post-install/Cargo.toml need to execute this to detect breakage... and that's almost everything.

Copy link
Contributor

@rtwalker rtwalker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently when running sql-doctester under patch_build, the extension
needs to be DROPped first. Make tools/build DROP and switch to that.

From CI error message:

thread 'main' panicked at 'could not run init script: Error { ... message: "extension "timescaledb" does not exist" ... }', tools/sql-doctester/src/runner.rs:102:14

Do you want DROP EXTENSION IF EXISTS?

@rtwalker
Copy link
Contributor

rtwalker commented Jun 7, 2022

We really need to get a handle on this...

Agreed. Thanks for leaving the comment hints in the appropriate places! Wonder what else we can do for this?

@epgts
Copy link
Contributor Author

epgts commented Jun 7, 2022

Do you want DROP EXTENSION IF EXISTS?

That's probably a good idea so I added that, but the problem here was that BOTH extensions already exist. I reproduced that problem locally and now it's gone. Here goes...

@JLockerman am I papering over a problem rather than fixing it? How was this supposed to work? Why didn't the extension exist last time you ran it, but now it does?

Apparently when running sql-doctester under patch_build, the extension
needs to be DROPped first.  Make tools/build DROP and switch to that.
@JLockerman
Copy link
Contributor

@epgts the doctester spins up a new DB for each file; I don't see how the extension could already be installed since we don't install it on the template. That said, I think the best way to avoid already-installed errors is probably to use CREATE EXTENSION IF NOT EXISTS, ie. CREATE EXTENSION IF NOT EXISTS timescaledb; CREATE EXTENSION timescaledb_toolkit;

@epgts
Copy link
Contributor Author

epgts commented Jun 8, 2022 via email

@epgts epgts closed this Jun 13, 2022
@epgts epgts mentioned this pull request Jan 3, 2023
4 tasks
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 this pull request may close these issues.

4 participants