The getBuildRecords returns an empty list when I filter by my project names.

Bug #1928872 reported by Alexis Wilke
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
launchpadlib
Invalid
Undecided
Unassigned

Bug Description

I'm trying to find information about my projects last builds (see here https://launchpad.net/%7Esnapcpp/+archive/ubuntu/ppa/+packages?field.name_filter=&field.series_filter=&field.status_filter=published&batch=75 for a list of packages), but when I do a query as follow:

    https://api.launchpad.net/devel/ubuntu/bionic?ws.op=getBuildRecords&source_name=libtld

I get an empty list returned.

I know that the source_name parameter works for other projects (I tried with just "lib" and in that case I get many entries, but none of mine such as snaplogger, libtld, etc.)

Is there a bug in the getBuildRecords operation?

If that operation works as intended, then how do I get my project build information?

This page https://api.launchpad.net/devel/snapcpp describe doesn't give me a valid URL for the builds of each package...

description: updated
Revision history for this message
Colin Watson (cjwatson) wrote :

You're using the wrong URL path. Use this instead:

  https://api.launchpad.net/devel/~snapcpp/+archive/ubuntu/ppa?ws.op=getBuildRecords&source_name=libtld

Or in launchpadlib:

  lp.load('/~snapcpp/+archive/ubuntu/ppa').getBuildRecords(source_name='libtld')

Changed in launchpadlib:
status: New → Invalid
Revision history for this message
Alexis Wilke (alexis-m2osw) wrote :

Okay. Someone was kind enough to answer on Stackover here:

https://askubuntu.com/questions/1338731/how-do-i-programmatically-detect-that-my-launchpad-build-process-is-done

As I was thinking, I was using the wrong URL. Here is an example of URL I need to use with my "libtld" library:

https://api.launchpad.net/devel/~snapcpp/+archive/ubuntu/ppa?ws.op=getBuildRecords&source_name=libtld

That returns information about all the builds ever performed on libtld, which is what I was looking for. It gives me information about the currently running build such as when it started, whether it is complete, etc.

Here is one entry (which was beautified) for those who find the bug report and are interested:

    {
        "self_link": "https://api.launchpad.net/devel/~snapcpp/+archive/ubuntu/ppa/+build/21663540",
        "web_link": "https://launchpad.net/~snapcpp/+archive/ubuntu/ppa/+build/21663540",
        "resource_type_link": "https://api.launchpad.net/devel/#build",
        "datecreated": "2021-06-05T00:46:14.957625+00:00",
        "date_started": "2021-06-05T00:46:33.709381+00:00",
        "datebuilt": "2021-06-05T00:50:18.253535+00:00",
        "duration": "0:03:44.544154",
        "date_first_dispatched": "2021-06-05T00:46:33.709381+00:00",
        "builder_link": "https://api.launchpad.net/devel/builders/lcy01-amd64-027",
        "buildstate": "Successfully built",
        "build_log_url": "https://launchpad.net/~snapcpp/+archive/ubuntu/ppa/+build/21663540/+files/buildlog_ubuntu-hirsute-amd64.libtld_1.6.2.1~hirsute_BUILDING.txt.gz",
        "title": "amd64 build of libtld 1.6.2.1~hirsute in ubuntu hirsute RELEASE",
        "dependencies": null,
        "archive_link": "https://api.launchpad.net/devel/~snapcpp/+archive/ubuntu/ppa",
        "pocket": "Release",
        "upload_log_url": null,
        "distribution_link": "https://api.launchpad.net/devel/ubuntu",
        "current_source_publication_link": "https://api.launchpad.net/devel/~snapcpp/+archive/ubuntu/ppa/+sourcepub/12478027",
        "source_package_name": "libtld",
        "source_package_version": "1.6.2.1~hirsute",
        "arch_tag": "amd64",
        "can_be_rescored": false,
        "can_be_retried": false,
        "can_be_cancelled": false,
        "changesfile_url": "https://launchpad.net/~snapcpp/+archive/ubuntu/ppa/+build/21663540/+files/libtld_1.6.2.1~hirsute_amd64.changes",
        "score": null,
        "external_dependencies": null,
        "http_etag": "\"8764d5102f4fba14a679c5f4467fc4d122686e71-eaa19a9ed5d396a90c5f0a3265d6c2d0fb3ceeaf\""
    },

You may close this bug report or transform it into a "we should ameliorate our docs". At least a few examples on how to retrieve these JSON files would be fantastic (you have examples to retrieve bugs, but not these JSON files...)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.