Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BLT-5216: drupal:sync:default:site requires --no-interaction during ci on pipelines #4683

Closed
loopy3025 opened this issue Jun 14, 2023 · 1 comment
Labels
Bug Something isn't working

Comments

@loopy3025
Copy link

loopy3025 commented Jun 14, 2023

Describe the bug
During our Drupal 10 upgrade, BLT upgraded from 13.7.0 to 13.7.1. when this happened, we got the following on blt source:build:composer druing acquia pipelines ci run:

Updating BLT template files...

 > blt blt:update --ansi --no-interaction

+ source ${BLT_DIR}/scripts/pipelines/setup_env


export PATH=${COMPOSER_BIN}:$PATH


# Set git info.
git config --global user.name "Acquia Cloud"

git config --global user.email "no-reply@example.com"


# Create MySQL DB.
mysql -u root -proot -e "CREATE DATABASE IF NOT EXISTS drupal"

mysql: [Warning] Using a password on the command line interface can be insecure.


set +v

+ blt drupal:sync:default:site

> source:build:composer

 [error]  TTY mode requires /dev/tty to be read/writable. 

The command failed. This often indicates a problem with your configuration. Review the command output above for more detailed errors, and consider re-running with verbose output for more information.

 [error]  Command `source:build:composer ` exited with code 1.
For troubleshooting guidance and support, see https://docs.acquia.com/blt/support/ 

+ blt drupal:sync:default:site

I have confirmed this issue on multiple sites.

Here is our build:setup-env:script:

            - echo 'STARTED'
            - export PIPELINE_SSH_KEY=~/.ssh/my-key
            - git ls-remote git@github.com:our-github-org/our-org-base-theme.git
            - echo 'Steps (git operations) will be successful which are dependent on my-key'
            - "eval `ssh-agent -s`" # start the ssh agent
            - "ssh-add ~/.ssh/my-key" # add a key
            - composer validate --no-check-all --ansi
            - composer install --no-dev --ansi
            - source ${BLT_DIR}/scripts/pipelines/setup_env
            - blt drupal:sync:default:site
            - nvm install 16
            - cd ${THEME_DIR} && npm install --global yarn && yarn cache clean && yarn
            - source ${BLT_DIR}/scripts/pipelines/tests
            - unset PIPELINE_SSH_KEY
            - echo 'Step executed with default ssh keys'
            - echo 'FINISHED'

It seems like it is getting hung up at the blt drupal:sync:default:site step, specifically on source:build:composer. Our sites have passed through this step without complaint on 13.7.0.

I had hoped that running the sync default site command with --no-interaction would be the ticket like in the old #4251 issue, but that only resulted in the pipelines run starting, but never responding after several minutes of running. pipelines logs --application-id=8d8223fe-c9c6-4dce-80b1-15e2d2e10f2c --job-id=32dff02c-e797-4d45-abc8-c15b0058ab05 --tail results in Failed to retrieve logs. for a very long time after. I honestly just gave up on it after 10 minutes of no response.

Simultaneously, it also upgraded drush from 11 to 12 and we did try pinning drush to ^11.0 in case that was somehow the problem. It was a shot in the dark, anyways, and it didn't help.

Could it be the changes to .github/workflows/automerge.yml?

To Reproduce

Run blt drupal:sync:default:site with acquia pipelines during blt:setup-env. I suspect that it's important to also use an ssh key. Use blt 13.7.1 and PHP 8.1 with a Drupal 10 site.

Expected behavior
The command passes without complaint.

Detailed error output

set +v

+ blt drupal:sync:default:site -vvv

> source:build:composer

 [Exec] Running export COMPOSER_EXIT_ON_PATCH_FAILURE=1 &&
 composer install --ansi --no-interaction in /mnt/tmp/local.prod/source

 [error]  TTY mode requires /dev/tty to be read/writable. 

The command failed. This often indicates a problem with your configuration. Review the command output above for more detailed errors, and consider re-running with verbose output for more information.

 [error]  Command `source:build:composer ` exited with code 1.
For troubleshooting guidance and support, see https://docs.acquia.com/blt/support/ 

0.162s total time elapsed.

+ blt drupal:sync:default:site -vvv

System information

  • Operating system type: Acquia Cloud Next
  • BLT version: 13.7.1
@loopy3025 loopy3025 added the Bug Something isn't working label Jun 14, 2023
@github-actions github-actions bot changed the title Another TTY mode requires /dev/tty to be read/writable error BLT-5216: Another TTY mode requires /dev/tty to be read/writable error Jun 14, 2023
@loopy3025
Copy link
Author

loopy3025 commented Jun 14, 2023

Well, I just tried it again with the --no-interaction and after 16 minutes, it passed.

I can't imagine why.

@loopy3025 loopy3025 changed the title BLT-5216: Another TTY mode requires /dev/tty to be read/writable error BLT-5216: drupal:sync:default:site requires --no-interaction during ci on pipelines Jun 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant