Re: No migration action required when going from 2.1.0 to 2.2.0 using pgsql backend

Martin Östlund via Roundup-users <[email protected]>
Newsgroups gmane.comp.bug-tracking.roundup.user
Message-ID <[email protected]>
On 3/2/23 17:26, John P. Rouillard wrote:
> Hello Martin:

Hi John,

> You have raised an interesting issue. AFAIK nobody has tested 2.2.0
> with PostgreSQL 10.
> 
> In message <[email protected]>,
> =?UTF-8?Q?Martin_=c3=96stlund?= via Roundup-users writes:
>> I'm performing an upgrade from 2.1.0 to 2.2.0, using Postgresql 10.23 as
>> backend.
> 
> Roundup supports Postgres full text search with Postgres 11.0 and
> newer. Version 10.23 should work fine for all other Roundup uses. Just
> don't expect PostgreSQL FTS to work after the upgrade.

Noted. Thanks.

> However I wonder if that's a clue. If the upgrade fails it should not
> tel you there is no need to upgrade though.
> 
>  From my reading of the Roundup code, a failure when setting up the FTS
> migration should result in an exception that is reported to the user.
> 
> I just took a look through the full text search documentation for
> PostgreSQL for 10.x releases. The SQL we execute as part of the schema
> upgrade should be compatible with 10.x. IIRC (and I could be wrong)
> the query and data loading part of FTS need the version 11.0+
> requirement.
> 
> Also FYI version 10.23 isn't supported by PostgreSQL anymore. I don't
> know if RedHat has a newer supported version of postgres.

Thanks for the heads-up. PostgreSQL 10.x is the default in RHEL8, but 
version 12 and 13 are available as well.

>> Reading the upgrade steps on
>> https://www.roundup-tracker.org/docs/upgrading.html#migrating-from-2-1-0-to-2-2-0,
>> I would expect there to be schema changes for "Rdbms version change from
>> 6 to 7 (required)".
>>
>> These are the steps I've taken, and the outcome
> 
> Just to verify, the original version of Roundup you are upgrading this
> time was 2.1.0.
> 
> This is *not* a 2.0 upgrade to 2.2.0 and you are at the 2.1.0 -> 2.2.0
> step in the procedure. Correct?

Correct.

>> 1. Downloaded and extracted roundup-2.2.0.tar.gz
>> 2. python3 setup.py install
>> 3. systemctl stop roundup
> 
> If you are using the inbound email interface, did you stop it as well?
> 
>> 4. roundup-admin -i /path/to/tracker updateconfig newconfig.ini
> 
> Were there any changes between your original config.ini and newconfig.ini?

Yes, a few new settings.

> Does allowed_api_origins exist in your new config.ini? If so your
> config.ini was generated with the 2.2.0 configuration.

Yes, it exists and is empty value.

> If there were no changes or you are missing allowed_api_origins, it
> sounds like something went wrong with the install. If you installed
> 2.1.0 and 2.2.0 in different places/virtual environments, are you
> calling the 2.1.0 roundup-admin.
> 
> What version does:
> 
>    roundup-admin -i <tracker_home>
> 
> report?

Roundup 2.2.0 ready for input.

>> 5. replaced /path/to/tracker/config.ini with newconfig.ini
>> 6. roundup-admin -i /path/to/tracker migrate
>>
>> Last step (6) outputs "No migration action required".
>> I would expect to perform necessary schema changes at this step. Are my
>> expectations wrong or should it have performed migrations?
> 
> Your expectations are correct.
> 
>> Python 3.6.8
>> REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 8"
>> REDHAT_BUGZILLA_PRODUCT_VERSION=8.7
> 
> I don't run RedHat, but I expect it would works as you expect. Perhaps
> somebody else runs RH or one of it's derivatives and knows of a reason
> it wouldn't.
> 
> The migration code is checked by our tests. The roundup-admin
> interface to the code is not. (I'll see if I can fix that.) To tell if
> this is a bug in the roundup-admin code, we need to see if the
> migration has been done.
> 
> If you are running postgresql on the same machine as Roundup, run the
> following (replace rounduptest with the name of your Roundup db):
> 
>    sudo -u postgres psql rounduptest -c 'select schema from schema;'
> 
> It will dump a json blob. The first field should be version. What
> version does it show? If the upgrade completed, it should show 7. If
> you are still using the 2.1.0 schema it should show 6.

'<roundup.hyperdb.Multilink to "keyword">')])}, 'version': 7}

> Also run:
> 
>     sudo -u postgres psql rounduptest -c "\d __words"
> 
> the size of the _words column should be 55. E.G.
> 
>                        Table "public.__words"
>     Column  |         Type          | Collation | Nullable | Default
>    ---------+-----------------------+-----------+----------+---------
>     _word   | character varying(55) |           |          |
> 
> if your schema update completed. If it is at 30 (IIRC) you're still at
> the 2.1.0 schema.

  _word   | character varying(55

> If you have a remote postgresql DB, you should be able to run the psql
> command with '-U <user> -w ' using the user/password in your
> config.ini.
> 
> Hope this helps.
> 
> Let us know what you find. Hopefully we can solve this easily.
> 

Thank you for your valuable input, John. It does indeed look like the 
schema has been upgraded as expected. So, the remaining question is why 
it simply said, "No migration action required".

Kind regards,
-- 
Martin Östlund          Support
Cendio AB               https://cendio.com
Teknikringen 8          https://twitter.com/ThinLinc
583 30 Linköping        https://facebook.com/ThinLinc



_______________________________________________
Roundup-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/roundup-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.