Giter Club home page Giter Club logo

Comments (5)

pjcdawkins avatar pjcdawkins commented on September 28, 2024
 [debug] Bootstrap further to find @site-aliases.theplanner.features/DD-1360-change-requests [0.13 sec, 11.53 MB]
 [debug] Trying to bootstrap as far as we can [0.13 sec, 11.53 MB]
 [debug] Drush bootstrap phase: bootstrapDrupalRoot() [0.13 sec, 11.53 MB]
 [debug] Change working directory to /Users/alex/Sites/redactive-drupal-planner/web [0.13 sec, 11.53 MB]

Not sure how to read this log - line 1 suggests the alias has been found, but line 4 suggests it's somehow using the local site and not SSHing to the remote environment.

I would suggest - can you manually change the alias name and then try it?

  1. Find the file probably at /Users/alex/.drush/site-aliases/theplanner.site.yml
  2. Insert (with your project ID again in place of [snip]):
'@site-aliases.theplanner.features-DD-1360-change-requests':
  root: /app/web
  user: [snip]-features-dd-1360-change-hns5mva--redactived8
  host: ssh.eu-5.platform.sh
  uri: 'https://www.features-dd-1360-change-[snip].eu-5.platformsh.site/'
  1. Run drush @site-aliases.theplanner.features-DD-1360-change-requests status

from legacy-cli.

alexharriesredactive avatar alexharriesredactive commented on September 28, 2024

Hello @pjcdawkins - thank you for your help.

Removing the slash from the Drush alias does indeed fix the problem:

$ vim /Users/alex/.drush/site-aliases/theplanner.site.yml

[edited the alias so it looks like...]

features-DD-1360-change-requests:
  options:
    platformsh-cli-auto-remove: true
  root: /app/web
  user: [snip]
  host: ssh.eu-5.platform.sh
  uri: 'https://www.features-dd-1360-change-[snip].eu-5.platformsh.site/'


$ drush cc drush

 [success] 'drush' cache was cleared.

$ drush @site-aliases.theplanner.features-DD-1360-change-requests status

Drupal version   : 9.4.7
Site URI         : https://www.features-dd-1360-change-[snip].eu-5.platformsh.site/
[snip] for brevity...
Admin theme      : gin
PHP binary       : /usr/bin/php7.4-zts
PHP config       : /etc/php/7.4-zts/cli/php.ini
PHP OS           : Linux
Drush script     : /app/vendor/bin/drush
Drush version    : 10.6.1
Drush temp       : /tmp
Drush configs    : /app/.drush/drush.yml
                   /app/vendor/drush/drush/drush.yml
Install profile  : redactived8platformprofile
Drupal root      : /app/web
Site path        : sites/default
Files, Public    : sites/default/files
Files, Private   : /app/private
Files, Temp      : /app/tmp
Connection to ssh.eu-5.platform.sh closed.

So it's the presence of a forward-slash in the Drush alias which is causing a problem.

If those slashes were replaced with hyphens in the platform drush-aliases -r command it would fix the issue (I appreciate it's probably a Drush problem but I don't think this would be a terrible solution?).

/Alex

from legacy-cli.

pjcdawkins avatar pjcdawkins commented on September 28, 2024

If those slashes were replaced with hyphens in the platform drush-aliases -r command it would fix the issue (I appreciate it's probably a Drush problem but I don't think this would be a terrible solution?).

Agreed. Odd that it doesn't like the slash, but there's no reason not to implement that workaround here.

from legacy-cli.

alexharriesredactive avatar alexharriesredactive commented on September 28, 2024

That would be a hugely-helpful fix 👍

from legacy-cli.

pjcdawkins avatar pjcdawkins commented on September 28, 2024

Just a bit of research - it looks like the site alias names are parsed (at least in Drush 9) using:

https://github.com/consolidation/site-alias/blob/103fbc9bad6bbadb1f7533454a8f070ddce18e13/src/SiteAliasName.php#L60

    const ALIAS_NAME_REGEX = '%^@?([a-zA-Z0-9_-]+)(\.[a-zA-Z0-9_-]+)?(\.[a-zA-Z0-9_-]+)?$%';

which restricts alias names to containing the characters [a-zA-Z0-9_-] only, even though this is not documented (the documentation says only a dot character . is forbidden)

from legacy-cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.