-
Notifications
You must be signed in to change notification settings - Fork 53
feat(*): update django from 1.7 to 1.8 #101
Conversation
d3e8c7e to
c56b418
Compare
|
Depends on #208 |
b8d44a9 to
e19e297
Compare
|
Image: quay.io/jhansen/workflow:git-10a633f Registration works just fine: Looks like |
|
Ah hmm I will look at that - this PR updates rest framework and I did have to change tests because of return format but given I couldn't track it down to django or drf then I thought it was the test client in django. Hopefully it is just a configuration or else we need to fix up the client to understand the diff output - mind you the new format feels saner as it doesn't nest results and result count in the struct |
|
Looks like the update dropped the pagination/count/next/results response: From a working request: |
|
Yeah I have been looking at It looks like they added header based pagination and made that default (tho I haven't found the exact point when that happened). Two options:
We could do both options, option 1 now and option 2 as a separate piece of work. Depends if we want that kind of APIs on Deis going forward? Up to you @slack |
|
I moved to using the old style (not pushed yet) and reverted the tests to their original form but it seems that there are some internal pagination API changes that we are using that only break while using the old format. I'll do more digging and see if I can figure that one out, be it today or Monday. |
|
I found a fix, it was related to how the pagination serializer fetching works. This should work with the current version of the |
|
For now, we should maintain api compat with the client (which is why I wish we hadn't bumped to Longer term, as we start folding in more stuff we can talk about standardizing on something like JSONAPI for the long haul (and another major api rev). |
rootfs/api/tests/test_hooks.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the newline is intentional IIRC. We had issues with parsing out the Dockerfile with a blank newline character with no text
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was the only way to get the tests passing. I can try removing it again and see if there is a different issue somewhere
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AssertionError: u'FROM busybox\n CMD /bin/true' != u'\n FROM busybox\n CMD /bin/true'
+
- FROM busybox
+ FROM busybox
? ++++++++
CMD /bin/true
Shrug - I don't see what would have changed to affect that. @bacongobbler are you sure this test was to test that particular issue you mentioned?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my guess would be the tab is missing from the old one, but if I'm reading the tests right, moving FROM busybox to after """ should make the tests pass:
"""FROM busybox
CMD /bin/true
"""
looks like some odd formatting hack in the build hook, but that should stop the bleeding.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That'd be the same as:
DOCKERFILE = """\
FROM busybox
CMD /bin/true"""
But that one does look weird, hah. I changed the PR for now and kept that spacing there as it doesn't hurt.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
honestly I don't even think we use this information any more so it's all good :)
|
Tested, looks good: workflow [helgi-django_1.8]$ deis2 register http://deis.chorizo.k8s.slack.io
username: jhansen
password:
password (confirm):
email: jhansen@deis.com
Registered jhansen
Logged in as jhansen
workflow [helgi-django_1.8]$ deis2 keys:add ~/.ssh/id_subgenius.pub
Uploading id_subgenius.pub to deis... done
example-go [master]$ g remote rm deis
example-go [master]$ deis2 create
Creating Application... done, created scenic-villager
Git remote deis added
remote available at ssh://git@deis.chorizo.k8s.slack.io:2222/scenic-villager.git
The authenticity of host '[deis.chorizo.k8s.slack.io]:2222 ([52.35.172.246]:2222)' can't be established.
RSA key fingerprint is bd:a3:40:59:5e:5f:10:fe:4f:ef:a0:47:79:48:68:eb.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '[deis.chorizo.k8s.slack.io]:2222,[52.35.172.246]:2222' (RSA) to the list of known hosts.
Counting objects: 87, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (82/82), done.
Writing objects: 100% (87/87), 18.08 KiB | 0 bytes/s, done.
Total 87 (delta 40), reused 0 (delta 0)
-----> Starting build
-----> Go app detected
-----> Checking Godeps/Godeps.json file.
-----> Installing go1.4.2... done
-----> Running: godep go install -tags heroku ./...
-----> Discovering process types
Procfile declares types -> web
-----> Compiled slug size is 1.7M
-----> Build complete.
-----> Launching app.
-----> Launching...
done, scenic-villager:v2 deployed to Deis
http://scenic-villager.localhost
To learn more, use `deis help` or visit http://deis.io
To ssh://git@deis.chorizo.k8s.slack.io:2222/scenic-villager.git
* [new branch] master -> master
example-go [master]$ curl http://scenic-villager.chorizo.k8s.slack.io
Party-time by Deis
Release v2 on scenic-villager-v2-web-30o70
example-go [master]$
example-go [master]$ deis2 scale web=5
Scaling processes... but first, coffee!
done in 4s
=== scenic-villager Processes
--- web:
web.1 up (v2)
web.2 up (v2)
web.3 up (v2)
web.4 up (v2)
web.5 up (v2)
example-go [master]$ deis2 ps
=== scenic-villager Processes
--- web:
web.1 up (v2)
web.2 up (v2)
web.3 up (v2)
web.4 up (v2)
web.5 up (v2) |
|
Would like @mboersma to take a pass at this |
feat(*): update django from 1.7 to 1.8
https://docs.djangoproject.com/en/1.8/releases/1.8/
Notable changes:
UUIDField- The oddity with this one is the returned value is aUUIDobject so it need to be based to string if anysubstringor similar operation is performedOrderedDictstraight up withoutresultsorcounton the top levelNote:
django_auth_ldapis disabled since it causes a migration issues I haven't been able to debug