Commit Graph

97 Commits

Author SHA1 Message Date
R Tyler Croy df9169541b
Add a little logomoji 2019-12-28 13:30:00 -08:00
R Tyler Croy e77182fe18
Wire through the actual Subscribe command for the client onto the bus 2019-12-28 13:28:43 -08:00
R Tyler Croy 853966b4e1
Implement the basic command structure for serializing to JSON and back over WS 2019-12-28 13:07:01 -08:00
R Tyler Croy 5e42925927
Support configuring the channels directly from our configuration
This required the concepts of stateful and stateless channels to be introduced,
which will have different persistence guarantees.

The two types of channels will help the eventbus determine where it can be cheap
and efficient, and where it should involve more expensive storage. When I think
of an eventbus interface implemented on top of Redis, I would use BLPOP lists
for stateful channels and pub/sub for stateless channels.
2019-12-27 16:04:23 -08:00
R Tyler Croy 520e6b7a31
Add some simplistic configuration via eventbus.yml
I'm well aware that there's a borrow error waiting to happen on `settings`
below, but since I'm only needing one setting right now, 🤷
2019-12-27 14:33:22 -08:00
R Tyler Croy eed0eaa1c8
Start passing around messages internally which can be serialized to JSON
Everything over the websocket connection should be JSON
2019-12-27 12:54:44 -08:00
R Tyler Croy f5bfbdbf36
Wire together the websocket<->eventbus pulse for maintaining our connection
This is a little ugly, but it works end to end
2019-12-27 12:17:10 -08:00
R Tyler Croy 1d1b2363a4
Checkpointing the upgrade to actix-web 2.0 since things are back to working
It's taken some poking around to make this all work again, jeepers
2019-12-27 11:26:41 -08:00
R Tyler Croy 01b9986aef
Upgrade to actix-web 2.0.0
This breaks _everything_ 😸
2019-12-27 11:26:40 -08:00
R Tyler Croy 8dcf1bb076
Still working through wiring the bus to the client actors 2019-12-27 11:26:40 -08:00
R Tyler Croy 890b8f675f
Incorporate the newer actix-web components which use async/await
This commit also brings in some templates and rust-embed which is a pretty
common pattern I expect to use among all the other services
2019-12-27 11:26:40 -08:00
R Tyler Croy bf591d22d2
eventbus cargo scaffold 2019-12-27 11:26:39 -08:00
R Tyler Croy e4473f2e3b
Add a standin RFC template for the resource allocation topic 2019-12-14 08:59:52 -08:00
R Tyler Croy d55f7f60ca
Remove all the TypeScript code to start over again with something different 2019-12-13 21:03:46 -08:00
R Tyler Croy 55824515ce
Merge pull request #21 from rtyler/diagram
Add a rough system diagram from my notebook
2019-07-27 11:23:04 -07:00
R Tyler Croy f4397eb476
Add a rough system diagram from my notebook
The entities represented I believe are the bare minimum number of services
necessary to make things roughly work. The idea being that everything
effectively orients around the eventbus, and "extensibility" means tuning into
or publishing events rather than in-memory anything.

Fixes #20
2019-07-27 10:21:28 -07:00
R Tyler Croy 8bcd4c3e3f
Merge pull request #19 from rtyler/dependabot/npm_and_yarn/lodash-4.17.14
Bump lodash from 4.17.11 to 4.17.14
2019-07-14 11:12:59 -07:00
dependabot[bot] 9412b83c1b
Bump lodash from 4.17.11 to 4.17.14
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.11 to 4.17.14.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.11...4.17.14)

Signed-off-by: dependabot[bot] <support@github.com>
2019-07-14 18:12:44 +00:00
R Tyler Croy 49bccae727
Merge pull request #18 from rtyler/minor-tool-fixes
Some minor tooling cleanups
2019-07-14 11:12:30 -07:00
R Tyler Croy 8b87fac83c
Allow an environmental override of the default log level for @otto/logger 2019-07-14 11:09:51 -07:00
R Tyler Croy 4c14f2b259
Move the tsconfig.base.json back to tsconfig.json
The originally idea here was that I would use the tsconfig.base.json to extend
in various submodules. As it stands right now, the submodules having their own
configuration doesn't quite make sense
2019-07-14 11:09:50 -07:00
R Tyler Croy 6efcd1856c
Add some module alias configuration for the parser 2019-07-14 11:09:46 -07:00
R Tyler Croy ac939ab806
Merge pull request #17 from rtyler/dependabot/npm_and_yarn/agents/node-basic/lodash-4.17.14
Bump lodash from 4.17.11 to 4.17.14 in /agents/node-basic
2019-07-13 14:51:23 -07:00
dependabot[bot] 3ee8a54f81
Bump lodash from 4.17.11 to 4.17.14 in /agents/node-basic
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.11 to 4.17.14.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.11...4.17.14)

Signed-off-by: dependabot[bot] <support@github.com>
2019-07-13 01:03:06 +00:00
R Tyler Croy 18971079dd
Merge pull request #10 from rtyler/parser-testing
Testing the parser syntax for errors, etc
2019-07-07 11:28:34 -07:00
R Tyler Croy 75069fab67
Introduce ts-lint and clean everything up a bit 2019-07-07 11:27:44 -07:00
R Tyler Croy e7ecc6574a
Remove some unnecessary semi-colons 2019-07-07 11:10:27 -07:00
R Tyler Croy 8ddfa393a4
Scaffolding out the internal representation of the otto file format
This is just me thinking out loud in code, I'll likely restructure this a
couple times before I'm happy with it
2019-07-07 09:51:05 -07:00
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 289fe772e1
Merge pull request #4 from rtyler/matrix-syntax
Add grammar support for macros, which enable matrix use cases
2019-07-07 08:45:11 -07:00
R Tyler Croy 3f7433abb1
Merge pull request #3 from rtyler/gates
Remove the when, feedback, and before blocks in favor of more understandable "gates"
2019-07-07 08:43:35 -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 8ce9053d52
Add a reporting email address 2019-07-06 11:26:32 -07:00
R Tyler Croy 2dea897b92
Add the code of Contributor Covenant 1.4 document 2019-07-06 11:26:31 -07:00
R Tyler Croy 7d48b6aa4d
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-06 11:26:31 -07:00
R Tyler Croy 8ed233d854
Add a link to the IRC channel 2019-07-06 11:08:02 -07:00
R Tyler Croy 59d7a5d91e
Merge pull request #6 from rtyler/dependabot/npm_and_yarn/agents/node-basic/handlebars-4.1.2
Bump handlebars from 4.1.1 to 4.1.2 in /agents/node-basic
2019-07-06 10:56:47 -07:00
R Tyler Croy 0a0323ec72
Merge pull request #5 from rtyler/dependabot/npm_and_yarn/agents/node-basic/js-yaml-3.13.1
Bump js-yaml from 3.13.0 to 3.13.1 in /agents/node-basic
2019-07-06 10:56:39 -07:00
dependabot[bot] 761bd82baf
Bump handlebars from 4.1.1 to 4.1.2 in /agents/node-basic
Bumps [handlebars](https://github.com/wycats/handlebars.js) from 4.1.1 to 4.1.2.
- [Release notes](https://github.com/wycats/handlebars.js/releases)
- [Changelog](https://github.com/wycats/handlebars.js/blob/master/release-notes.md)
- [Commits](https://github.com/wycats/handlebars.js/compare/v4.1.1...v4.1.2)

Signed-off-by: dependabot[bot] <support@github.com>
2019-07-06 17:55:10 +00:00
dependabot[bot] f17c712580
Bump js-yaml from 3.13.0 to 3.13.1 in /agents/node-basic
Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 3.13.0 to 3.13.1.
- [Release notes](https://github.com/nodeca/js-yaml/releases)
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodeca/js-yaml/compare/3.13.0...3.13.1)

Signed-off-by: dependabot[bot] <support@github.com>
2019-07-06 17:55:03 +00: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