Skip to content
Snippets Groups Projects

3396206: Alter AMA Drush commands to run as UID 1 admin.

5 unresolved threads

Closes #3396206

Merge request reports

Members who can merge are allowed to add commits.

Merge request pipeline #112370 failed

Merge request pipeline failed for 29b65f8a

Approval is optional
Test summary results are being parsed
Ready to merge by members who can write to the target branch.
  • The source branch is 2 commits behind the target branch.
  • 1 commit will be added to 1.9.x.
  • Source branch will not be deleted.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
1 1 <?php
2 2
3 3 declare(strict_types=1);
4
  • 34 33 use Symfony\Component\Console\Output\ConsoleSectionOutput;
    35 34 use Symfony\Component\Console\Output\OutputInterface;
    36 35 use Symfony\Component\Console\Terminal;
    36 use Consolidation\AnnotatedCommand\CommandData;
    37 use Drupal\Core\Session\AccountSwitcherInterface;
    38 use Drupal\Core\Session\UserSession;
  • Wim Leers
  • Wim Leers
  • 1770 $this->accountSwitcher->switchBack();
    1771 }
    1772
    1773 }
    1774
    1775 /**
    1776 * Determines if a command is an AMA command.
    1777 *
    1778 * @param \Consolidation\AnnotatedCommand\CommandData $command_data
    1779 * The command to check.
    1780 *
    1781 * @return bool
    1782 * Whether or not this command is an AMA command.
    1783 */
    1784 public function isAmaCommand(CommandData $command_data) {
    1785 return $command_data->annotationData()->get('validate-module-enabled') === 'acquia_migrate';
  • Bryan Jiencke added 1 commit

    added 1 commit

    • 8962c3a6 - 3396206: Adjust for coding standards and logic to determine AMA command.

    Compare with previous version

  • Bryan Jiencke added 1 commit

    added 1 commit

    • 41bcba35 - Awesome! GitLab can apply suggestions this simply now.

    Compare with previous version

  • 1771 $this->accountSwitcher->switchBack();
    1772 }
    1773
    1774 }
    1775
    1776 /**
    1777 * Determines if a command is an AMA command.
    1778 *
    1779 * @param \Consolidation\AnnotatedCommand\CommandData $command_data
    1780 * The command to check.
    1781 *
    1782 * @return bool
    1783 * Whether or not this command is an AMA command.
    1784 */
    1785 public function isAmaCommand(CommandData $command_data) {
    1786 return ($command_data->annotationData()->get('_classname') === AcquiaMigrateCommands::class);
  • Bryan Jiencke added 2 commits

    added 2 commits

    • 86b65fe4 - 3396206: Pull recommendations branch from upstream instead of origin.
    • ec88c9dc - Merge branch '3396206-ama-drush-command-as-admin' of...

    Compare with previous version

  • Bryan Jiencke added 1 commit

    added 1 commit

    • bc3e4bd7 - 3396206: Pull recommendations branch from upstream instead of origin undo.

    Compare with previous version

  • Bryan Jiencke added 1 commit

    added 1 commit

    • b616c4d6 - 3396206: Check if build passes clean.

    Compare with previous version

  • Bryan Jiencke added 1 commit

    added 1 commit

    • 5905d06e - 3396206: Check if build passes clean undo.

    Compare with previous version

  • Bryan Jiencke added 1 commit

    added 1 commit

    • 1882371a - 3396206: Check if build passes clean undo.

    Compare with previous version

  • Bryan Jiencke added 1 commit

    added 1 commit

    • 1b8b6e9b - 3396206: Check if build passes clean.

    Compare with previous version

  • Bryan Jiencke added 1 commit

    added 1 commit

    • cac44d89 - 3396206: Check if build passes clean.

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • Bryan Jiencke added 13 commits

    added 13 commits

    • 37aed84f...8962c3a6 - 3 earlier commits
    • 41bcba35 - Awesome! GitLab can apply suggestions this simply now.
    • 86b65fe4 - 3396206: Pull recommendations branch from upstream instead of origin.
    • ec88c9dc - Merge branch '3396206-ama-drush-command-as-admin' of...
    • bc3e4bd7 - 3396206: Pull recommendations branch from upstream instead of origin undo.
    • b616c4d6 - 3396206: Check if build passes clean.
    • 5905d06e - 3396206: Check if build passes clean undo.
    • 1882371a - 3396206: Check if build passes clean undo.
    • 1b8b6e9b - 3396206: Check if build passes clean.
    • cac44d89 - 3396206: Check if build passes clean.
    • d2fb94a1 - Project setup.

    Compare with previous version

  • added 1 commit

    • 121fa15d - 3396206: Check if build passes clean.

    Compare with previous version

  • Bryan Jiencke added 12 commits

    added 12 commits

    • 121fa15d...0ac94337 - 2 earlier commits
    • 8962c3a6 - 3396206: Adjust for coding standards and logic to determine AMA command.
    • 41bcba35 - Awesome! GitLab can apply suggestions this simply now.
    • 86b65fe4 - 3396206: Pull recommendations branch from upstream instead of origin.
    • ec88c9dc - Merge branch '3396206-ama-drush-command-as-admin' of...
    • bc3e4bd7 - 3396206: Pull recommendations branch from upstream instead of origin undo.
    • b616c4d6 - 3396206: Check if build passes clean.
    • 5905d06e - 3396206: Check if build passes clean undo.
    • 1882371a - 3396206: Check if build passes clean undo.
    • 1b8b6e9b - 3396206: Check if build passes clean.
    • cac44d89 - 3396206: Check if build passes clean.

    Compare with previous version

  • added 1 commit

    • ecc0a38f - 3396206: Check if build passes clean.

    Compare with previous version

    • Author Contributor

      @wimleers -- seems like builds on the 1.9.x branch are erroring now, possibly due to changes in contrib modules our tests extend.

      This pipeline shows the test outcomes without any changes from this MR, and this pipeline shows the same errors with changes from this MR.

      Specific errors:

      1. The bean_migrate module has an error in D9. You mentioned bean_migrate had outstanding issues, and it's not D10 compatible yet. Should we remove the test until it's ready for D10?
      2. The inline_entity_from module has an error in D10. Same error doesn't happen locally with version 1.0.0-rc17 or 3.0.0-rc19. Is there something different about this test environment we should recreate locally?

      Your insights here would be most appreciated.

    • Most of my day today is filled with meetings, but I'll try to get to these ASAP :thumbsup: I agree it's very distracting and confusing :grimacing:

      Initial observations:

      1. bean_migrate worked fine in the D9 testing pipeline for months, and now it's suddenly failing. No idea how that's possible because the pinned versions stayed identical! So that needs investigation. Removing the test is not just pointless but actually worrying, because if it used to work fine, it should still do so today. D10 compatibility has nothing to do with it (or shouldn't at least!)
      2. This too used to pass just fine. Maybe something is different about the test environment. We'll need to debug it locally, then add debug output in the CI run and narrow it down that way… :grimacing:
    • Please register or sign in to reply
  • Bryan Jiencke added 3 commits

    added 3 commits

    • d2fb94a1 - Project setup.
    • bb1b5f38 - Merge branch '3396206-ama-drush-command-as-admin' of...
    • 9067819f - 3396206: Build debugging.

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • added 1 commit

    • a32af23b - 3396206: Update logic to cover migrate and AMA commands.

    Compare with previous version

  • Bryan Jiencke added 5 commits

    added 5 commits

    Compare with previous version

  • Please register or sign in to reply
    Loading