Jenkins resources

107 views
Skip to first unread message

Matt Cooper

unread,
Jul 11, 2018, 6:09:19 PM7/11/18
to Django developers (Contributions to Django itself)
Hi Django devs. I've looked all over for the tools that power djangoci.com, but I don't see them. Are the Jenkins configuration, scripts, and resources available someplace?

Full disclosure, I'm on the Visual Studio Team Services group at Microsoft. We're making sure that our CI system is as good a home for Python (and PHP, and Ruby, and ...) projects as any system out there. One of the research activities I'm doing is trying to get a CI pipeline set up for well-known Python projects. Then I can see where we have gaps, where we have better features, etc.

Thanks,
Matt

Carlton Gibson

unread,
Jul 12, 2018, 3:17:02 AM7/12/18
to Django developers (Contributions to Django itself)
Hi Matt, 

The Jenkins configuration is not public I'm afraid. 

I'm one of the Django Fellows. If you wanted to invite me to your VSTS project I would be happy to review and offer pointers as you did the actual work, assuming that would help?

The main thing would be setting up the grid of supported versions, against different Pythons and DBs. I guess I'd start just with Python 3.7 (or 3.6) using SQLite and then grow out from there. 

The most basic setup would just be: 

* Clone
* install pip dependencies
* cd tests && ./runtests.py. 

If you can set up the grid of supported environments, that becomes interesting. 

I can only presume it's being actively worked on but, VSTS' integration with GitHub wasn't great last time I looked (?)

Finally, I don't think we're looking to move the CI but would Microsoft provide free resource to the DSF (us) for testing Django? 

Thanks. Interesting. 

Kind Regards,

Carlton

Matt Cooper

unread,
Jul 12, 2018, 8:37:29 AM7/12/18
to django-d...@googlegroups.com
Hi Carlton, thanks for your quick reply!

I'm setting things up here. Let me know if you can't access that link. It's configured as a public project, meaning you shouldn't need a login to view it. (There are still some known issues with public projects -- we're in preview right now.) The build definition is actually specified here in my clone of the Django repo as a YAML file. We do offer grids (we call it "matrix") as well -- for testing purposes I'm only running against Python 3.5 on Linux but it's straightforward to add ranges. I would very much appreciate your guidance when and if you have the time.

I'm confident we can put something together in terms of resources for the DSF. I want to first convince myself that we're credible technically -- if we have big gaps, no amount of dollars or build minutes from Microsoft would make it worth moving. Is it alright with you if we postpone further discussion on this topic?

Sorry for the length -- what follows are just some specifics of what I've done so far. We can take this off-list if it gets too noisy.

My build steps are essentially what you suggested. First, I make sure pip, setuptools, and wheel are up to date. Then I grab unittest-xml-reporting, install the rest of the py3.txt requirements, cd into tests, then ./runtests.py against a custom settings file (see below).

One of the things I'm unclear on is where you get your settings files for configurations other than SQLite. The Jenkins build hints at copying over some directories for the other DBs, which I'm assuming have the settings and maybe fixtures. The non-SQLite databases are an area I need to think more about, so I'm not blocking the rest of my work on that.

Other minor issues I've hacked around for now:
  • pylibmc wouldn't build for me (but I just got some advice from a colleague on troubleshooting that) so I've temporarily removed it.
  • I need to add a custom test runner (xmlrunner.extra.djangotestrunner.XMLTestRunner), so I copied test_sqlite.py and make a 1-line addition.
  • tests.timezones.ForcedTimeZoneDatabase generates output with an invalid timestamp, so I have to delete that test's results or else the whole test reporting step fails. I'm not clear if the bug is on our side in VSTS or someplace in one of the XUnit implementations.

I'm curious what issues you faced building GitHub repos. We've had support for several years, but greatly improved it over the last year. From an open source perspective, the worst problem the "black box" nature -- the community couldn't see built results, test failures, etc since VSTS projects were always private. Now with public projects, we're hoping to close that gap.

Regards,
Matt

--
You received this message because you are subscribed to a topic in the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-developers/oDgv_Ztgd4s/unsubscribe.
To unsubscribe from this group and all its topics, send an email to django-develop...@googlegroups.com.
To post to this group, send email to django-d...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/3f25427c-2a96-4b30-a3a8-0987a4ecab61%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Josh Smeaton

unread,
Jul 12, 2018, 8:58:27 AM7/12/18
to Django developers (Contributions to Django itself)
Hi Matt,

The django-box project[0] uses very close to the same ansible configuration that is used to configure all of the Jenkins slaves Django uses with the notable omission of an Oracle builder.

Since the repos are separate, there has been some divergence on the Jenkins side of things, but nothing too major. If you find anything missing I'd be happy to update the box repo.


Regards,

Matt Cooper

unread,
Jul 12, 2018, 9:28:25 AM7/12/18
to django-d...@googlegroups.com
Thanks Josh, I'll take a look at that.

Also, I got past the pylibmc problem (I wasn't running `apt-get update` before attempting to install libmemcached-dev).

Carlton Gibson

unread,
Jul 12, 2018, 9:39:57 AM7/12/18
to Django developers (Contributions to Django itself)
Hi Matt,

The settings files from the django-box project are here: https://github.com/django/django-box/tree/master/roles/djangodata/files
If you look in each, you'll see they basically just redefine the connection details for the 'default' and 'other' DB. 
(There's not much more to it really.)

For master it's now just Python 3.5-3.7. 

> tests.timezones.ForcedTimeZoneDatabase generates output with an invalid timestamp...

Not sure what that's about, but if you think there's an issue our end open a ticket at https://code.djangoproject.com

> ... what issues you faced ...

None in particular. My observation was more from a UX perspective. VSTS is all built around the idea you host on visualstudio.com 
but if you don't do that whole areas are blank (and a bit superfluous/confusing). It seems to have changed a bit, I see. :)

Finally: 

> I'm confident we can put something together in terms of resources for the DSF... 

Great! Of course we don't have to talk about it now. (It was more a speculative ask..  :-) 

I think we're OK to discuss here if it's not too noisy. Otherwise do hit me off-list. 
(Is there no VSTS messaging...? You could create an issue on your GitHub clone and @mention me. :-)

Kind Regards,

Carlton

Matt Cooper

unread,
Jul 12, 2018, 10:37:17 AM7/12/18
to django-d...@googlegroups.com
Thanks! I'll keep in on list as long as no one feels spammed :) And I'm very glad you asked about support -- it's been on our minds a lot lately.

I did some more digging on the ForcedTimeZone test. No issues on your end! That test gets skipped, and the test runner emits `datetime.datetime.min`. This confuses the uploader. There's agreement over on NUnit for their implementation to start emitting the current time instead of DateTime.Min, and I've raised an issue with the xmlrunner folks to make the same change. I'm also going to see if I can track down the right person to be more liberal in what the uploader accepts.

--
You received this message because you are subscribed to a topic in the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-developers/oDgv_Ztgd4s/unsubscribe.
To unsubscribe from this group and all its topics, send an email to django-develop...@googlegroups.com.
To post to this group, send email to django-d...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.

Matt Cooper

unread,
Jul 19, 2018, 3:19:07 PM7/19/18
to django-d...@googlegroups.com

In order to test against the different databases, I need to wait for our containerized builds stuff that's coming out shortly. Other than that (major) gap, I'd love to hear if I've missed anything important. The build script is here.

Reply all
Reply to author
Forward
0 new messages