Commit Graph

59 Commits

Author SHA1 Message Date
R Tyler Croy 42a10e3b9b
Automatically test parsing of all the .otto examples in the examples/ directory 2019-07-07 09:00:31 -07:00
R Tyler Croy 9f6a9f792a
Add a basic pipeline test
Will need to be more awake to write the rest of these tests 😸
2019-07-06 20:35:53 -07:00
R Tyler Croy 5bdd7b6c74
Finish up some testing of the configure block 2019-07-06 20:35:25 -07:00
R Tyler Croy 73461af8c1
Add tests for the configure block, and update the grammar to allow an empty block
There's no functional reason why anybody should really need an empty configure
block, but no reason not to have it
2019-07-06 19:20:52 -07:00
R Tyler Croy a16f43de59
Refactor the test support tooling for the parser. 2019-07-06 19:13:53 -07:00
R Tyler Croy 7ed36d55b3
Move the grammar into its own directory
Now with more real tests
2019-07-06 18:37:03 -07:00
R Tyler Croy 665532da25
Rename the notify rule to notifyExpr to avoid conflicts in generated Java
ANTLR4 will generate a `notify` method which causes a compile time error:

Otto.java:982: error: notify() in StageStatementsContext cannot override notify() in Object
                public NotifyContext notify() {
                                     ^
  overridden method is final
Otto.java:1831: error: notify() in Otto cannot override notify() in Object
        public final NotifyContext notify() throws RecognitionException {
                                   ^
  overridden method is final
2 errors

While we're not focusing on Java right now, ensuring some compilation works
properly is not a bad thing
2019-07-06 10:37:15 -07:00
R Tyler Croy 84fd6bcba7
Properly allow arbitrary ordering of macros and stages in the stages block 2019-07-06 10:37:14 -07:00
R Tyler Croy c23b088de1
Work in progress on implementing the basic grammar support for macros
There's still something off, but I'm checkpointing this here to make sure I
don't make any more changes 😸

The problem with the grammar as is, is that it fails to parse the stage after
the each macro in matrix.otto
2019-07-06 10:37:14 -07:00
R Tyler Croy 1c8e0a66ee
Add an example of a potential matrix type pipeline.
Still exploring the syntax here a bit. The expectation is that blah() syntax
would actually be invoking macros which would simple expand out at parse/compile
time.

In this example, the `each` macro would create four different stage blocks.
Inside of those macro blocks, the keyword `it` is introduced to represent the
item which is intended to be substituted.

Each of those stage blocks have a name created using the`concat` macro.
2019-07-06 10:37:14 -07:00
R Tyler Croy ff919ce892
Make the stage block behave more consistently like other blocks
None of the other blocks have parenthesis and take arguments the way the
stage(name) does. To make all blocks behave a bit more in line with one another,
this commit changes the behavior of naming stages to look more like a
generalized block settings.

This presages some macro work that's coming in the following commits.
2019-07-06 10:37:13 -07:00
R Tyler Croy 9307068785
Remove the when, feedback, and before blocks in favor of more understandable "gates"
This syntax makes it more clear the conditions not only that a stage can be
entered , but what conditions must be met in order for the stage to
exit/complete.

There's a slight nuance, which I am not certain at the moment is important with
'when' in the declarative Jenkins Pipeline syntax as it relates to 'enter' here.
The 'when' directive can be used to prevent a stage from being executed in a
flow, i.e. skipped. An "enter" however could mean "wait for this criteria to be met"
which might be confusing to a user, but I think this initial simplicity is worth
the experiment.

The "exit" is obviously a bit easier to understand, but where some nuance will
come later on is how we might determine/model what exit criteria should hold
onto cluster resources, versus a simple "listener" which requires no 'runtime'
2019-07-05 19:28:28 -07:00
R Tyler Croy 0f66174874
Clean up the cache use syntax to avoid the confusing re-use of "from"
In the context of the cache {} block, we don't want to use `from` to copy the
cache directives from another stage entirely, rather we want to "use" the named
cached entry.

I think it makes sense to allow caches to be pulled individually. Imagining a
case where a compilation stage might create multiple platform specific
directories or binaries. In such cases, a Windows test-specific stage would only
want to grab the cached entries for Windows, etc.
2019-07-05 18:39:09 -07:00
R Tyler Croy 34359b5d4f
Start describing the parser service and its role in the system
This is still just a sketch of what's in my brain. The internal representation
is likely going to have to evolve a lot more once the parser gets further along
2019-07-04 20:02:47 -07:00
R Tyler Croy 0df23d721e
Implement a grammar and lexer with Antlr4 capable of actually parsing an example
This of course comes with no actual implementation, but it at least provides a
grammar to start with.  There's likely some cleanup in the rules and edge cases
that are missing, but this is a start.
2019-07-04 17:33:19 -07:00
R Tyler Croy cc2a9fdedc
Add the antlr4 dependency for working on the parser 2019-07-04 09:40:50 -07:00
R Tyler Croy a841198910
Add support for blackbox testing the API for the orchestrator with dredd
This requires some shenanigans with the headers of the response, since
Feathers/Express likes to augment the Content-Type with the charset field. The
charset field throws dredd off for some silly reason, so this might trimming in
some express middleware later
2019-07-03 11:46:26 -07:00
R Tyler Croy 21a4ebadcc
Bootstrap the orchestration service from a common configuration 2019-06-25 20:44:59 -07:00
R Tyler Croy a8f4c889fe
Bring in the common function for starting all feathers applications 2019-06-25 19:17:02 -07:00
R Tyler Croy ab578dd8b8
Rely on module-alias to run the packages for now 2019-06-25 19:08:47 -07:00
R Tyler Croy f66b39c8d7
Start experimenting with a multi-module typescript application
With some inspiration from
https://medium.com/@jeffkhull/a-typescript-monorepo-without-lerna-7805920c370f
2019-06-25 19:08:47 -07:00
R Tyler Croy fb4143692e
Remove Cargo in the base directory 2019-06-25 19:08:26 -07:00
R Tyler Croy 7588d7955c
Remove all the rust experimentation to experiment with only TypeScript 2019-06-25 18:18:44 -07:00
R Tyler Croy 936e53afa3
Implement the actual lookup of channels in the server, /v1/channel/<name> 2019-06-15 11:29:53 -07:00
R Tyler Croy 52ac229bf2
Remove multiple supported event types from the orchestrator
As of now, the rust-server codegen will default to the XML version, and cannot
handle multiples unfortunately.
2019-05-26 11:45:26 -07:00
R Tyler Croy 259fa6fcc6
Update the eventbus APi spec and generate useful stubs
Now getting to the point where I can implement the actual logic behind the
scenes of this API.

Fun
2019-05-26 11:40:32 -07:00
R Tyler Croy adbdfc8bd3
Explore dredd for API testing 2019-05-25 15:28:28 -07:00
R Tyler Croy 8ab484429c
Point swagger-ui to a local eventbus 2019-05-24 21:43:38 -07:00
R Tyler Croy bdfae84dcd
Regenerate the eventbus API stubs 2019-05-24 21:26:34 -07:00
R Tyler Croy f8fe44f547
Flesh out the basics for the remainder of the eventbus API
It's like Kafka over HTTP
2019-05-24 21:10:07 -07:00
R Tyler Croy 876f1fe5b6
Upgrade swagger-codegen for slightly better rust output 2019-05-24 21:09:26 -07:00
R Tyler Croy 6cfcb6520a
Begin to describe the orchestrator REST API with Swagger 2019-05-24 20:13:44 -07:00
R Tyler Croy 3f7f0afcd1
Revert "Testing out newer versions of hyper/tower with generated code"
This reverts commit d6f737b606.
2019-05-24 18:13:19 -07:00
R Tyler Croy d6f737b606
Testing out newer versions of hyper/tower with generated code
It uh, did not go well
2019-05-24 18:12:45 -07:00
R Tyler Croy e34bf90526
fixup! Nuke the data-store/ which had a stub 2019-04-24 19:47:50 -07:00
R Tyler Croy 568c7e7a8c
Nuke the data-store/ which had a stub 2019-04-05 19:53:02 -07:00
R Tyler Croy c47ed8c5f3
Restructure the eventbus project to make a little more sense
I'll emulate this model elsewhere
2019-04-05 19:48:40 -07:00
R Tyler Croy 1d109dd15d
Remove the unnecessary bus/ directory 2019-04-05 19:38:46 -07:00
R Tyler Croy 28cfb4c2da
Add a swagger codegen version of the eventbus API which is still 💩
I'm still noodling through how the eventbus HTTP API should look. My current
thinking is that it should approximately support Kafka like semantics, since
that's the likely first "real" backing implementation of eventbus
2019-03-27 21:03:42 -07:00
R Tyler Croy 18e2c2f531
Add the swagger-codegen script for generating stubs from API specs 2019-03-27 19:46:23 -07:00
R Tyler Croy 2ee63c219b
Add the Ampelmann mascot
From the GDR and in public domain 😆

    https://en.wikipedia.org/wiki/Ampelmann
2019-03-27 19:14:40 -07:00
R Tyler Croy 5b34cb5a88
Implement the rust agent in more or less the same fashion as the Node one
Still not really doing anything worth a damn, but at least we're grabbing the
manifest and doing something with it at this point.

I still don't know squat about rust
2019-03-26 21:35:57 -07:00
R Tyler Croy b77f8a934a
Add linting and connect the basic agent to the basic orchestrator
This still isn't really doing anything useful, just experimenting with what
things _could_ look like
2019-03-26 20:41:50 -07:00
R Tyler Croy 321586151b
Experimenting with building a native Node binary for an agent 2019-03-26 17:43:47 -07:00
R Tyler Croy c7c6450c97
Fix a typo or two in the README 2019-03-14 07:25:03 -07:00
R Tyler Croy 3ce4fcdd3f
Checking in some rust-based agent experimentation and an orchestrator stub
I clearly don't know anything about Rust thus far, but was just experimenting
with what it might look like to build an agent that requests JSON over HTTP
might look like.
2019-03-02 09:54:53 -08:00
R Tyler Croy cc00025683
Merge branch 'rust-services' 2019-02-24 16:59:16 -08:00
R Tyler Croy 2ae3b1c937
Add the initial thoughts on the execution manifests for the agents 2019-02-23 22:21:32 -08:00
R Tyler Croy f4009a7717
Hide success messages from the prereqs scripts 2019-02-23 17:28:17 -08:00
R Tyler Croy 0e77bb627d
First half of the Otto systems design 2019-02-23 17:27:55 -08:00