Upgrading BaseX by several major versions
Tuesday, 19 November 2024 · 11 messages · last reply 18 Dec 2024
RD
Rémy Delanaux19 Nov 2024 08:53 #
Hello,
I manage a project I've worked on from 2020 to 2022 and have recently come back to (no one has really worked on since then).
The project currently runs BaseX 9.4, and we obviously would like to catch up on versions of BaseX.
But I'm wondering what is the best way to process here. I don't remember upgrading major versions of BaseX during my time on project (we changed servers so for BaseX 9 we did a fresh install and backup restore)
What is the correct way to do this? Should I straight up install the latest version (probably BaseX at the time of writing) and find all blocking migration changes, or gradually install major version after major version (10 then 11 then 12 when available) and ook for smaller migration processes? I wasn't able to find migration guides except for upgrading from 9 to 10 (although there are individual changelogs for each individual module).
Thanks!
Best,
Remy Delanaux
ML
Marco Lettere19 Nov 2024 09:41 #
Hi Remy,
we faced this issue several times. I can suggest you step up directly to the target version and open your code in the BaseX Gui. There by just following the parsing errors you can refactor your code and depending on the code complexity this should not take too long.
M.
Quoted text · Rémy Delanaux · 26 lines
On 19/11/24 08:53, Rémy Delanaux wrote: > > Hello, > > I manage a project I've worked on from 2020 to 2022 and have recently > come back to (no one has really worked on since then). > The project currently runs BaseX 9.4, and we obviously would like to > catch up on versions of BaseX. > > But I'm wondering what is the best way to process here. I don't > remember upgrading major versions of BaseX during my time on project > (we changed servers so for BaseX 9 we did a fresh install and backup > restore) > > What is the correct way to do this? Should I straight up install the > latest version (probably BaseX at the time of writing) and find all > blocking migration changes, or gradually install major version after > major version (10 then 11 then 12 when available) and ook for smaller > migration processes? > I wasn't able to find migration guides except for upgrading from 9 to > 10 (although there are individual changelogs for each individual module). > > Thanks! > > Best, > Remy Delanaux
CG
Christian Grün19 Nov 2024 10:41 #
Dear Remy,
As the database format has not changed since Version 9, the good thing is that you won’t have to update your databases, so I would do what Marco suggested. For the upgrade to BaseX 10, there is a page in our Wiki that gives some further instructions [1].
Best,
Christian
[1] https://docs.basex.org/main/BaseX_10
Quoted text · Marco Lettere · 37 lines
On Tue, Nov 19, 2024 at 9:51 AM Marco Lettere <m.lettere at gmail.com> wrote: > Hi Remy, > > we faced this issue several times. I can suggest you step up directly to > the target version and open your code in the BaseX Gui. There by just > following the parsing errors you can refactor your code and depending on > the code complexity this should not take too long. > > M. > On 19/11/24 08:53, Rémy Delanaux wrote: > > > Hello, > > I manage a project I've worked on from 2020 to 2022 and have recently come > back to (no one has really worked on since then). > The project currently runs BaseX 9.4, and we obviously would like to catch > up on versions of BaseX. > > But I'm wondering what is the best way to process here. I don't remember > upgrading major versions of BaseX during my time on project (we changed > servers so for BaseX 9 we did a fresh install and backup restore) > > What is the correct way to do this? Should I straight up install the > latest version (probably BaseX at the time of writing) and find all > blocking migration changes, or gradually install major version after major > version (10 then 11 then 12 when available) and ook for smaller migration > processes? > I wasn't able to find migration guides except for upgrading from 9 to 10 > (although there are individual changelogs for each individual module). > > Thanks! > > Best, > Remy Delanaux > >
RD
Rémy Delanaux19 Nov 2024 12:50 #
Dear Christian and Marco,
Thank you for the helpful replies.
It's reassuring if the maintenance would be mostly about code renaming rather than heavy database editing.
Do you think there are notable breaking changes (other than function renaming) to which I should be particularly careful?
As for using the GUI, I never actually used it since the project I work on is both developed and hosted on Linux machines, so I don't think it's available, is it?
Best,
Remy
Le mar. 19 nov. 2024 à 10:41, Christian Grün <christian.gruen at gmail.com> a écrit :
Quoted text · Christian Grün · 51 lines
> Dear Remy, > > As the database format has not changed since Version 9, the good thing is > that you won’t have to update your databases, so I would do what Marco > suggested. For the upgrade to BaseX 10, there is a page in our Wiki that > gives some further instructions [1]. > > Best, > Christian > > [1] https://docs.basex.org/main/BaseX_10 > > > On Tue, Nov 19, 2024 at 9:51 AM Marco Lettere <m.lettere at gmail.com> wrote: > >> Hi Remy, >> >> we faced this issue several times. I can suggest you step up directly to >> the target version and open your code in the BaseX Gui. There by just >> following the parsing errors you can refactor your code and depending on >> the code complexity this should not take too long. >> >> M. >> On 19/11/24 08:53, Rémy Delanaux wrote: >> >> >> Hello, >> >> I manage a project I've worked on from 2020 to 2022 and have recently >> come back to (no one has really worked on since then). >> The project currently runs BaseX 9.4, and we obviously would like to >> catch up on versions of BaseX. >> >> But I'm wondering what is the best way to process here. I don't remember >> upgrading major versions of BaseX during my time on project (we changed >> servers so for BaseX 9 we did a fresh install and backup restore) >> >> What is the correct way to do this? Should I straight up install the >> latest version (probably BaseX at the time of writing) and find all >> blocking migration changes, or gradually install major version after major >> version (10 then 11 then 12 when available) and ook for smaller migration >> processes? >> I wasn't able to find migration guides except for upgrading from 9 to 10 >> (although there are individual changelogs for each individual module). >> >> Thanks! >> >> Best, >> Remy Delanaux >> >>
ML
Marco Lettere19 Nov 2024 13:07 #
Unless it is is a headless server (without X, Gnome, KDE, or the like) it should be there.
You find the script in the basex/bin folder and it's named basexgui.
M.
Quoted text · Rémy Delanaux · 75 lines
On 19/11/24 12:50, Rémy Delanaux wrote: > Dear Christian and Marco, > > Thank you for the helpful replies. > It's reassuring if the maintenance would be mostly about code renaming > rather than heavy database editing. > Do you think there are notable breaking changes (other than function > renaming) to which I should be particularly careful? > > As for using the GUI, I never actually used it since the project I > work on is both developed and hosted on Linux machines, so I don't > think it's available, is it? > > Best, > Remy > > > Le mar. 19 nov. 2024 à 10:41, Christian Grün > <christian.gruen at gmail.com> a écrit : > > Dear Remy, > > As the database format has not changed since Version 9, the good > thing is that you won’t have to update your databases, so I would > do what Marco suggested. For the upgrade to BaseX 10, there is a > page in our Wiki that gives some further instructions [1]. > > Best, > Christian > > [1] https://docs.basex.org/main/BaseX_10 > > > On Tue, Nov 19, 2024 at 9:51 AM Marco Lettere > <m.lettere at gmail.com> wrote: > > Hi Remy, > > we faced this issue several times. I can suggest you step up > directly to the target version and open your code in the BaseX > Gui. There by just following the parsing errors you can > refactor your code and depending on the code complexity this > should not take too long. > > M. > > On 19/11/24 08:53, Rémy Delanaux wrote: >> >> Hello, >> >> I manage a project I've worked on from 2020 to 2022 and have >> recently come back to (no one has really worked on since then). >> The project currently runs BaseX 9.4, and we obviously would >> like to catch up on versions of BaseX. >> >> But I'm wondering what is the best way to process here. I >> don't remember upgrading major versions of BaseX during my >> time on project (we changed servers so for BaseX 9 we did a >> fresh install and backup restore) >> >> What is the correct way to do this? Should I straight up >> install the latest version (probably BaseX at the time of >> writing) and find all blocking migration changes, or >> gradually install major version after major version (10 then >> 11 then 12 when available) and ook for smaller migration >> processes? >> I wasn't able to find migration guides except for upgrading >> from 9 to 10 (although there are individual changelogs for >> each individual module). >> >> Thanks! >> >> Best, >> Remy Delanaux >
G
Quoted text · Rémy Delanaux · 4 lines
On Tue, Nov 19, 2024 at 12:50:35PM +0100, Rémy Delanaux scripsit: > As for using the GUI, I never actually used it since the project I work on > is both developed and hosted on Linux machines, so I don't think it's > available, is it?
It is!
.../basex/bin/basexgui
works for POSIX to get the GUI and has for many years.
It's also where one goes to adjust the heap size for the GUI, which is independent of the other means of running BaseX.
--
Graydon Saunders | graydonish at fastmail.com
Þæs oferéode, ðisses swá mæg.
-- Deor ("That passed, so may this.")
ZD
If whitespace matters to you one thing to be careful is the change in the whitespace toggle behaviour:
Version 10:
w
Toggles whitespace stripping of XML text nodes. By default, whitespace will be preserved.
Version 9:
-w
Toggles whitespace chopping of XML text nodes. By default, whitespaces will be chopped.
https://docs.basex.org/main/Command-Line_Options
Daniel
Quoted text · BaseX-Talk · 32 lines
Von: BaseX-Talk <basex-talk-bounces at mailman.uni-konstanz.de> Im Auftrag von Rémy Delanaux Gesendet: Dienstag, 19. November 2024 12:51 An: Christian Grün <christian.gruen at gmail.com> Cc: basex-talk at mailman.uni-konstanz.de Betreff: Re: [basex-talk] Upgrading BaseX by several major versions Dear Christian and Marco, Thank you for the helpful replies. It's reassuring if the maintenance would be mostly about code renaming rather than heavy database editing. Do you think there are notable breaking changes (other than function renaming) to which I should be particularly careful? As for using the GUI, I never actually used it since the project I work on is both developed and hosted on Linux machines, so I don't think it's available, is it? Best, Remy Le mar. 19 nov. 2024 à 10:41, Christian Grün <mailto:christian.gruen at gmail.com> a écrit : Dear Remy, As the database format has not changed since Version 9, the good thing is that you won’t have to update your databases, so I would do what Marco suggested. For the upgrade to BaseX 10, there is a page in our Wiki that gives some further instructions [1]. Best, Christian [1] https://docs.basex.org/main/BaseX_10 On Tue, Nov 19, 2024 at 9:51 AM Marco Lettere <mailto:m.lettere at gmail.com> wrote: Hi Remy, we faced this issue several times. I can suggest you step up directly to the target version and open your code in the BaseX Gui. There by just following the parsing errors you can refactor your code and depending on the code complexity this should not take too long. M. On 19/11/24 08:53, Rémy Delanaux wrote: Hello, I manage a project I've worked on from 2020 to 2022 and have recently come back to (no one has really worked on since then). The project currently runs BaseX 9.4, and we obviously would like to catch up on versions of BaseX. But I'm wondering what is the best way to process here. I don't remember upgrading major versions of BaseX during my time on project (we changed servers so for BaseX 9 we did a fresh install and backup restore) What is the correct way to do this? Should I straight up install the latest version (probably BaseX at the time of writing) and find all blocking migration changes, or gradually install major version after major version (10 then 11 then 12 when available) and ook for smaller migration processes? I wasn't able to find migration guides except for upgrading from 9 to 10 (although there are individual changelogs for each individual module). Thanks! Best, Remy Delanaux
NR
Dear Rémy,
A particular change in BaseX 11.4 that took me a while to find, is a change in
http:send-request. So this is only relevant if you use that function.
If you send a JSON body, previously you had to serialize it, like: http:send-request(
<http:request method='put'>
<http:body media-type='application/json'/>
</http:request>,
$url,
serialize($body-map, map{'method':'json'})
)This has changed, and the right way to call this is now:
http:send-request(
<http:request method='put'>
<http:body media-type='application/json'/>
</http:request>,
$url,
$body-map
)If you use
http:send-request, I hope this will save you a bit of time.
Best regards,
Nico VerwerCG
Christian Grün20 Nov 2024 09:05 #
Thanks for pointing this out, Nico. This one should have been documented indeed, or changed with the next major release.
Nico Verwer (Rakensi) <nverwer at rakensi.com> schrieb am Mi., 20. Nov. 2024, 08:46:
Quoted text · Nico Verwer (Rakensi) · 30 lines
> Dear Rémy, > > A particular change in BaseX 11.4 that took me a while to find, is a > change in http:send-request. So this is only relevant if you use that > function. > If you send a JSON body, previously you had to serialize it, like: > > http:send-request( > <http:request method='put'> > <http:body media-type='application/json'/> > </http:request>, > $url, > serialize($body-map, map{'method':'json'}) > ) > > This has changed, and the right way to call this is now: > > http:send-request( > <http:request method='put'> > <http:body media-type='application/json'/> > </http:request>, > $url, > $body-map > ) > > If you use http:send-request, I hope this will save you a bit of time. > > Best regards, > Nico Verwer >
RD
Rémy Delanaux17 Dec 2024 14:22 #
Dear Christian and Nico,
To follow-up on that JSON issue: I think I'm having some trouble with that one.
As Nico suggested, I directly switched my serialization to put the map variable as parameter to '
http:send-request' (a map previously created with map:merge in my code).
But I have the following errors:
* When I don't serialize and directly send the map, I get an "*Atomic item required, function item found*" error at request time.
* When I *do* serialize it, like I did (with success) in BaseX 9, I get an "*Invalid
json message received*" error at request time.
The API I query hasn't changed since my BaseX update, and that code was working fine before, so the data I send most likely isn't the problem here. I tried printing the map that is sent/serialized and it's perfectly valid JSON.
How can I solve this problem?
Thanks
Remy
Le mer. 20 nov. 2024 à 09:14, Christian Grün <christian.gruen at gmail.com> a écrit :Quoted text · Christian Grün · 39 lines
> Thanks for pointing this out, Nico. This one should have been documented > indeed, or changed with the next major release. > > > > Nico Verwer (Rakensi) <nverwer at rakensi.com> schrieb am Mi., 20. Nov. > 2024, 08:46: > >> Dear Rémy, >> >> A particular change in BaseX 11.4 that took me a while to find, is a >> change in http:send-request. So this is only relevant if you use that >> function. >> If you send a JSON body, previously you had to serialize it, like: >> >> http:send-request( >> <http:request method='put'> >> <http:body media-type='application/json'/> >> </http:request>, >> $url, >> serialize($body-map, map{'method':'json'}) >> ) >> >> This has changed, and the right way to call this is now: >> >> http:send-request( >> <http:request method='put'> >> <http:body media-type='application/json'/> >> </http:request>, >> $url, >> $body-map >> ) >> >> If you use http:send-request, I hope this will save you a bit of time. >> >> Best regards, >> Nico Verwer >> >
CG
Christian Grün18 Dec 2024 10:15 #
Hi Rémy,
Could you please provide us with a minimized example of your
http:send-request call? The arguments can have dummy values.
Thanks,
ChristianQuoted text · Rémy Delanaux · 72 lines
On Tue, Dec 17, 2024 at 2:22 PM Rémy Delanaux <delanaux.remy at gmail.com> wrote: > Dear Christian and Nico, > > To follow-up on that JSON issue: I think I'm having some trouble with that > one. > > As Nico suggested, I directly switched my serialization to put the map > variable as parameter to 'http:send-request' (a map previously created > with map:merge in my code). > > But I have the following errors: > * When I don't serialize and directly send the map, I get an "*Atomic > item required, function item found*" error at request time. > * When I *do* serialize it, like I did (with success) in BaseX 9, I get > an "*Invalid json message received*" error at request time. > The API I query hasn't changed since my BaseX update, and that code was > working fine before, so the data I send most likely isn't the problem here. > I tried printing the map that is sent/serialized and it's perfectly valid > JSON. > > How can I solve this problem? > > Thanks > > Remy > > > > > Le mer. 20 nov. 2024 à 09:14, Christian Grün <christian.gruen at gmail.com> > a écrit : > >> Thanks for pointing this out, Nico. This one should have been documented >> indeed, or changed with the next major release. >> >> >> >> Nico Verwer (Rakensi) <nverwer at rakensi.com> schrieb am Mi., 20. Nov. >> 2024, 08:46: >> >>> Dear Rémy, >>> >>> A particular change in BaseX 11.4 that took me a while to find, is a >>> change in http:send-request. So this is only relevant if you use that >>> function. >>> If you send a JSON body, previously you had to serialize it, like: >>> >>> http:send-request( >>> <http:request method='put'> >>> <http:body media-type='application/json'/> >>> </http:request>, >>> $url, >>> serialize($body-map, map{'method':'json'}) >>> ) >>> >>> This has changed, and the right way to call this is now: >>> >>> http:send-request( >>> <http:request method='put'> >>> <http:body media-type='application/json'/> >>> </http:request>, >>> $url, >>> $body-map >>> ) >>> >>> If you use http:send-request, I hope this will save you a bit of time. >>> >>> Best regards, >>> Nico Verwer >>> >>
Written for BaseX 11.5, 11.6. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery