[Buildbot-commits] [buildbot/buildbot] f10a29: When requesting builds from Data API, properties c...

GitHub noreply at github.com
Fri Jul 31 17:59:48 UTC 2015


  Branch: refs/heads/master
  Home:   https://github.com/buildbot/buildbot
  Commit: f10a2903d90d85b5ee9b06cfe9f198ad109b2b1d
      https://github.com/buildbot/buildbot/commit/f10a2903d90d85b5ee9b06cfe9f198ad109b2b1d
  Author: Namgyal Brisson <namat4css at gmail.com>
  Date:   2015-07-31 (Fri, 31 Jul 2015)

  Changed paths:
    M master/buildbot/data/builds.py
    M master/buildbot/data/resultspec.py
    M master/buildbot/www/rest.py

  Log Message:
  -----------
  When requesting builds from Data API, properties can be filtered

Currently when requesting on Data API for builds (api/v2/builds),
each item (build) returned from the JSON structure,
does not contain the "properties" field.

The drawback of it, is that one's got to request for each build its properties,
which is costly in terms of performance and network usage
(in particular on big range of data).

It should be computed and served from the back-end (Data API).

With this patch, one can request builds properties like this:

- api/v2/builds/1?property=* (return the whole build's properties)
- api/v2/builds/1?property=slavename&property=user (return only desired properties)
- api/v2/builds?property=* (return the whole build's properties)
- api/v2/builds?property=slavename&property=user (return only desired properties)

Fields & Filters can be combined (limit, offset, order, ...)

Important: If field(s) is/are specified properties can be retrieved only if field
``properties`` is specified.

- api/v2/builds?field=buildid&field=properties&property=slavename&property=user

Note: By default, none properties are returned to avoid breaking API.

Unit tests & documentation updated accordingly into another commits.

Signed-off-by: Namgyal Brisson <namat4css at gmail.com>


  Commit: 07dc22a7a55821024fb4ad22b97772d95511702b
      https://github.com/buildbot/buildbot/commit/07dc22a7a55821024fb4ad22b97772d95511702b
  Author: Namgyal Brisson <namat4css at gmail.com>
  Date:   2015-07-31 (Fri, 31 Jul 2015)

  Changed paths:
    M master/buildbot/test/unit/test_data_builds.py
    M master/buildbot/test/unit/test_data_resultspec.py
    M master/buildbot/test/unit/test_db_builds.py
    M master/buildbot/test/unit/test_www_rest.py
    M master/buildbot/test/util/validation.py

  Log Message:
  -----------
  When requesting builds from Data API, properties can be filtered (unit test)

Unit tests added into,

* test_data_builds.py
* test_data_resultspec.py
* test_www_rest.py

Some minor adaptations.

Signed-off-by: Namgyal Brisson <namat4css at gmail.com>


  Commit: 534d233ca89562cd531b06c11b1072e6a5f2590a
      https://github.com/buildbot/buildbot/commit/534d233ca89562cd531b06c11b1072e6a5f2590a
  Author: Namgyal Brisson <namat4css at gmail.com>
  Date:   2015-07-31 (Fri, 31 Jul 2015)

  Changed paths:
    M master/docs/developer/cls-resultspec.rst
    M master/docs/developer/rtype-build.rst

  Log Message:
  -----------
  When requesting builds from Data API, properties can be filtered (doc)

Documentation updated according to changes.

Signed-off-by: Namgyal Brisson <namat4css at gmail.com>


  Commit: 20e0e2c32c809e1f20ed86d94995cde2f2f1b6fb
      https://github.com/buildbot/buildbot/commit/20e0e2c32c809e1f20ed86d94995cde2f2f1b6fb
  Author: Mikhail Sobolev <mss at mawhrin.net>
  Date:   2015-07-31 (Fri, 31 Jul 2015)

  Changed paths:
    M master/buildbot/data/builds.py
    M master/buildbot/data/resultspec.py
    M master/buildbot/test/unit/test_data_builds.py
    M master/buildbot/test/unit/test_data_resultspec.py
    M master/buildbot/test/unit/test_db_builds.py
    M master/buildbot/test/unit/test_www_rest.py
    M master/buildbot/test/util/validation.py
    M master/buildbot/www/rest.py
    M master/docs/developer/cls-resultspec.rst
    M master/docs/developer/rtype-build.rst

  Log Message:
  -----------
  Merge pull request #1739 from nam4dev/buildbot_builds_properties

When requesting builds from Data API, properties can be filtered


Compare: https://github.com/buildbot/buildbot/compare/438a6d36f29e...20e0e2c32c80


More information about the Commits mailing list