1. 25 Feb, 2012 2 commits
  2. 23 Feb, 2012 1 commit
    • Sharon Perl's avatar
      This change includes: · c4cf5f41
      Sharon Perl authored
      - Try to get more info on BlobWriteException and BlobReadException. I'm
      not actually sure whether I've achieved that because I haven't been able
      to cause the blob errors to happen in my server. I'm hoping that keeping
      the underlying exception as part of the Blob exceptions will cause more
      info to get printed.
      
      - Make blob delete exceptions not be fatal, but log them as errors so
      that we know if they're happening.
      
      - Slip in a fix for uploading projects where we ignore an
      android.keystore file in the project zip if it has one. This  makes it
      easier to upload projects that are downloaded with the admin
      functionality to download arbitrary user projects.
      c4cf5f41
  3. 22 Feb, 2012 3 commits
  4. 21 Feb, 2012 1 commit
    • Sharon Perl's avatar
      This change list includes several fixes to help us either avoid or better · 68cddb84
      Sharon Perl authored
      diagnose intermittent server errors related to blobs. It also updates
      the App Engine libraries to 1.6.2.1 (which may also help with the
      errors but we're not sure about that---it seems like a good idea in
      any case). In particular:
      
      - Make sure *all* blob key lookups happen outside of transactions. A previous
      fix did not handle the blob reads in ObjectifyStorageIo.exportProjectSourceZip.
      
      - Log an error if we get a RuntimeException while trying to export source zip.
      Hopefully we won't be getting these as much, or at all, once the blob read is
      not causing it.
      
      - Use the Blobstore API to read bytes instead of going through FileService and
      Channels. I'm hoping this will get rid of some of the timeouts.
      
      - Update the App Engine libraries to 1.6.2.1. We know that there were bug fixes
      in the latest version and we were on a really old version (1.5.3) so it seems
      like a good idea to update, in case that is contributing to any of our problems.
      68cddb84
  5. 16 Feb, 2012 1 commit
    • Sharon Perl's avatar
      This change addresses issues 86 · 7ed5df5e
      Sharon Perl authored
      (https://code.google.com/p/app-inventor/issues/detail?id=86) about setting the
      file name for blobs and 91
      (https://code.google.com/p/app-inventor/issues/detail?id=91) about deleting
      orphaned blobs when we delete a project or fail during project creation.
      
      When we have blobs that we know we won't need (e.g., a project
      creation that needs to be retried or a project that is deleted) we
      need to collect up the blob keys and then delete the blobs outside of
      any transaction that is running on the datastore. It seems that there
      is no way to use the blobstore file API without having it default to
      using the existing transactions, and that leads to errors about
      transactions on multiple entity groups.
      
      As part of this change I also set the name of a created blob to
      include its project id and file name. We don't use the blob name in
      the code, but it does help when browsing the datastore and blobstore
      from the admin console.
      7ed5df5e
  6. 15 Feb, 2012 1 commit
  7. 13 Feb, 2012 1 commit
  8. 11 Feb, 2012 1 commit
  9. 09 Feb, 2012 1 commit
  10. 08 Feb, 2012 3 commits
    • Liz Looney's avatar
      b5a4544e
    • Liz Looney's avatar
      Solved issue 77: Investigate why we might get KeyNotFound exceptions in · 9b03a961
      Liz Looney authored
      the server
      Fixed issue 96: Code should not continue after failing to decrypt
      user/project id
      
      In Security.java, changed decryptUserId and decryptProjectId to throw
      EncryptionException instead of ignoring it and returning bogus values.
      Updated ReceiveBuildServlet and SecurityTest.
      
      In JavaWebStart.java:
      Added inner class DecryptedIds.
      Modified getWebStartProjectPath to use the mercurial build version as a
      prefix.
      Added method decryptWebStartProjectPath that decrypts a project path and
      checks whether the version included in the project path matches the
      current Mercurial build version.
      
      In WebStartFileServlet doGet and doPost, if it catches
      EncryptionException while decrypting the project path, reply with SC_GONE.
      In doPost (not doGet where we have to return the requested file's
      contents), if the post succeeds, but the version from the project path
      does not match the current Mercurial build version, reply with
      SC_CONFLICT.
      
      In YaCodeblocksController, for all cases where a request is sent to the
      appengine server, check the response code. If it's either HTTP_GONE and
      HTTP_CONFLICT, show a message to the user that says that the app engine
      server has been updated and they need to refresh the designer and restart
      the blocks editor. Updated YaHttpServerMainTest.
      
      In YaHttpServerMain, if downloading the phone app failed, warn the user
      that this error can occur if they've tried to start the blocks editor with
      a previously downloaded .jnlp file.
      
      In FeedbackReporter.showErrorMessageWithExit, removed the trailing " + "
      at the end of the message.
      
      Updated the appengine build so that it doesn't rebuild AiSharedLib if it
      is already up-to-date.
      9b03a961
    • andrew.f.mckinney's avatar
      Added more logging and vars to monitor · 47a5bd19
      andrew.f.mckinney authored
      47a5bd19
  11. 07 Feb, 2012 1 commit
    • Sharon Perl's avatar
      Add ability for an admin to download other users' projects given the · c6962d26
      Sharon Perl authored
      userid or email address and projectid or project name.
      
      Notes:
      
      - I added the Admin pulldown menu in the My Projects page. It only
      appears when the logged-in user has admin privileges (which I
      tested!). I suppose we could have put it on the Debugging page, but it
      seemed to fit nicely with the other download source options.
      
      - If either the user or project can't be found this fails without any
        indication (other than not downloading anything) since the download
        is asynchronous and we don't currently have an easy way to report
        the failure in the UI. There will be an error message in the server
        log, though. Since this functionality is only for admins, I figure
        this is okay for now.
      c6962d26
  12. 01 Feb, 2012 1 commit
  13. 31 Jan, 2012 1 commit
  14. 30 Jan, 2012 1 commit
  15. 27 Jan, 2012 1 commit
    • Sharon Perl's avatar
      Log better error messages when we get exceptions from Blobstore. Previously we · 08860d92
      Sharon Perl authored
      were erroneously converting too many to FileNotFound, which was confusing. Also,
      changes a couple of places where blob writes were non-fatal to make them fatal.
      
      Log better error messages when we get exceptions from Blobstore. Previously we
      were erroneously converting too many to FileNotFound, which was confusing. Also,
      changes a couple of places where blob writes were non-fatal to make them fatal.
      08860d92
  16. 26 Jan, 2012 1 commit
  17. 24 Jan, 2012 1 commit
  18. 19 Jan, 2012 2 commits
  19. 18 Jan, 2012 1 commit
  20. 17 Jan, 2012 2 commits
    • Liz Looney's avatar
      Fixed dependency checking for ant builds. · 287fa772
      Liz Looney authored
      components/build.xml
      Improved the dependency checking for the ai.apt task. This solves the problem
      where changing a Java file in the annotations, common, or scripts package, or
      changing a .txt file in scripts/templates did not cause the annotation
      processor targets to be re-built.
      
      build-common.xml:
      Improved the dependency checking for the ai.javac task. This solves the problem
      where changing a "public static final" variable in one Java file did not cause
      another Java file that uses the variable to be recompiled.
      Changed the ai.javac presetdef to a macrodef so it can run a <depend> task
      before the <javac> task.
      
      appengine/build.xml:
      In the AiServerLib ai.javac task, exclude AiServerLib.jar from the classpath
      to prevent the dependency checking from thinking that the code always needs to
      be recompiled.
      
      buildserver/build.xml:
      In the BuildServer ai.javac task, exclude BuildServer.jar from the classpath
      to prevent the dependency checking from thinking that the code always needs to
      be recompiled.
      
      JSONUtilTest.java:
      Encoded all non-ascii characters as \uXXXX so that this file can be compiled
      with javac option encoding=utf-8.
      287fa772
    • markf@google.com's avatar
      Removing an unwanted name · 84e7176e
      markf@google.com authored
      84e7176e
  21. 13 Jan, 2012 3 commits
  22. 12 Jan, 2012 3 commits
    • Liz Looney's avatar
    • Liz Looney's avatar
      Added YailGeneratorTest · c5334a45
      Liz Looney authored
      c5334a45
    • Liz Looney's avatar
      Modified the build server so that the number of simultaneous builds is limited. · 09180ca9
      Liz Looney authored
      The default limit is 10, but this can be overridden with the command line
      option --maxSimultaneousBuilds. When the build server is at maximum capacity,
      it will respond immediately to any additional build-all-from-zip-async requests
      with response code 503 (service unavailable). According to rfc2616, section 10,
      503 means "The server is currently unable to handle the request due to a
      temporary overloading or maintenance of the server. The implication is that
      this is a temporary condition which will be alleviated after some delay."
      
      Added NonQueuingExecutor.java and NonQueuingExecutorTest.java
      
      Modified YoungAndroidProjectService (appengine server code) so that if the
      response code for a build-all-from-zip-async request is not 200 (OK), it will
      include the response code in the RpcResult that it sends back to the client
      code.
      
      Modified BuildCommand (appengine client code) so that if the RpcResult from the
      server contains the response code 503, it shows the message "The build server
      is currently busy. Please try again in a few minutes." in yellow at the top of
      the page.
      
      Modified WaitForBuildResultCommand (appengine client code) so that it doesn't
      print a different date/time each time it updates the debugger messages.
      
      Other changes to BuildServer.java:
      The command line options are now processed in the main method.
      Added --maxSimultaneousBuilds command line option.
      Added support for two new requests: buildserver/health and buildserver/vars.
      buildserver/health simply returns "ok" if the build server is alive.
      buildserver/vars returns a list of helpful values related to runtime, OS,
      memory, build requests, and build tasks.
      09180ca9
  23. 11 Jan, 2012 2 commits
  24. 10 Jan, 2012 3 commits
  25. 09 Jan, 2012 1 commit
    • Liz Looney's avatar
      Fixed issues 60 (memory leak) and 67 (infinite rpc calls on build failure) · cf24cfb0
      Liz Looney authored
      build.xml
      Added YailGenerator target to appinventor/buildserver/build.xml.
      In BuildServer target, added task to copy YailGenerate.jar to the build/classes/files
      directory so it can be loaded as a resource at runtime.
      In CopyToRunLibDir, removed fileset entry that copied OpenBlocks.jar to the
      build/run/lib directory. The buildserver no longer needs it there.
      
      BuildServer.java:
      Fixed problems where temp files were not being deleted.
      Fixed problem in buildAllFromZipFileAsync where the FileInputStream for the
      outputZip was never closed.
      Added code to print out the amount of memory being used after each build.
      
      ProjectBuilder.java:
      Launch the YailGenerator as a separate process. The YailGenerator has a memory
      leak and by launching it as a separate process, the buildserver process doesn't
      leak memory. Added static inner class YailGenerationException.java.
      
      Result.java:
      Added constant int GENERAL_FAILURE with value 1 and use it instead of ~SUCCESS.
      This matches what the appengine client code (in WaitForBuildResultCommand.java)
      expects for a general build failure value.
      
      YailGenerator.java:
      Moved YailGenerator.java from
      appinventor/buildserver/src/com/google/appinventor/buildserver to
      appinventor/buildserver/src/com/google/appinventor/yailgenerator.
      Updated package statement.
      
      YailGenerationException.java:
      Removed unneeded formName field, getFormName method, and constructor with
      formName argument from the blockslib exception class YailGenerationException.
      (appinventor/blockslib/src/openblocks/yacodeblocks/YailGenerationException.java)
      cf24cfb0
  26. 04 Jan, 2012 1 commit