Skip to content

Commit

Permalink
Add audit history to Enterprise Edition (#202)
Browse files Browse the repository at this point in the history
* Start fleshing out sqlite backend

* Different direction

* Some more sketch progress

* More prgoress

* Drop order

* Closer

* Factor in pageId to panels

* At least one test passing, but generic inserts arent

* Basic tests working

* Refactoring ui state

* UI is type compiling

* Implement localstorage store

* Refactor for this

* Some basics working

* Fix for fmt

* Fixing up runner code

* No need to build/push image twice

* Switch to better-sqlite3

* Fix for tsc/format

* Some issues building better-sqlite3

* Stub test

* Unify server and desktop store

* tsc fixes

* More fixes

* Fixes for in-memory

* More fixes for in-memory

* Drop more postgres

* No need for project test

* updateProject helper

* tsc passing

* Getting closer on tests

* Most program tests passing!

* All program tests passing

* Encryption not yet working

* More evalcontext

* More cleanup

* More fixes for tests

* All but default project test working

* Remove default project test for now

* Drop exporter test for now

* Fixes for http test

* Fix for test format

* Drop fmt

* Drop rebuild step

* No need to remove gp

* Sketched out migration but tests failing weirdly

* Store tests working

* Fixes for panic-y library

* Fix for tests

* Just use existing settings file for now

* Just drop dashboard and exporter for now

* Fix for sql syntax

* Start ee

* Start sketching out ee

* More progress on build script

* Getting somewhere slowly

* More of history auditing and crud sketched out

* Setting up handlers for audit

* More tsc progress

* TypeScript is happy!

* TypeScript is reasonable for ee code

* Maybe getting somewhere

* Auditing working

* Auditable for both old and new

* Basics of audit working

* Start adding tests for audit

* More progress on tests, maybe

* Just use any

* Closer to history tests passing

* Add copyright

* Tests for all updates/deletes

* Bump jest settings

* Fixes for format

* Run tests and run copyright script

* Update name

* Update name

* Add win/mac

* At least something is working

* Catch all exceptions

* Hopefully fix for eval errors

* tsc is ok

* Errors working

* Add prettier

* Drop other actions for now

* Closer

* Again

* Default project working on browser mode but eval results not working

* tsc is happier

* Copyright

* Bump deps

* Add back existing tests

* More tests passing

* Fix for http test

* Drop some more deps

* Bump deps

* Fix macro test

* Read as binary
  • Loading branch information
eatonphil committed Mar 30, 2022
1 parent 1995c1c commit 9b7ac47
Show file tree
Hide file tree
Showing 57 changed files with 5,843 additions and 1,199 deletions.
94 changes: 94 additions & 0 deletions .github/workflows/ee_pull_requests.yml
@@ -0,0 +1,94 @@
name: Run ee tests

on:
pull_request:
branches: [main]

jobs:
test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ee

steps:
- uses: actions/checkout@master
with:
ref: ${{ github.ref }}

# FROM: https://github.com/actions/cache/blob/main/examples.md#node---yarn
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- run: cd .. && ./scripts/ci/prepare_linux.sh --integration-tests
- run: cd .. && yarn
- run: yarn
- run: yarn format
- run: yarn tsc
- run: cd .. && ./scripts/fail_on_diff.sh
- run: ./scripts/require_copyright.sh
- run: yarn test

macos:
runs-on: macos-latest

steps:
- uses: actions/checkout@master
with:
ref: ${{ github.ref }}

# FROM: https://github.com/actions/cache/blob/main/examples.md#node---yarn
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- run: ./scripts/ci/prepare_macos.sh
- run: yarn
working-directory: ee
- run: yarn test
working-directory: ee

windows:
runs-on: windows-latest

steps:
- uses: actions/checkout@master
with:
ref: ${{ github.ref }}

# FROM: https://github.com/actions/cache/blob/main/examples.md#node---yarn
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- run: ./scripts/ci/prepare_windows.ps1
shell: pwsh
- run: yarn
working-directory: ee
- run: yarn test
working-directory: ee
21 changes: 21 additions & 0 deletions .github/workflows/releases.yml
Expand Up @@ -5,6 +5,27 @@ on:
types: [published]

jobs:
build-server:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@master
with:
ref: ${{ github.ref }}

- run: ./scripts/ci/prepare_linux.sh
- run: echo "GIT_TAG=`git tag --points-at HEAD`" >> $GITHUB_ENV
- run: |
echo "RELEASE_ID=`curl -H 'Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' https://api.github.com/repos/multiprocessio/datastation/releases/tags/$GIT_TAG | jq '.id'`" >> $GITHUB_ENV
- run: yarn release-server $GIT_TAG
- name: Upload on release
run: |
curl --fail \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "Content-Type: application/zip" \
--data-binary @./releases/datastation-server-x64-$GIT_TAG.zip \
"https://uploads.github.com/repos/multiprocessio/datastation/releases/$RELEASE_ID/assets?name=datastation-server-x64-$GIT_TAG.zip"
build-linux-desktop:
runs-on: ubuntu-latest

Expand Down
5 changes: 4 additions & 1 deletion LICENSE.md
@@ -1,5 +1,8 @@
Copyright 2021-2022 Multiprocess Labs LLC

* All content that resides under the "ee/" directory of this repository, if that directory exists, is licensed under the license defined in "ee/LICENSE.md".
* Content outside of the above mentioned directories or restrictions above is available under the "Apache 2.0" license as defined below.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Expand All @@ -10,4 +13,4 @@ Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.

0 comments on commit 9b7ac47

Please sign in to comment.