How to find out the url for the latest version of Web GUI and/or check for update?

Duplicacy web checks and tries to download a new version of duplciacy cli on start.

I want the same behavior for saspus/duplicay-web:mini container with respect to duplicacy_web itself: for it to check for and download new version of Duplicacy_web when container starts.

Is there a ready made URL that would always resolve to most recent binary and version? Any other way for me to quickly figure out if there is newer version (and either version number to construct download URL or request download URL itself); any web api I should use?

1 Like

The web GUI checks this url: https://api.github.com/repos/gilbertchen/duplicacy/releases/latest

By default the GUI will always download the version pointed to by this url, but if on the Setting page the stable CLI version is checked then it will download the latest version only if it was released more than 30 days ago.

Right. My question was is there a similar url for duplicacy_web itself?

Sorry I didn’t read your question correctly. No currently there is no such a url but I can create one quickly.

Please! This would be awesome!

Here you go:

$curl https://duplicacy.com/latest_web_version
{"release_time":"20200823","version":"1.4.1"}
1 Like

Thank you very much for such a quick turnaround! Even with a timestamp – perfect!

With that I can actually add the same logic to the container for updating web_version you have now for the cli.

This is what I’m planning to do for saspus/duplicacy-web:mini:

  • DUPLICACY_WEB_VERSION=1.1.1: On container start get version 1.1.1 if not already downloaded and use it. Existing behavior.
  • DUPLICACY_WEB_VERSION=Latest – fetch latest version string from that url; If successful but the binary of that version is not already downloaded – download and use it
  • DUPLICACY_WEB_VERSION=Stable – same as above but only download if release date 30+ days in the past OR there is no other local version present.

This seems to align with the behavior of duplicaty_web with respect to cli, except for the case when there is no existing executable.

Which CLI binary would Web download if Stable is checked but there is no local binary yet?

If there is no local binary, the latest one will be downloaded regardless of the latest/stable setting.

1 Like

I was thinking about this behavior and it is neither reliable nor deterministic; this implies “stable version is the one released >30 days go and not yet superseded” which is not accurate. This creates holes if user happens to check at the wrong cadence or time and as a result they may end up never updating.

example:

  • version 5.0 released on Jan 1
  • User restarted Duplicacy on Feb 10; it picked up version 5.0
  • version 5.1 released on March 1
  • version 5.2 released on July 1
  • User restarted duplicacy on June4. And stayed on version 5.0 because thats’ what they have and 5.2 is not stable. They should have received 5.1 instead.

Hence, I think the stable/not stable shall not be decided on the client but on the sever: there should be punished version number that is deemed stable and version number that is bleeding edge.

Do you think this is reasonable / possible to do / planned on?

You’re absolutely right. We already have an API https://duplicacy.com/latest_web_version so why don’t we let it return both the latest version and the stable version.

The same should apply to the web GUI getting the CLI version. I’ll add a new API https://duplicacy.com/latest_cli_version to be used by the web GUI.

2 Likes

Perfect! I’ll throw away most of the code I wrote tonight to workaround this behavior in the container glue scripts :slight_smile: and will expect that separate versions will be returned from that api for stable and latest channels.

Sorry for wasting your time. This is the new API:

$curl https://duplicacy.com/latest_web_version
{"latest":"1.4.1","stable":"1.4.1"}

Do you still want the release times?

No worries, it’s better to do it right than maintain half-baked solution :slight_smile:

No, I guess times are no longer needed.

Thank you!

If anyone wants to test: saspus/duplicacy-web:mini-test (both ARM and x64 images are there)

The DUPLICACY_WEB_VERSION environment variable can be one of these three things:

  • x.x.x, like 1.4.1, to lock onto specific version. Restarting the container will effectively only update duplicacy_cli, unless that one is also locked in Duplicacy_web preferences.
  • Latest to track latest available version
  • Stable to track known stable version

Once on the Latest or Stable channel to update – restart the container.

docker run  --name duplicacy-web                                        \
        --hostname duplicacy-web-hostname                               \
         --publish 3875:3875/tcp                                        \
             --env DUPLICACY_WEB_VERSION="Stable"                       \
             --env USR_ID=$(id -u)                                      \
             --env GRP_ID=$(id -g)                                      \
             --env TZ="America/Los_Angeles"                             \
          --volume ~/Library/Duplicacy-web:/config                      \
          --volume ~/Library/Logs/Duplicacy-web:/logs                   \
          --volume ~/Library/Caches/Duplicacy-web:/cache                \
          --volume ~:/data:ro                                           \
          --cpus="0.1"                                                  \
          saspus/duplicacy-web:mini-test

I’ll test it for a while and eventually remove -test suffix.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.