Updating an extension

It has been a LONG time since I worked with extensions. I have made changes to my extension SwissSkullStripper. I have tested it with my local Slicer build. Now I would like to replace the old version.

When I
make ExperimentalUpload

I get the error:

Call Stack (most recent call first):
  /home/lorensen/ProjectsGIT/Slicer/Extensions/CMake/SlicerExtensionPackageAndUploadTarget.cmake:260 (midas_api_upload_extension)


CMake Error at /home/lorensen/ProjectsGIT/Slicer/Extensions/CMake/SlicerExtensionPackageAndUploadTarget.cmake:288 (message):
  Upload of
  [73236f9-linux-amd64-SwissSkullStripper-git307bf86-2017-04-21.tar.gz]
  failed !

  Check that:

  (1) you have been granted permission to upload

  (2) your email and api key are correct


 Size of output: 8K
Command exited with the value: 0
MakeCommand:/usr/bin/cmake --build . --config "Release" --target "packageupload" -- -i
Error(s) when building project
   1 Compiler errors
   2 Compiler warnings
SetCTestConfiguration:BuildDirectory:/home/lorensen/ProjectsGIT/SwissSkullStripperExtension/build
SetCTestConfiguration:SourceDirectory:/home/lorensen/ProjectsGIT/SwissSkullStripperExtension/build
SetCTestConfiguration:ProjectName:SwissSkullStripper
SetCTestConfiguration:DropMethod:http
SetCTestConfiguration:DropSite:
SetCTestConfiguration:DropLocation:/submit.php?project=Slicer4
SetCTestConfiguration:IsCDash:TRUE
Submit files (using http)
   Send to track: Extensions-Experimental
   Using HTTP submit method
   Drop site:http:///submit.php?project=Slicer4
   Upload file: /home/lorensen/ProjectsGIT/SwissSkullStripperExtension/build/Testing/20170421-1823/Build.xml to http:///submit.php?project=Slicer4&FileName=___73236f9-SwissSkullStripper-git307bf86-g%2B%2B-64bits-Qt4.8-Release___20170421-1823-Extensions-Experimental___XML___Build.xml&MD5=e6d1eb2838f4ac2a0e8f2037732b710f Size: 3890
   Error when uploading file: /home/lorensen/ProjectsGIT/SwissSkullStripperExtension/build/Testing/20170421-1823/Build.xml
   Error message was: Empty reply from server
   Problems when submitting via HTTP
Uploading package URL for extension SwissSkullStripper ...
make[3]: *** [CMakeFiles/ExperimentalUpload] Error 255
make[2]: *** [CMakeFiles/ExperimentalUpload.dir/all] Error 2
make[1]: *** [CMakeFiles/ExperimentalUpload.dir/rule] Error 2
make: *** [ExperimentalUpload] Error 2
[build(master)]

You can test extension packaging and install locally: Build a package and install it in the Extension manager (click the small “wrench” icon in the top-right corner). If all works well then push the updated version and update the git hash in the ExtensionsIndex repository.

The ExperimentalUpload target is only for testing if the extension upload mechanism works correctly. As this mechanism is quite robust (I don’t remember the factory machines having any problem with uploading), you don’t need to test it. If you would like to test it anyway then you need to get an API key and pass it to CMake when you configure the extension (see details here: https://www.slicer.org/wiki/Documentation/Nightly/Developers/Tutorials/BuildTestPackageDistributeExtensions).

I have an old API key. Should that still work.

I think they have an expiry date. You can probably check it in Midas if it is still active.

Yes, it had expired…
I deleted the old one, the the “Generate new API key” does nothing…

I see, it wanted an Application Name.

I still get the same error on the ExperimentalUpload. BTW, the documentaion mentions the target ExperimentalUploadOnly, but that target does not exist.

Make sure application name is Default

Good catch. We need to update the documentation. That target has been removed.

See http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=24289

You could instead do

make uploadpackage

I will fix the corresponding documentation: https://www.slicer.org/wiki/Documentation/Nightly/Developers/FAQ/Extensions#What_are_the_extension_specific_targets:ExperimentalUpload.2C_ExperimentalUploadOnly.2C…_.3F

@Lorensen I updated the developer documentation. Would appreciate if could let me know if there are other currences.