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

Force SDK 1.6.4. to save datastore on exit. #25

Closed
wants to merge 33 commits into from

Conversation

dragonx
Copy link

@dragonx dragonx commented Apr 8, 2012

There's a couple of reports of various manage.py actions other than 'runserver' failing to save the datastore to disk. This change works around that and forces a flush on exit.

@dragonx
Copy link
Author

dragonx commented Apr 9, 2012

Actually, don't pull this. It works on dev_appserver, but not when deployed.

@jacobg
Copy link
Contributor

jacobg commented May 2, 2012

Is this fork tested and ready to pull?

@dragonx
Copy link
Author

dragonx commented May 2, 2012

It was, on 1.6.4, but I haven't tested on 1.6.5 yet. I think it's actually unnecessary on 1.6.5 since I believe they've fixed this issue in the SDK.

@jacobg
Copy link
Contributor

jacobg commented May 2, 2012

I'm using 1.6.5, and have this issue without the fix you provided.

On Wed, May 2, 2012 at 10:33 AM, dragonx <
reply@reply.github.com

wrote:

It was, on 1.6.4, but I haven't tested on 1.6.5 yet. I think it's
actually unnecessary on 1.6.5 since I believe they've fixed this issue in
the SDK.


Reply to this email directly or view it on GitHub:

#25 (comment)

@dragonx
Copy link
Author

dragonx commented May 2, 2012

Then I'm rather disappointed at the boys at Google. I'm pretty sure this fork is safe to pull at this point.

…el/djangoappengine.git into feature/ancestor-query
@dragonx
Copy link
Author

dragonx commented May 19, 2012

I just tested on 1.6.5 on Linux, on a bad configuration where I'm using the python 2.5 runtime, but actually running python 2.7 locally.

The problem is fixed with the SDK, so this change is now unnecessary - at least with "python manage.py shell".
jacobg, since your still seeing problems, can you give a little bit more detail about your test case/config.

User added 2 commits May 19, 2012 21:43
…ncy_probability in the testcase.

The given consistency_probability will be used to configure the datastore.  Otherwise, it's the same as django.test.TestCase.
@dragonx dragonx closed this May 20, 2012
@jacobg
Copy link
Contributor

jacobg commented May 23, 2012

Hi dragonx - Sorry for the delayed response. I am still having this issue,
and just upgraded to SDK 1.6.6. For me, the problem is actually
specifically using runserver. I call runserver using Aptana Studio UI,
create a datastore entity, and then stop the process. When I call runserver
again, the entity is not there.

With the boot.py change, the entity persists across subsequent instances of
runserver. However, each time I shut down runserver, Aptana displays an
error windows which says: Terminate Failed

Any ideas?

On Sat, May 19, 2012 at 1:14 PM, dragonx <
reply@reply.github.com

wrote:

I just tested on 1.6.5 on Linux, on a bad configuration where I'm using
the python 2.5 runtime, but actually running python 2.7 locally.

The problem is fixed with the SDK, so this change is now unnecessary - at
least with "python manage.py shell".
jacobg, since your still seeing problems, can you give a little bit more
detail about your test case/config.


Reply to this email directly or view it on GitHub:

#25 (comment)

@dragonx
Copy link
Author

dragonx commented May 23, 2012

jacobg, I'd report this to Google, they probably think the issue is fixed. 1.6.4 changed the dev_appserver datastore so that it was saved to disk on exit, and they only handled a few exit cases. They handled more exit cases in 1.6.5, so it seems like my situation is fixed (I run from the command prompt on Linux). I know that my patch didn't work for some users of eclipse in Windows - I haven't followed up on whether that's been fixed.

The Terminate Failed message is a pretty big hint that dev_appserver is not happy with the way Aptana is shutting things down. Feel free to keep using the patch, but I think it's better if Google fixes it in their SDK.

…branch.

This means removing all the ancestor keys related changes, but this branch now passes all djangoappengine and djangotoolbox tests.
@dragonx dragonx reopened this May 26, 2012
@dragonx
Copy link
Author

dragonx commented May 26, 2012

Two comments:

jacobg, I've realized I'm seeing the same issue as you, when running runserver from the command prompt and killing it with Ctrl-C. That used to work even with 1.6.4, but it's broken for me now with 1.6.5. "python manage.py shell" works with 1.6.5 though. Can you verify that you're also seeing the issue from the command prompt? Also, what platform are you running on?

Second, I've polluted this pull request with other commits in my branch. I don't know how to modify the pull request to limit it to a few checkins, so I'll probably launch a new pull request once I've figured this out.

@dragonx dragonx closed this May 26, 2012
@dragonx dragonx mentioned this pull request May 26, 2012
@jacobg
Copy link
Contributor

jacobg commented May 31, 2012

dragonx: It seems that the problem is just with runserver in Aptana on OS
X. I presume the stop button in Aptana is the equivalent of Ctrl-C. It
looks like command line including shell works fine. Incidentally, it seems
that 1.6.5 dev server sdk is much slower compiling code changes.

On Sat, May 26, 2012 at 11:32 AM, dragonx <
reply@reply.github.com

wrote:

Two comments:

jacobg, I've realized I'm seeing the same issue as you, when running
runserver from the command prompt and killing it with Ctrl-C. That used to
work even with 1.6.4, but it's broken for me now with 1.6.5. "python
manage.py shell" works with 1.6.5 though. Can you verify that you're also
seeing the issue from the command prompt? Also, what platform are you
running on?

Second, I've polluted this pull request with other commits in my branch.
I don't know how to modify the pull request to limit it to a few checkins,
so I'll probably launch a new pull request once I've figured this out.


Reply to this email directly or view it on GitHub:

#25 (comment)

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

Successfully merging this pull request may close these issues.

3 participants