3396206: Alter AMA Drush commands to run as UID 1 admin.
Closes #3396206
Merge request reports
Activity
added 1 commit
- 0ac94337 - 3396206: Alter AMA Drush commands to run as UID 1 admin.
1 1 <?php 2 2 3 3 declare(strict_types=1); 4 This causes aphpcs
violation and hence causes the CI pipeline to regress: https://git.drupalcode.org/issue/acquia_migrate-3396206/-/jobs/835222
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; - Comment on lines 35 to +38
This causes aphpcs
violation and hence causes the CI pipeline to regress: https://git.drupalcode.org/issue/acquia_migrate-3396206/-/jobs/835222 changed this line in version 3 of the diff
- Resolved by Bryan Jiencke
- Resolved by Bryan Jiencke
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'; changed this line in version 3 of the diff
added 1 commit
- 8962c3a6 - 3396206: Adjust for coding standards and logic to determine AMA command.
added 1 commit
- 41bcba35 - Awesome! GitLab can apply suggestions this simply now.
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); @wimleers annotated data does have command name, so we could check "if command name starts with 'ama:'", but it also has class name that can do an exact match. Let me know which you advise.
I'm hoping to apply this to all commands in AMA to avoid any traps later, but we could also just explicitly list command names.
Edited by Bryan Jienckechanged this line in version 7 of the diff
added 1 commit
- bc3e4bd7 - 3396206: Pull recommendations branch from upstream instead of origin undo.
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.
Toggle commit listadded 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.
Toggle commit list@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:
- 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?
- 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
I agree it's very distracting and confusingInitial observations:
-
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!) - 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…
-
added 1 commit
- a32af23b - 3396206: Update logic to cover migrate and AMA commands.
added 5 commits
-
a32af23b...312fe88f - 4 commits from branch
project:1.9.x
- 29b65f8a - Merge branch '1.9.x' of https://git.drupalcode.org/project/acquia_migrate into...
-
a32af23b...312fe88f - 4 commits from branch