Drush Commands Fail: The "type" argument does not exist.

Created on 6 May 2024, 7 months ago

Problem/Motivation

I was reviewing this usecase https://www.drupal.org/project/new_relic_rpm/issues/2058183 ✨ Add drush command to create deployments Fixed so I could add drush commands to mark deployments in our CI process. But drush commands do not seem to be working

I try `drush new-relic-rpm:deploy 2.3` and get an error `The "type" argument does not exist.`

Drupal 10.1.x
new_relic_rpm 2.1.1

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Active

Version

2.1

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States NicholasS

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @NicholasS
  • πŸ‡ΊπŸ‡ΈUnited States NicholasS
  • πŸ‡ΊπŸ‡ΈUnited States NicholasS

    Ok so I think this could be a conflict with another drupal module called "Node Revision Delete". Since that error message is coming from that other modules code, and when I uninstall node revision delete the new relic drush commmand appears to work.

    The error you're experiencing might be due to a conflict between the new-relic-rpm:deploy command and the nrd command from the node_revision_delete module.
    
  • πŸ‡ΊπŸ‡ΈUnited States NicholasS

    Yeah so these two modules have the same alias which is why the drush commands are not working for me, when when I am not using the alias of either module.

      /**
       * Mark a deployment in newrelic.
       *
       * @param string $revision
       *   The revision label.
       * @param array $options
       *   The options to pass through to the deplopment.
       *
       * @command new-relic-rpm:deploy
       * @aliases nrd
    
    /**
       * Deletes old node revisions for a given content type.
       *
       * @param string $type
       *   Content type machine name.
       * @param array $options
       *   The options.
       *
       * @option dry_run Test run without deleting revisions but seeing the output.
       *
       * @usage nrd article
       *   Delete article revisions according to set configuration.
       * @usage nrd page --dry_run
       *   Execute the deletion process without delete the revisions, just to see
       *   the output result.
       *
       * @command node-revision-delete
       * @aliases nrd
       */
    

    Given that Node Revision Delete has a much higher usage, and that its drush command is more likely to be typed by a human, and new relice deployments are likely used more in CI instances. I think this module should just remove its alias? I will attempt that patch, or modify the alias so it doesn't conflict with 'nrd' alias of the larger module.

  • πŸ‡ΊπŸ‡ΈUnited States NicholasS

    Changed the alias from 'nrd' to 'nrrd' since that is technically new-relic-rpm:deploy this change would obviously need to be mentioned in the Release Notes.

  • πŸ‡ΊπŸ‡ΈUnited States NicholasS
Production build 0.71.5 2024