Giter Site home page Giter Site logo

Comments (3)

dwurf avatar dwurf commented on June 8, 2024

Two thoughts:

  1. Try to resolve hostname via gethostbyname / find in ssh config, or
  2. Don't do any validation, just detect and report the error case via sensible exceptions (EAFP)

I like 2 because it opens the door for constructs like ssh('proxy').ssh('prod').git.pull() (where prod is not known to the originating host)

from budgie.

dalethestirling avatar dalethestirling commented on June 8, 2024

I do think that execution of nested ssh as in option 2 is important especially when you get into cases as you suggest, but this gets to the question that we talked about in issue #1

If we have the situation of the construct:

    ssh('proxy').ssh('prod').git.pull()

Where should we be resolving the sh module command lookups? and how far do we drill as the above example is across 2 hosts.

This is something that I am not sure how to handle yet?

from budgie.

dalethestirling avatar dalethestirling commented on June 8, 2024

Implementation going forward will use option 2 where we take the EAFP approach and work on the exceptions rather than complex host validations that will lead to false positives.

This also allows cadre to maintain its alignment with sh

I have opened issue #3 to capture thoughts on how exceptions should be dealt with.

from budgie.

Related Issues (7)

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.