opctl / opctl Goto Github PK
View Code? Open in Web Editor NEWFree and open source automation platform
Home Page: https://opctl.io
License: MIT License
Free and open source automation platform
Home Page: https://opctl.io
License: MIT License
If an ops entrypoint returns a non-zero exit code, the exit code of the op will incorrectly be set to 0.
This is a regression as of v0.1.1
ContainerStd*WrittenToEvent.Data doesn't represent a single write to stdErr/stdOut
This causes the consumer to have no way to correctly reconstruct the data
Registry:
op/collection list/search
op/collection push
op/collection pull
authorization
authentication
see opspec-io/spec#1
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
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.
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.
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
opspec-io/spec#1
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
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
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
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)
Presumably, the client should error out or do something other than appearing to work.
repro:
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
Tried to run the sample at: https://github.com/opspec-io/spec/blob/master/examples/azure/create-resource-group/op.yml with the following:
opctl run -c azure/ -a location=asia create-resource-group
this is an issue to track socket input/output support
If I have sibling ops with isParallel
flag set, when one of them starts with an outcome of failed
, the siblings should be killed immediately.
setup
expected
display msg value from environment invalid & prompt for value
actual
validation error displayed over and over again in infinite loop
User Story:
As a user of the CLI
I would like the ability to specify the format of the output
In order to use it directly from tools supporting particular formats
Reference:
Azure CLI
AWS CLI
Docker CLI
k8s kubectl
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
when docker-compose errors on building a service, the OpRun's exit code is not correct.
User Story:
As the author of an op
I would like the ability to declare the version of opspec my op uses in
In order to formalize the version being used
Reference:
Azure Resource Manager Template Format
Currently events are just held in memory.
A proper event store needs to be implemented
User Story:
As the author of an op
I would like the ability to declare the allowed values of a string input
In order to formalize its set of allowed values
Reference:
AWS Cloud Formation Template Parameters
Azure Resource Manager Template Parameters
User Story:
As a user of the CLI
I would like node creation to be automatic
In order save me from having to create a node
setup
opctl events
; don't close itexpected
output should be the same
actual
output from run
cmd is incomplete
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
repro:
opctl node create
opctl node kill
expected:
the node process created from 1) is killed by 2)
actual:
the node process keeps running
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
setup
expected
both ops fail and input validation error displayed
actual
child fails but parent succeeds
fix: pass the same env vars to docker-compose down
as were passed to docker-compose up
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
Currently if events contain secret params the secrets are visible in plain text.
Now that the context package is part of standard lib; we should update all existing code paths to pass/make use of it
it is desirable to run multiple ops simultaneously with the same name.
currently this is unsupported as the first one to finish will result in the others prematurely exiting with code 137
according to docker recommendations;
engine container should be started with --network host
arg
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"
In order to enable running ops in parallel, we need a way to indicate they should be:
Something like adding an isParallel
flag to
https://github.com/opspec-io/spec/blob/master/op-file.md#sub-op
Containerd has a pretty enticing advertisement:
It is a narrower, more purposeful dependency than all that is and will be docker
If an op is running and an op from the same collection is run, it will cause both ops to end immediately with non-zero exit codes.
setup
expected
the env var value is printed
actual
nothing is printed because the env var has no value
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.