Small Improvement to Sao, how to Submit Change Request?

I added the below improvement to SAO error feedback, when the client and the server versions do not match.

How can I contribute this code back to the project? Do I need to setup a heptapod account? If so, where? Sorry if this has been asked before or is documented, I am new and could not find the information in a reasonable time.

Best,
Bob

diff original-web/src/sao.js src/sao.js

620,621c620,622
<                     if (JSON.stringify(version.split('.').slice(0, 2)) !==
<                         JSON.stringify(Sao.__version__.split('.').slice(0, 2)))
---
>                     const serverVersion = version.split('.').slice(0, 2).join('.');
>                     const clientVersion = Sao.__version__.split('.').slice(0, 2).join('.');
>                     if (serverVersion !== clientVersion)
625c626,627
<                                 "Incompatible version of the server."),
---
>                                 "Incompatible version of the server.") + `
>                           server=${serverVersion}, client=${clientVersion}`,

See the develop page accessible from the tryton.org website.
Feel free to provide feed-back on what you find difficult to find, perhaps this can also be improved.

As a first contribution I think it good to discuss here first.

7 posts were split to a new topic: Clone tryton respository with bundle fails

Hi @dotbit

How do I continue with my suggested change?

Do you want to give me feedback here? Or can I create a merge request, and somebody will discuss with me there?

I’ve requested access on Tryton · GitLab, and the request has been pending for a few days now.

I think it is better to discuss here first.

I will have to pass on answering this question definitively because of my limited level of understanding of the clients.

First we need to decide if this feed-back is something we want.
I never felt that this is something that I need.
Every time I get the message that the client is incompatible with the server I know what I have done wrong.

For me there are two cases:

  1. You have upgraded the server, but have forgotten to upgrade the client(s).
    In this case you probably know which version the server is and which version the client is.
  2. You are doing development and are running one stable release (even number) and one development (odd number) and you use the wrong client for the server you want to connect to.
    Also in this case I know what I have done wrong.

And if it is, then the change needs to be applied to both the GTK client and SAO so that functionality of the two clients does not drift apart.

Perhaps people who are doing large deployments have a different opinion.
Perhaps you can elaborate on which cases this feed-back is essential.

For me the feedback on the web client is not very important because the user of the client can not change it.
On contrary for the desktop client, it will be useful because the user can install the proper version.
But I would not mind if for consistency we display the version on both clients.

Thanks for the swift feedback.

My scenario was different to yours:

  • I am new to Tryton.
  • I installed the server via pip, which gave me version 6.8.
  • I struggled to find the web client, and installed it then from the mercurial repository, which gave me version 6.9.
  • Getting the feedback “version mismatch” left me clueless. I was not aware of how versioning is done in general at Tryton. And it was actually frustrating, as I was sure the code showing me the message knows the details, so why is it not displaying it?

I have no idea which users of Tryton this would be helpful for or not. But I have a strong opinion about error feedback: It should be actionable. And with the version numbers displayed it is more actionable than without.

Hello @Bob,

I modified a bit your code and submit a merge request, we will see if it gets accepted :wink: Add version number to incompatible version message in sao (!1304) · Merge requests · Tryton / Tryton · GitLab

Andréas