Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot update from GitLab CI #11

Closed
probonopd opened this issue Jun 10, 2018 · 7 comments
Closed

Cannot update from GitLab CI #11

probonopd opened this issue Jun 10, 2018 · 7 comments

Comments

@probonopd
Copy link
Contributor

wget -c "https://github.com/antony-jr/AppImageUpdater/releases/download/continuous/AppImageUpdater-bcdadb8-x86_64.AppImage"
chmod +x AppImageUpdater-bcdadb8-x86_64.AppImage

# Get "old" AppImage
wget -c "https://gitlab.com/probono/QtQuickApp/-/jobs/73879740/artifacts/raw/QtQuickApp-x86_64.AppImage"

# Try to update it
./AppImageUpdater-bcdadb8-x86_64.AppImage ./QtQuickApp-x86_64.AppImage 
No protocol specified
QAIUpdateInformation::  "zsync|https://gitlab.com/probono/QtQuickApp/-/jobs/artifacts/master/raw/QtQuickApp-x86_64.AppImage.zsync?job=trusty"
AIUpdaterBridge:: zsyncURL :: QUrl("https://gitlab.com/probono/QtQuickApp/-/jobs/artifacts/master/raw/QtQuickApp-x86_64.AppImage.zsync?job=trusty")  ::  "./QtQuickApp-x86_64.AppImage"
AIUpdaterBridge::GOT:: zsync headers :: success!
AIUpdaterBridge:: your version of appimage is older::  "769ad296e9c0624e6e62583fede4c3e7e36b7494"
AIUpdaterBridge:: redirected url ::  QUrl("https://gitlab.com/probono/QtQuickApp/-/jobs/artifacts/master/raw/?job=trustyQtQuickApp-x86_64.AppImage")
QNetworkReplyImplPrivate::error: Internal problem, this method must only be called once.
AIUpdaterBridge:: new updates available ::  "3cf0c53ba08c31310cb0665cf4e7eb7243f86cc3"
AIUpdaterBridge:: got everything :: Updating
EOF from serverOther error? -1
AIUpdaterBridge:: zsync recieve failed :: "./QtQuickApp-x86_64.AppImage"

AIUpdaterBridge:: redirected url : is wrong.

@probonopd
Copy link
Contributor Author

Similar issue: AppImageCommunity/AppImageUpdate#94

@probonopd
Copy link
Contributor Author

Ping @antony-jr this is very important for us. Would be great if you could look into it. Thanks!

@antony-jr
Copy link
Owner

@probonopd I'm currently solving the problem at its root(the library).

@antony-jr
Copy link
Owner

antony-jr commented Aug 9, 2018

CC: @probonopd

AppImageUpdaterBridge can now use Gitlab as a generic zsync transport method , But the new code is still in the experimental stage but working good so far , Things that are staged in experimental will be available in a week or so after rigorous testing and refactoring. I'm also planning to make this a plugin.

These are the new features which will be available after the experimental code is merged with master,

  • Completely rewritten in C++(no legacy but still uses the old hash table so some code is inherited , The hash table is used purely because of the performance , there are future plans to change this completely).
  • Non-Blocking Single Threaded API , Everything is cyclic and does not even need mutex.
    ( Optionally the user can use a separate thread for the controllers if he/she wishes ).
  • Synced with the Qt Event Loop , i.e non-blocking single threaded API.
  • PIMPL (Pointer to IMPLementation)
  • Easy to use API.
  • Fixed Memory leaks.

EDIT: using zsync algorithm in parallel seems to be a overkill , The amount of resource needed to make it parallel is more and thus consumes more time. Therefore after a lot of trails , I decided that using the zsync algorithm in a single thread is always the fastest and reduces a lot of resource and complications. And also both multi-threaded and single thread versions run in same time.(This is due to the overuse of resource.)

@antony-jr
Copy link
Owner

Just found out that Gitlab cannot support range requests , Thus even if we can check for updates, Its not possible to do the update , https://gitlab.com/gitlab-com/support-forum/issues/3655 (Hope they fix this soon).

@probonopd
Copy link
Contributor Author

Thanks @antony-jr. In this case, we could check whether a sever supports range requests and if it does not, download the whole thing.

@antony-jr
Copy link
Owner

antony-jr commented Aug 23, 2018

@probonopd The library is fully rewritten in C++ and working great , To test out the new library , You can use an example program.

 $ git clone https://github.com/antony-jr/AppImageUpdaterBridge
 $ cd AppImageUpdaterBridge
 $ cd examples/SimpleUpdate
 $ mkdir build
 $ cd build
 $ qmake "CONFIG+=LOGGING_DISABLED" .. # Assuming you have qt installed
 $ make -j$(nproc) 
 $ wget -c "https://gitlab.com/probono/QtQuickApp/-/jobs/73879740/artifacts/raw/QtQuickApp-x86_64.AppImage"
 $ ./SimpleUpdate QtQuickApp-x86_64.AppImage
 $ # Test Out.

I will soon fix this program , Since the hardest work is done , All I have to do is connect some slots and change the UI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants