Giter Site home page Giter Site logo

jsc's People

Contributors

cajlarsson avatar cifro avatar daniel-marklund avatar stefannyman avatar thorwald avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jsc's Issues

Ignores -p/--port

At the moment jsc will ignore -p/--port since we use Remoto and you cannot make it connect to any other port than 22.

Recipe warning message

deploy command shows "could not find recipe dir or file" and then continues to run the recipe

MAJOR: Find an alternative for Remoto

Remoto and execnet leaves a lot of wishes unanswered for us. Here's a list

  1. No MS Windows support
  2. Print outputs aren't flushed before function return is put in queue
  3. No support for **kwargs and tuples which forces us to do a workaround with decorators
  4. ctrl+c will kill the ssh connection so we can't use ^C properly
  5. (minor) can't set ssh port.

jsc fails to connect

Crash on start, message from support. Inconsistent stacktraces

File "/usr/local/bin/jsc", line 9, in <module>
load_entry_point('jsc==6.0', 'console_scripts', 'jsc')()
File "/Library/Python/2.7/site-packages/jsc/client.py", line 553, in main
rpc = SshJsonRpc(ssh_username, password, pkey, host=host, port=int(port))
File "/Library/Python/2.7/site-packages/jsc/sshjsonrpc.py", line 41, in __init__
self.ssh_client.connect(host, port, **connect_kw)
File "/Library/Python/2.7/site-packages/paramiko/client.py", line 251, in connect
retry_on_signal(lambda: sock.connect(addr))
File "/Library/Python/2.7/site-packages/paramiko/util.py", line 270, in retry_on_signal
return function()
File "/Library/Python/2.7/site-packages/paramiko/client.py", line 251, in <lambda>
retry_on_signal(lambda: sock.connect(addr))
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 224, in meth
return getattr(self._sock,name)(*args)
socket.error: [Errno 61] Connection refused

or

File "/usr/local/bin/jsc", line 9, in <module>
load_entry_point('jsc==6.0', 'console_scripts', 'jsc')()
File "/Library/Python/2.7/site-packages/jsc/client.py", line 553, in main
rpc = SshJsonRpc(ssh_username, password, pkey, host=host, port=int(port))
File "/Library/Python/2.7/site-packages/jsc/sshjsonrpc.py", line 51, in __init__
raise SshRpcError()
jsc.sshrpcutil.SshRpcError

Unhandled paramiko exception

File "/usr/local/bin/jsc", line 9, in
load_entry_point('jsc==6.0', 'console_scripts', 'jsc')()
File "/Library/Python/2.7/site-packages/jsc/client.py", line 553, in main
rpc = SshJsonRpc(ssh_username, password, pkey, host=host, port=int(port))
File "/Library/Python/2.7/site-packages/jsc/sshjsonrpc.py", line 51, in init
raise SshRpcError()
jsc.sshrpcutil.SshRpcError

OSX: IOError on writing to sys.stdout if lots of data.

running command: unzip -d /app/code/src/wp-content/themes/ tint-themeskingdom.zip
Archive:  tint-themeskingdom.zip
   creating: /app/code/src/wp-content/themes/tint-themeskingdom/
  inflating: /app/code/src/wp-content/themes/tint-themeskingdom/404.php
  inflating: /app/code/src/wp-content/themes/tint-themeskingdom/admin-settings.php
 extracting: /app/code/src/wp-content/themes/tint-themeskingdom/archive-portfolio.php
  inflating: /app/code/src/wp-content/themes/tint-themeskingdom/archive.php
  inflating: /app/code/src/wp-content/themes/tint-themeskingdom/comments.php
  inflating: /app/code/src/wp-content/themes/tint-themeskingdom/footer.php
  inflating: /app/code/src/wp-content/themes/tint-themeskingdom/functions.php
  inflating: /app/code/src/wp-content/themes/tint-themeskingdom/header.php
   creating: /app/code/src/wp-content/themes/tint-themeskingdom/inc/
  inflating: /app/code/src/wp-content/themes/tint-themeskingdom/inc/admin-settings.php
  inflating: /app/code/src/wp-content/themes/tint-themeskingdom/inc/class-tgm-plugin-activation.php
 extracting: /app/code/src/wp-content/themes/tint-themeskingdom/inc/custom-taxonomies.php  Traceback (most recent call last):
  File "/Users/z/jsc/jsc/client.py", line 579, in <module>
    main()
  File "/Users/z/jsc/jsc/client.py", line 549, in main
    console.cmdloop_with_keyboard_interrupt("Welcome to jsc!")
  File "/Users/z/jsc/jsc/client.py", line 163, in cmdloop_with_keyboard_interrupt
    self.cmdloop(intro="")
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/cmd.py", line 142, in cmdloop
    stop = self.onecmd(line)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/cmd.py", line 221, in onecmd
    return func(arg)
  File "/Users/z/jsc/jsc/client.py", line 131, in fn
    return func(self, {k.lstrip("<").rstrip(">"): opt[k] for k in opt})
  File "/Users/z/jsc/jsc/client.py", line 239, in do_deploy
    state = recipe.run(self._rpc, rec, args['--dev'])
  File "/Users/z/jsc/jsc/recipe.py", line 22, in run
    state = rpc.call("rc_" + command, {"args": args, "state": state})
  File "/Users/z/jsc/jsc/sshjsonrpcposix.py", line 55, in call
    sys.stdout.flush()
IOError: [Errno 35] Resource temporarily unavailable

Adding the following to sshjsonrpc seems to solve the issue on OSX, but it might not be a good solution:

stdout_fd = sys.stdout.fileno()
flags = fcntl.fcntl(stdout_fd, fcntl.F_GETFL)
fcntl.fcntl(stdout_fd, fcntl.F_SETFL, flags & ~os.O_NONBLOCK)

revert is not using deploy to restore

Currently it actually uses the backup gasp

"This is essentially a deploy with a backup source instead of a recipe. The exact same steps is taken when reverting as when deploying except that instead of running the recipe files are decompressed and extracted to /app/code."

Add guidance in error messages.

Error messages shall not only state what's wrong but also help the user. E.g. When deploying a recipe to an non-empty assembly you get the following error:

code not clean while it IMO should say something like Deploying a recipe requires your code base to be empty. Use the command clean and try again.

I'm guessing there are other error messages that could use the same typ of changes.

Status and welcome not complete

jsc vX.Y attached to assembly [$ID] [$DESC] by [$NAME <$EMAIL>]
/app/code: x used of y (z % free)
deployed recipe: $RECIPE-NAME
at YYYY-MM-DD HH:MM:ss
total backups:
/app/state: x used of y (z % free)

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.