Opened 5 years ago

Closed 5 years ago

#4485 closed task (fixed)

regression test to test postgis_extensions_upgrade

Reported by: robe Owned by: strk
Priority: medium Milestone: PostGIS 2.5.4
Component: build Version: master
Keywords: Cc:

Description

like, call postgis_extensions_upgrade() and then check that there's no UNPACKAGED! substring in the output of postgis_full_version()

Change History (14)

comment:1 by strk, 5 years ago

In 17731:

[run_test] Add support for upgrading from unpackaged<version>

See #4485

comment:2 by strk, 5 years ago

In 17732:

[check_all_upgrades] Test upgrades from old versions unpackaged

See #4485

comment:3 by strk, 5 years ago

So,we do have the testing support in place, now it is just a matter of adding a test for postgis_full_version() NOT complaining about anything. It could be the UNPACKAGED! line or any needs upgrade label. We don't want to see any of that.

comment:4 by strk, 5 years ago

Resolution: fixed
Status: newclosed

In 17736:

Add test for postgis_full_version()

Closes #4485

NOTE: the test is only included in the core tests, might need to

be replicated for sfcgal/topology/raster

comment:5 by strk, 5 years ago

Resolution: fixed
Status: closedreopened

I'm reopening because I didn't actually add any call to postgis_extensions_upgrade() with my commit. That's still all to do.

What run_test.pl does at the moment is directly call ALTER EXTENSION ... UPDATE when called with --extension and --upgrade-path . What we would want is something to have it perform the upgrade using the postgis_extensions_upgrade() instead. What would a good switch name for that feature be ? Maybe --upgrade-with-function ? Note that postgis_extensions_upgrade() does not support a target version, so cannot always honour a user-provided --upgrade-path . Also, it is not always available, and when is available we end up running the _old_ version of it, not the new version.

comment:6 by strk, 5 years ago

In 17738:

Add support for :auto and :auto! upgrade-path targets in run_test.pl

The former will request upgrading to default version, the latter
to do so using the postgis_extension_upgrade() function.

See #4485

comment:7 by strk, 5 years ago

In 17739:

[check_all_upgrades] support :auto and :auto! upgrade targets

See #4485

comment:8 by strk, 5 years ago

Manually testing the new support (I've added :auto and :auto! as upgrade-path targets) it looks like postgis_extensions_upgrade() leaves raster unpackaged when coming from 2.5.0 or older, should we change this to re-package when needed ? The documentation says we do repackage, which is NOT happening (unless you call it twice).

comment:9 by strk, 5 years ago

Manually testing the new support (I've added :auto and :auto! as upgrade-path targets) it looks like postgis_extensions_upgrade() leaves raster unpackaged when coming from 2.5.0 or older, should we change this to re-package when needed ? The documentation says we do repackage, which is NOT happening (unless you call it twice).

comment:10 by strk, 5 years ago

In 17745:

run_test.pl: always repackage raster when upgrading via function

This is because the upgrade function invoked may be coming from the
a pre-split version and thus not know anything about repackaging.

See #4485

comment:11 by strk, 5 years ago

Resolution: fixed
Status: reopenedclosed

In 17753:

Have 'installcheck' also check with upgrade-from-function

Closes #4485

Adds an installcheck-upgrade-byfunc target,
dependency of installcheck-upgrade

comment:12 by strk, 5 years ago

Summary: regrssion test to test postgis_extensions_upgraderegression test to test postgis_extensions_upgrade

For the record: with latest commit the good bots are expected to fail, due to make installcheck now failing for the bug reported as #4486 (which will be fixed once we have a record of failure)

comment:13 by strk, 5 years ago

Resolution: fixed
Status: closedreopened

Reopening because it doesn't look like extension upgrade is really being tested by GitLab, for some reason (there may be issues with how RUNTESTFLAGS is passed around): https://gitlab.com/postgis/postgis/-/jobs/277720711

comment:14 by strk, 5 years ago

Resolution: fixed
Status: reopenedclosed

Fixed with r17756 -- see https://gitlab.com/postgis/postgis/-/jobs/277847404 We should probably also do installcheck from Travis and Drone ...

Note: See TracTickets for help on using tickets.