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

Ability to pipe commands in tooling #1918

Closed
neclimdul opened this issue Dec 30, 2019 · 9 comments
Closed

Ability to pipe commands in tooling #1918

neclimdul opened this issue Dec 30, 2019 · 9 comments
Labels
bug Something aint working right! can not replicate Tried to reproduce but could not stale Issue has been auto-flagged as stale

Comments

@neclimdul
Copy link
Contributor

Recreating #1832 because stale bot closed it. This is still broken and completely breaks the documented workflow requiring manual interaction to setup a lando instance and do standard tooling processes.

These issues are closed but it is still not possible to use pipes in tooling or other commands
#951 #967

Like this redirection

name: landobrokenpipe
recipe: custom
config:
webroot: .
services:
test:
type: node:8
tooling:
compile:
service: test
cmd:
- echo "Do some compile steps..."
- sed ERROR compile.log > errors.txt
or this pipe I'd like to use to test pecl yaml libraries in d8.

name: d8
recipe: drupal8

services:
appserver:
run_as_root:
- "apt-get update"
- "apt-get install -y libyaml-dev"
- "printf "\n" | pecl install yaml-2.0.4"

@neclimdul neclimdul added the bug Something aint working right! label Dec 30, 2019
@stale
Copy link

stale bot commented Jan 29, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions and please check out this if you are wondering why we auto close issues.

@stale stale bot added the stale Issue has been auto-flagged as stale label Jan 29, 2020
@neclimdul
Copy link
Contributor Author

.

@stale stale bot removed the stale Issue has been auto-flagged as stale label Feb 1, 2020
@Peter-WAAT
Copy link
Contributor

I'm suffering from this too. Appending to a file doesn't work with >> (a.k.a. redirection)...

@pirog pirog added this to the 3.0.0-rrc.5 milestone Apr 11, 2020
@pirog
Copy link
Sponsor Member

pirog commented Apr 11, 2020

@neclimdul i am not able to replicate this. We make fairly extensive usage of pipe and other special symbols in our tests

I'd encourage you to spin up those examples against the latest Lando and go through the verification steps in the README and report back. This might help us figure out whats different about your setup that is causing this to not work.

@pirog pirog added the can not replicate Tried to reproduce but could not label Apr 11, 2020
@pirog pirog removed this from the 3.0.0-rrc.5 milestone Apr 11, 2020
@smutlord
Copy link
Sponsor Contributor

@pirog queued up another func test for this
e053d2d

@neclimdul
Copy link
Contributor Author

Just getting around to actually testing this. I figured it was fixed and this was actually closed so I hadn't looked at it. My bad....

I think i figured out the problem I don't know if it is actually a bug anymore though maybe it is. The yaml handling is interesting at least. See the example at the end of this comment.

I'm in the habit of quoting complicated strings in yaml to make sure they're parsed as expected by yaml parsers but somehow in this case it is leading to lando treating the commands differently. Its been a while since I've read the yaml spec but that doesn't seem like these two lines should even be different to lando by the time it see's them but somehow it is. Its even more confusing that somehow the pipe is both triggering pecl to run but also somehow getting into the pecl arguments. Really weird.

Anyways, at least there's this comment for me to find google searching the next time I can't figure this out :-D

$ lando version
v3.0.0-rrc.3
$ lando yaml
<a bunch of pecl build logging>
$ lando yaml2
pecl: 1: printf: usage: printf format [arg ...]
pecl: 2: pecl: Syntax error: "|" unexpected
$ tail -n 8 .lando.yml
  yaml:
    service: appserver
    cmd:
      - printf \"\n\" | pecl install yaml-2.0.4
  yaml2:
    service: appserver
    cmd:
      - "printf \"\n\" | pecl install yaml-2.0.4"

pirog added a commit that referenced this issue Jun 4, 2020
#1918: Fix bug causing piping in docker execd tooling to silently fail
@stale
Copy link

stale bot commented Oct 21, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions and please check out this if you are wondering why we auto close issues.

@stale stale bot added the stale Issue has been auto-flagged as stale label Oct 21, 2020
@neclimdul
Copy link
Contributor Author

fair enough.

I tested again and the test case in #1918 (comment) passed so I think this is 100% fixed now!

@pirog
Copy link
Sponsor Member

pirog commented Oct 23, 2020

Yes, i think this should have been closed awhile ago but thanks for the housekeeping!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something aint working right! can not replicate Tried to reproduce but could not stale Issue has been auto-flagged as stale
Projects
None yet
Development

No branches or pull requests

4 participants