This change adds a new flag for emitting plan bundles in the new protobuf wire format. `opa build --format=json|proto`. With `--format=proto`, the bundle contains `/plan.pb` and `/.manifest.pb` in place of `/plan.json`and `/.manifest`. Bundle Reader auto-detects both forms; mixed-format bundles are rejected at read, merge, and write time.
Signed-off-by: Sebastian Spaink <sebastianspaink@gmail.com>
- Added two more community champions
- Removed enterprise support from community page
- Changed blurry line to solid line
- Updated newsletter signup from Medium to Mailchimp
- add hugo lock to gitignore
Signed-off-by: Peter ONeill <peteroneilljr@gmail.com>
This moves the package from:
github.com/open-policy-agent/golang-opa-wasm/opa
to:
github.com/open-policy-agent/opa/wasm/sdk/opa
This avoids callers from having to do much in the way of changes
besides adjusting the import path.
Signed-off-by: Patrick East <east.patrick@gmail.com>
This includes some refactors to the build steps. High level items:
* Add variables for DOCKER_IMAGE, S3_RELEASE_BUCKET to allow for forks
of OPA to re-use the GitHub actions with their own s3 buckets and
docker orgs/image names.
* Unify the release build steps to use `make release` and the binaries
being located under `_release/$(VERSION)`. All CI targets now rely
on binaries being in that `RELEASE_DIR`, including image building
steps The `make build` target is unaffected.
* Add a wrapper to allow the CI to run the various golang target
stages separately, but sharing the same docker configuration.
* Conditionally specify `-it` for docker run commands based on whether
A tty is available.
* Added scripts to automate drafting a release with binary assets vi
the `hub` CLI.
* The release process triggered on a tag being pushed will now use the
same binaries from `make release` for the docker images as well as
the ones attached to the release (which are available under
https://openpolicyagent.org/downloads/).
The actions themselves are split into 3 workflows:
pull-request.yaml:
Triggers on pull requests. This will run all the normal tests/checks
as before on Travis, however they are now split into separate jobs.
In addition to what was done on Travis we will now have Codecov
results included.
post-merge.yaml:
Triggers after a change is pushed to master. This will run tests and
build+publish the `edge` and `dev` artifacts to dockerhub and s3.
post-tag.yaml:
Triggers after a tag has been pushed. Similar to post-merge.yaml it
will run tests and build+publish release artifacts (for the tagged
version). It will also create a draft release on GitHub with the
same artifacts and notes from the CHANGELOG.md. If a release already
exists it will be updated to include the assets, however the release
notes will _not_ be added.
The RELEASE.md steps have been updated and include notes on the new
steps.
Signed-off-by: Patrick East <east.patrick@gmail.com>
This updates the Makefile targets to remove the hugo-only options for
development, as well as clarifying/simplifying the requirements for
a dev environment. There are now really two options: just look at the
markdown preview with your editor/ide, or install the tools locally
and deploy the full site.
We can likely improve the dev experience some more (would be nice to
get back to the live content updating dev experience) but for now this
should help remove some confusion about how to build and run the site.
Signed-off-by: Patrick East <east.patrick@gmail.com>
This commit combines a few changes to the build. Namely:
1. The travis build no longer works off a dirty working copy. The
.dockerignore file was excluding the docs directory which caused the
working copy to become dirty during the build process. While this
isn't a huge issue it does make it harder to be confident about the
state of the source that Travis binaries are built from. As part of
this change, we remove the builder image in favour of running the
golang image and volume mounting the working copy. This is avoids the
copy that is quite expensive in the OPA repo.
2. In the recent build refactoring, the wasm development workflow was
broken. Changes to the wasm library were not getting picked up
automatically when running the wasm/rego tests. This commit fixes the
makefile so that the wasm libary is rebuilt and the wasm blob is
copied and regenerated each time the wasm/rego tests are run.
Finally, this commit leans into modules a bit more removing the
scheduler test dependency on GOPATH.
Signed-off-by: Torin Sandall <torinsandall@gmail.com>
The build was broken becasue the fuzzer artifacts were showing up in
the working copy and were owned by root once they got built inside of
a Docker image. This change updates the build to create an image for
the fuzzer to run inside of. The image can be shared across both
fuzzer runs and the artifacts are contained inside the image and don't
pollute the working copy.
Signed-off-by: Torin Sandall <torinsandall@gmail.com>
These changes just update the build process for the new front page. As
part of these changes, the build should now be run under the host user
account instead of as root (this fixes the issue for site build
artifacts being owned by root.) To make that work the gitbook and npm
directories used by the docs build process need to be located under the
root directory so that they're writable by the user.
With these changes, the first time you build the site locally gitbook
needs to be installed but after that it's cached locally in the .gitbook
directory (so subsequent builds are fast when coupled with the vendored
node_modules for the gitbook plugins).
Signed-off-by: Torin Sandall <torinsandall@gmail.com>
These changes add a C library that implements low-level data operations
and JSON parsing for WASM policies. The output of the WASM build process
are checked into the repository so that OPA can easily access the
bytecode for test and other purposes.
Signed-off-by: Torin Sandall <torinsandall@gmail.com>
These changes add a build command that writes out a policy.wasm file by
compiling an input query to WASM. These changes also add a simple
compile interface to the rego package.
Signed-off-by: Torin Sandall <torinsandall@gmail.com>
These changes contain a redesign of the OPA website. The main changes
are (1) new frontpage w/ refreshed messaging and assets and (2) docs
ported to gitbook.
- Add script to build release artifacts from inside a container. In the past,
release artifacts have been created from a clean checkout, but this should be
much more reliable.
- Add script to generate release patch from tip. In the past, the release
patch changes have been made manually.
- REST APIs
* CRUDL on policy modules
* Ad-hoc queries
* Query and patch base documents
* Query virtual documents
- Add PolicyStore to manage policy definition/module CRUDL operations.
* Supports persistence of policy definitons.
* Serve REST API CRUDL operations.
* Manage install/uninstall of rules into data store.
* Manage persistence of policy definitions.
- Misc. refactoring
* Move storage creation into runtime Init.
* Make AST types JSON serializable. Tweaked ast.Import to use Term instead
of Value for the path.
- Introduced new run command that lets users start an instance of OPA.
- Added basic REPL as first mode that can be run, server mode coming soon.
- Extended Storage to support a JSON Patch like interface.
The special iterator variable ("_") is not supported yet. The _ variable will
be handled by mangling the variable name while parsing the rules (which are
still to come).
Also refactored terms to use type declaration and type switches. All terms are
now represented by underlying Go types without relying on extra structs. The
Kind attribute on Term has been removed in favour of type switches.
Lastly, removing the generated parser from the repository for now. Once the
grammar has stabilized, we can add the generated code back. The diffs were
unpleasant.
- Updated source code layout to use standard Go project structure.
- Makefile for build and test execution.
- Glide for dependency management.
- Integrated spf13/cobra for command line entry point.
- Added docs on release and development process.