Giter Club home page Giter Club logo

opctl's Introduction

Support Ukraine

The opctl project deeply opposes Vladimir Putins evil, unprovoked killing and war on the brave and courageous people of Ukraine.

We encourage you to support Ukraine any way you can.

πŸ‡ΊπŸ‡¦ We stand with Ukraine πŸ‡ΊπŸ‡¦

Badges

Build Go Report Card Coverage

Be advised: this project is currently at Major version zero. Per the semantic versioning spec: "Major version zero (0.y.z) is for initial development. Anything may change at any time. The public API should not be considered stable."

Documentation

see website

Used By

These awesome companies use opctl. represent by adding yours (or one you know of) to the list!

Support

join us on Slack or open an issue

Releases

releases are versioned according to semver 2.0.0 and tagged; see CHANGELOG.md for release notes

Contributing

see CONTRIBUTING.md

opctl's People

Contributors

apexskier avatar chrisdostert avatar dependabot[bot] avatar ehsanul avatar ethanyoung avatar gunnarg-remitly avatar lmarszal avatar luisgarciaalanis avatar poppuyo avatar psamaan avatar sudhindrakovalam avatar zachpuck avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

opctl's Issues

Path handling via `run` command broken on Windows

OpEncounteredError Id='09404bcc0352415b6f56c4b5e72ee505' OpRef='/c/\Users\chris\repos\github.com\opspec-io\spec\examples\nodejs/.opspec/test-unit' Timestamp='2017-02-22T16:14:08Z'
Msg='open /c/\Users\chris\repos\github.com\opspec-io\spec\examples\nodejs/.opspec/test-unit/op.yml: The system cannot find the path specified.'

OpEnded Id='09404bcc0352415b6f56c4b5e72ee505' OpRef='/c/\Users\chris\repos\github.com\opspec-io\spec\examples\nodejs/.opspec/test-unit' Outcome='FAILED' Timestamp='2017-02-22T16:14
:08Z'

notice the paths are not valid

`run` cmd output differs from `events` cmd output

setup

  1. create an op w/ a container
  2. open a terminal and run opctl events; don't close it
  3. open a different terminal and run the op you created
  4. run op
  5. compare output of both terminals

expected
output should be the same

actual
output from run cmd is incomplete

Pool request for address space can fail

Error text: "failed to parse pool request for address space "LocalDefault" pool "" subpool "": could not find an available predefined network"

Fix: docker network rm (all non-default networks)

Add "OpRunLogEntryEmittedEvent" Type

A desirable use case is to listen for all log entries associated with a given root op run.

Currently this is not supported as log entries do not contain the root op run id

Creating an explicit OpRunLogEntryEmitted event type would enable this use case.

Output bound to env var not observed

setup

  1. create an op
  2. create a second op w/ an input, a container, and the input bound to an env var set in the container
  3. reference the second op (child) from the first (parent)
  4. create a third op w/ the output from the second op passed as an input, a container, and the input echo'd to stdout within the container
  5. run the first (parent) op

expected
the env var value is printed

actual
nothing is printed because the env var has no value

Show warning when dir(s) exist in an op collection that aren't valid ops

Only really ran into this when I ran opctl ls inside a collection of ops that were on the "stable" version while I was running the "beta" channel. I was briefly confused that I saw a subset of the ops I was expecting to see, and then I realized that it must be due to running in beta.

Suggested initial/naive implementation:

  • Look at the sudirectories of .opspec
  • Decide which of these translate to valid ops
  • Show a warning (think compiler warnings) showing which directories didn't yield valid ops

Node check doesn't work on Windows

PS C:\WINDOWS\system32> opctl events
error while listing nodes: findErr was: OpenProcess: The parameter is incorrect.
error while killing node: findErr was: OpenProcess: The parameter is incorrect.
created node w/ PID: 7056

this results in the node being re-created every time you run the events or run command

Add "Get op graph" use case

As a consumer of the API
I would like to obtain the state of, & references between, all ops and/or containers in a given op graph
in order to visualize/debug it

invalid format crashes node

jason@arondight:~$ opctl node create
panic: format must be a valid format int

goroutine 19 [running]:
panic(0x822640, 0xc4202bff20)
	/usr/local/go/src/runtime/panic.go:500 +0x1a1
github.com/opspec-io/opctl/vendor/github.com/opspec-io/sdk-golang/pkg/validate.validate.stringParam(0xc4202cc900, 0xc4202c8b70, 0x88aa20, 0x0, 0x0)
	/go/src/github.com/opspec-io/opctl/vendor/github.com/opspec-io/sdk-golang/pkg/validate/param.go:67 +0x5ab
github.com/opspec-io/opctl/vendor/github.com/opspec-io/sdk-golang/pkg/validate.validate.Param(0xc4202cc900, 0xc42032b340, 0x40, 0x88aa20, 0xc420330001)
	/go/src/github.com/opspec-io/opctl/vendor/github.com/opspec-io/sdk-golang/pkg/validate/param.go:24 +0x1d6
github.com/opspec-io/opctl/vendor/github.com/opspec-io/sdk-golang/pkg/validate.(*validate).Param(0xb22730, 0xc4202cc900, 0xc42032b340, 0xa, 0xb238a0, 0x0)
	<autogenerated>:2 +0x60
github.com/opspec-io/opctl/pkg/node/core._opCaller.Call(0xae8b20, 0xc4202da0c0, 0xae5de0, 0xc4202d2180, 0xae6ba0, 0xc4202d8160, 0xadfe20, 0xc4202da140, 0xadffa0, 0xb22730, ...)
	/go/src/github.com/opspec-io/opctl/pkg/node/core/opCaller.go:113 +0x2f2
github.com/opspec-io/opctl/pkg/node/core.(*_opCaller).Call(0xc4202d40c0, 0xc4202d2ae0, 0xc4202d8a00, 0x20, 0xc4202da8c0, 0x3d, 0xc4202d8a00, 0x20, 0x0, 0x0, ...)
	<autogenerated>:17 +0xe2
github.com/opspec-io/opctl/pkg/node/core._core.StartOp.func1(0xae6320, 0xc4202d8120, 0xae5de0, 0xc4202d2180, 0x0, 0x0, 0xae1ce0, 0xc4202e60a0, 0xae6ba0, 0xc4202d8160, ...)
	/go/src/github.com/opspec-io/opctl/pkg/node/core/startOp.go:24 +0x8c
created by github.com/opspec-io/opctl/pkg/node/core._core.StartOp
	/go/src/github.com/opspec-io/opctl/pkg/node/core/startOp.go:25 +0x162

"null" op causes error

jason@arondight:~/scribbles/opdocs$ sudo opctl run happy-birthday-op
OpStarted Id='4ee9c7e87d264448653c6aacdcc6b6f7' OpRef='/home/jason/scribbles/opdocs/.opspec/happy-birthday-op' Timestamp='2017-03-06T01:24:49Z'

Event channel closed unexpectedly

Here was the op in question:

name: happy-birthday-op
description: this is an op that wishes a happy birthday
inputs:
  name:
    string:
  age:
    number:

Child op input validation failure doesn't fail parent op

setup

  1. create an op w/ no inputs
  2. create a second op w/ an input constraint
  3. reference the second op (child) from the first (parent)
  4. run the first (parent) op

expected
both ops fail and input validation error displayed

actual
child fails but parent succeeds

Many parallel ops crash engine

When running many parallel ops 20-30, the engine will become unresponsive and eventually crash.

$ docker logs opctl_engine
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0xc0 pc=0x570f07]

goroutine 8 [running]:
panic(0x860d40, 0xc82000a090)
    /usr/local/go/src/runtime/panic.go:481 +0x3e6
github.com/opctl/engine/tcp/models.NewEventMsg(0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
    /go/src/github.com/opctl/engine/tcp/models/eventMsg.go:16 +0x107
github.com/opctl/engine/tcp.getEventStreamHandler.ServeHTTP.func3(0xc8202800e0, 0xc8201c6de0, 0x7fb8c300d0e0, 0xc82027a270, 0xc82006fc00)
    /go/src/github.com/opctl/engine/tcp/getEventStreamHandler.go:66 +0xf5
created by github.com/opctl/engine/tcp.getEventStreamHandler.ServeHTTP
    /go/src/github.com/opctl/engine/tcp/getEventStreamHandler.go:80 +0x2cd

Migrate from docker to containerd

Containerd has a pretty enticing advertisement:

  • embeddable
  • both windows and linux support
  • only does single host (good for p2p story where multi-host orchestration should be left up to opctl)

It is a narrower, more purposeful dependency than all that is and will be docker

Add opspec 0.1.3 support

Story:
As a user of the engine
I would like support for opspec 0.1.3
In order to integrate with the latest version of the spec

Make sub ops errors more clear from parent ops

When an error occurs in a sub-op; rather than repeating the error from the child, the parent should have a clearer message noting a child failed and giving reference to the child.

proposed message: "child op w/ id: xyz failed"

'op run' hangs powershell on Windows

repro:

  1. open a powershell terminal on Windows
  2. clone a fresh copy of https://github.com/opspec-io/spec
  3. cd examples/nodejs
  4. opctl run install-deps

expected:
op runs to completion, displays ContainerExited & OpEnded events, and exits

actual:
op never shows ContainerExited or OpEnded events and never exits; ctrl +c doesn't work either

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.