Not sure what's wrong but I guess the json interface is currently disabled.

drush iq-apply-patch 1762204

is broken currently.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

clemens.tolboom’s picture

Status: Active » Needs review
FileSize
767 bytes
clemens.tolboom’s picture

In a dreditor commit https://github.com/dreditor/dreditor/commit/f25b214920f084d28ea67328963b...

// @todo fix this once JSON data can be extracted again.

helmo’s picture

The json output was left in the D7 upgrade... #1710850: Deploy RestWS for D7 project issue JSON

clemens.tolboom’s picture

+++ b/iq.drush.inc
@@ -1337,6 +1337,10 @@ function drush_iq_download_info($issue_info_id) {
+      drush_log("No json data received from d.o.", "warning");

This text could probably better link to the correct issue like https://drupal.org/node/1969466 aka #1969466: Fix GET /node/1 with page caching

clemens.tolboom’s picture

FileSize
1.61 KB

@helmo and @clemens.tolboom are now testing on

$ drush --strict=0 --debug --issue-site="http://drupal:drupal@project-drupal.redesign.devdrupal.org" patch 2125253

We needed to apply Entity #1330086: wrapper throws exceptions for properties that are declared in the info.

clemens.tolboom’s picture

Attached json file for analysis of the new structure.

clemens.tolboom’s picture

  1. +++ b/iq.drush.inc
    @@ -1327,16 +1327,23 @@ function drush_iq_issue_number($issue_spec) {
    +  $url = "$issue_site/node/$number.json";
    

    This needs documentation as we MUST request for node/1.json as _drush_download_file has no options for adding a header field like "Accept: application/json"

  2. +++ b/iq.drush.inc
    @@ -1327,16 +1327,23 @@ function drush_iq_issue_number($issue_spec) {
    +    drush_log(print_r($data, true));
    

    No need to log this.

  3. +++ b/iq.drush.inc
    @@ -1327,16 +1327,23 @@ function drush_iq_issue_number($issue_spec) {
    +    drush_log(print_r($issue_info, true));
    

    No need to log this.

  4. +++ b/iq.drush.inc
    @@ -1327,16 +1327,23 @@ function drush_iq_issue_number($issue_spec) {
    +      drush_log("No json data received from d.o.", "warning");
    

    This should be a fatal.

clemens.tolboom’s picture

FileSize
5.11 KB

Attached patch fixes some problems encountered while testing:
- test site runs http instead of hard coded https
- My guess is we need unit tests for the received json data so I split <?php function drush_iq_download_info() by adding <?php function _drush_iq_prepare_json()?

See #2127995: Make testsuite run smoother

greg.1.anderson’s picture

Thanks for working on this. I guess for now we need to test per https://drupal.org/comment/8145123#comment-8145123?

Will look at this soon.

greg.1.anderson’s picture

Title: Make sure the d.o /node/nid/project-issue/json result is json » Allow user to specify protocol (http instead of https) with --issue-site
Status: Needs review » Fixed

Committed #8 with some minor adjustments. Added --issue-site to help, so --strict=0 no longer necessary.

greg.1.anderson’s picture

So, to recap: drush_iq is not yet updated to work with drupal.org, and it appears that drupal.org is not yet emitting json data yet anyway. To test drush_iq, though, you may use the test site, since it -has- been updated to publish json at node/1.json.

To test:

drush iqi --issue-site=http://username:password@project-drupal.redesign.devdrupal.org 2125121

The username and password are both "drupal" (I didn't fill it in because I didn't want to make a valid URL for crawlers to follow...)

greg.1.anderson’s picture

clemens.tolboom’s picture

Thanks :)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.