Application does not update after deployment to App Engine

I just started with GAE, and I already ran into problems along the way. When I deploy the application, it does not seem to update it, and when I launch it in the browser, it still launches the old version.

My simple code is:

import java.io.IOException; import javax.servlet.http.*; @SuppressWarnings("serial") public class AppEngineProjectServlet extends HttpServlet { public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException { resp.setContentType("text/html"); resp.getWriter().println("<p>Hi there</p>"); } 

}

I created a new web application project in Eclipse and I got this code. I just changed the text from Hello World to Hello, and when I deploy it, it still starts Hello World!

I am also trying to change application versions when deploying and installing a new default version, but nothing works for me. Is there any specific reason why this is happening that I could miss?

+6
source share
3 answers

After a lengthy conversation, the problem of OP was resolved.

Basic moments:

  1. Always test your application locally (using the development server ) before embarking on a cloud
  2. Watch for browser caching issues (use Ctrl+F5 to update and reset the local cache)
  3. If you want to reduce the risk of product hacking, change the version of the application before embarking on a cloud
  4. After deployment, check the application administrative console on GAE
    1. In the Administration β†’ Administrator Logs section, check for new entries, such as "Deployed new version",
    2. In the " General" β†’ "Versions" section, be sure to visit the recent deployed version of the Live URI [version]. [App-name] .appspot.com ).
    3. Again, make sure browser caching doesn't interfere ( Ctrl+F5 is your friend)
  5. Also, to avoid runtime exceptions, if you updated your persistent storage level in such a way that new indexes should be built, check the data β†’ Datastore indexes to make sure that no index is still building (this may take several hours or even days ).
  6. When you are done testing (make sure that the version of Live URI is working properly), just create a new version by default (in the Main β†’ Versions section).
  7. It is advisable to perform some A / B tests. GAE has built-in traffic separation support. Do not jump from a gun and do not advertise the new version before you feel 100% certain that it works as expected (in fact, 200%). Although you can always change the default version to the previous one, your users will not be happy if you refuse (believe me ... I was there, I did it).
+5
source

If you want to see your changes immediately after downloading, change the application version and then change the default value in the admin console.

When upgrading, App Engine does not immediately track and restart all your instances. Such a thing would be traumatic for users of large applications with many instances, especially when these applications start up slowly.

+4
source

The same thing happened to me with the new Eclipse 2018-09 and the new Google cloud platform, which replaced the super GDT Pulldown, which worked well for so many years.

This is not about updating the browser and the materials of the Google super-server - this is a date mismatch between the local computer and the server, because GCP tells you that it worked:

  • after I deleted the class directory, he gave me a warning that there are no classes there !!!!! no auto build like previous gooogle tools
  • then, after my manual recovery, he stated the following

# = Upload 0 files to Google Cloud Storage = #

Download ZERO!

No matter what you change in java programs, if it decided that the file already exists, there is no data transfer

So I started doing workarounds

  • change the version of the application (because it even finds the deleted versions :-) and still transfers the null files :-) to the remote version, which is activated with the old files :-) after the zero transfer is filed)
    • manually updating some javascript from smartgwt, which it does not recommend, like other old packages did (it is super difficult to change the manual obfuscated java from smartgwt)
    • Welcome to the progress and updates :-(
0
source

Source: https://habr.com/ru/post/1261824/


All Articles