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

"John P. Rouillard" <[email protected]>
Newsgroups gmane.comp.bug-tracking.roundup.user
Message-ID <[email protected]>
Hello Martin:

In message <[email protected]>,
=?UTF-8?Q?Martin_=c3=96stlund?= writes:
>On 3/2/23 17:26, John P. Rouillard wrote:
>> 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.

Good.

>>> 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?

If an email came in between the time you ran install and ran migrate,
this could explain the missing upgrade message.

>> 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.

That is correct.

>> What version does:
>> 
>>    roundup-admin -i <tracker_home>
>> 
>> report?
>
>Roundup 2.2.0 ready for input.

Looks good.

>> 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.

I added a check yesterday to verify that the db.db_version_updated
boolean is properly set on the first open when a schema upgrade is
needed. The test passed just fine.
 
>> 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}

Looks like the upgrade is good. Interesting that it's at the end of
the blob. But that could be cased by a different Python version.

>> if your schema update completed. If it is at 30 (IIRC) you're still at
>> the 2.1.0 schema.
>
>  _word   | character varying(55

Ok.

>> 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".

The only thing I can think of is something opened the database during
the time between the install and the migrate.

An email arriving or a cron job that opened the database in the small
window between install/migrate could triger the migration.

If that happend `roundup-admin migrate` would report 'No migration
action required'. The schema version is checked on database open and
upgrade is automatic. Both of the above open the database.  The
migrate command opens the database and just makes sure to do the
commit. This prevents multiple roundup accesses from trying to do the
upgrade in parallel. That is an untested code path.

I am about to commit a change to roundup-admin that changes the output
from migrate to include the current schema version. So you would have seen:

   No migration action required. At schema version 7.

This provides some additional info if we need it in the future.

Let us know if you have any more issues. But AFAICT you are
successfully upgraded and can just use Roundup.

--
				-- rouilj
John Rouillard
===========================================================================
My employers don't acknowledge my existence much less my opinions.
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.