Giter Club home page Giter Club logo

opctl's Issues

Add "Distribution" to spec

Registry:
op/collection list/search
op/collection push
op/collection pull
authorization
authentication

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

Suggestion: isParallel should apply to all ops that are running together (not just the N-1 after the first)

Current Behavior Example:

subOps:
- url: init
- url: buildProjA
- url: buildProjB
  isParallel: true
- url: buildProjC
  isParallel: true
- url: debug-node

The above means that buildProj{A,B,C} will run together. I believe this could be confusing and propose a different format:

subOps:
- url: init
- url: buildProjA
  isParallel: true
- url: buildProjB
  isParallel: true
- url: buildProjC
  isParallel: true
- url: debug-node

The behavior of the proposed format would be more readable (subjectively speaking here, others should feel free to weigh in), as I would understand that buildProj{A,B,C} are all running together as one parallel "block". In the current behavior, I'm led to think that only buildProj{B,C} are designated to run in parallel.

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.

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

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

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

Add call retry

User Story:
As an user of the spec
I want to declare retry behavior for a call
So that I can handle transient failure of calls

Example:

run:
  retry:
    strategy: exponential-backoff
    limit: 5
  op:
    ref: xyz

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)

'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

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

Merge engine-sdk-golang into sdk-golang

there are many common types and interactions between sdk-golang & engine-sdk-golang. Also, it is simpler conceptually for consumers if there is just one SDK

Serial/Parallel Sub Op Run Designation Via Block

specify serial/parallel via block

run:
  subOps:
    - serial:
      - url: serial-1_1
      - url: serial-1_2
    - parallel:
      - url: parallel-1
      - serial:
        - url: serial-2_1
        - url: serial-2_2
      - url: parallel-2
    - serial:
      - url: serial-3_1

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

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

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"

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

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

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.