Skip to content

Commit

Permalink
Merge branch 'main' into feat/js-runtime-conformance
Browse files Browse the repository at this point in the history
  • Loading branch information
QuiiBz committed May 31, 2023
2 parents 0d2c3b0 + 6bf824d commit 222dc4d
Show file tree
Hide file tree
Showing 31 changed files with 1,740 additions and 1,067 deletions.
12 changes: 4 additions & 8 deletions .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,10 @@
}
],
"commit": false,
"fixed": [
[
"@lagon/runtime",
"@lagon/js-runtime"
]
],
"fixed": [["@lagon/runtime", "@lagon/js-runtime"]],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch"
}
"updateInternalDependencies": "patch",
"privatePackages": { "version": true, "tag": true }
}
5 changes: 5 additions & 0 deletions .changeset/flat-rabbits-shake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@lagon/serverless': minor
---

Release container image
5 changes: 5 additions & 0 deletions .changeset/hungry-geckos-tap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@lagon/dashboard': patch
---

Fix domain status when proxied through Cloudflare
5 changes: 5 additions & 0 deletions .changeset/lemon-ducks-learn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@lagon/cli': patch
---

Reduce loading animation ticks
5 changes: 5 additions & 0 deletions .changeset/neat-otters-live.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@lagon/serverless': patch
---

Fix logs time-to-live
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ dist/
.env
.eslintcache
crates/serverless/deployments/
docker/
70 changes: 70 additions & 0 deletions .github/workflows/container.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Container

on:
push:
branches:
- main
tags:
- '@lagon/serverless@*'
pull_request:

env:
DOCKER_HUB_USER: lagonapp

jobs:
create-container-image:
name: Create "${{matrix.image}}" container image
runs-on: ubuntu-latest
strategy:
matrix:
# image: [serverless, dashboard]
image: [serverless]
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
${{ env.DOCKER_HUB_USER }}/${{matrix.image}}
ghcr.io/${{ github.repository_owner }}/${{matrix.image}}
tags: |
type=ref,event=tag,prefix=@lagon/${{matrix.image}}@
type=ref,event=pr
type=raw,value=next,enable={{is_default_branch}}
- name: Login to ghcr.io registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Login to Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
username: ${{ env.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v4
if: "!startsWith(github.ref, 'refs/tags/') || contains(github.ref, matrix.image)" # only execute if not tag or tag with specific matrix image
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
file: docker/Dockerfile.${{matrix.image}}
platforms: ${{ github.event_name == 'pull_request' && 'linux/amd64' || 'linux/amd64,linux/arm64' }} # only build for amd64 on PRs to speed up CI job
116 changes: 93 additions & 23 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/cli/src/utils/console.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ pub fn print_progress(message: &str) -> impl Fn() + '_ {
}

handle.tick();
tokio::time::sleep(Duration::from_millis(10)).await;
tokio::time::sleep(Duration::from_millis(50)).await;
}
});

Expand Down
4 changes: 2 additions & 2 deletions crates/runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ version = "0.1.0"
edition = "2021"

[dependencies]
v8 = "0.71.2"
v8 = "0.73.0"

[dev-dependencies]
tokio = { version = "1", features = ["rt", "time", "macros"] }
flume = "0.10.14"
httptest = "0.15.4"
lagon-runtime-http = { path = "../runtime_http" }
lagon-runtime-isolate = { path = "../runtime_isolate" }
log = { version = "0.4.17", features = ["std", "kv_unstable", "kv_unstable_serde"] }
log = { version = "0.4.18", features = ["std", "kv_unstable", "kv_unstable_serde"] }
serial_test = "2.0.0"
hyper = { version = "0.14.26", features = [] }

Expand Down
2 changes: 1 addition & 1 deletion crates/runtime_crypto/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"

[dependencies]
v8 = "0.71.2"
v8 = "0.73.0"
anyhow = "1.0.71"
rand = "0.8.5"
uuid = { version = "1.3.3", features = ["v4", "fast-rng"] }
Expand Down
2 changes: 1 addition & 1 deletion crates/runtime_http/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"

[dependencies]
v8 = "0.71.2"
v8 = "0.73.0"
hyper = { version = "0.14.26", features = ["client", "http1", "http2", "tcp"] }
anyhow = "1.0.71"
lagon-runtime-v8-utils = { path = "../runtime_v8_utils" }
4 changes: 2 additions & 2 deletions crates/runtime_isolate/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ version = "0.1.0"
edition = "2021"

[dependencies]
v8 = "0.71.2"
v8 = "0.73.0"
tokio = { version = "1", features = ["rt-multi-thread"] }
futures = "0.3.28"
hyper = { version = "0.14.26", features = ["client"] }
hyper-tls = { version = "0.5.0", features = ["vendored"] }
flume = "0.10.14"
anyhow = "1.0.71"
log = { version = "0.4.17", features = ["std", "kv_unstable"] }
log = { version = "0.4.18", features = ["std", "kv_unstable"] }
once_cell = "1.17.1"
async-recursion = "1.0.4"
linked-hash-map = "0.5.6"
Expand Down
2 changes: 1 addition & 1 deletion crates/runtime_v8_utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ version = "0.1.0"
edition = "2021"

[dependencies]
v8 = "0.71.2"
v8 = "0.73.0"
anyhow = "1.0.71"
hyper = { version = "0.14.26" }
2 changes: 1 addition & 1 deletion crates/serverless/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ dotenv = "0.15.0"
serde_json = "1.0"
metrics = "0.21.0"
metrics-exporter-prometheus = { version = "0.12.1", default-features = false, features = ["http-listener"] }
log = { version = "0.4.17", features = ["std", "kv_unstable", "kv_unstable_serde"] }
log = { version = "0.4.18", features = ["std", "kv_unstable", "kv_unstable_serde"] }
once_cell = "1.17.1"
anyhow = "1.0.71"
tokio-cron-scheduler = "0.9.4"
Expand Down
2 changes: 1 addition & 1 deletion crates/serverless/src/clickhouse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ pub async fn run_migrations(client: &Client) -> Result<()> {
)
ENGINE = MergeTree()
PRIMARY KEY (level, function_id, timestamp)
TTL now() + INTERVAL 1 WEEK",
TTL timestamp + INTERVAL 1 WEEK",
)
.execute()
.await?;
Expand Down
2 changes: 1 addition & 1 deletion crates/serverless_logger/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ flume = "0.10.14"
chrono = "0.4.24"
serde_json = "1.0"
axiom-rs = { version = "0.8.0", default-features = false, features = ["tokio", "native-tls"] }
log = { version = "0.4.17", features = ["std", "kv_unstable", "kv_unstable_serde"] }
log = { version = "0.4.18", features = ["std", "kv_unstable", "kv_unstable_serde"] }
tokio = { version = "1", features = ["rt-multi-thread"] }
2 changes: 1 addition & 1 deletion crates/serverless_pubsub/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ anyhow = "1.0.71"
async-trait = "0.1.68"
futures = "0.3.28"
redis = { version = "0.23.0", features = ["tokio-native-tls-comp", "tokio-comp"] }
log = { version = "0.4.17", features = ["std", "kv_unstable", "kv_unstable_serde"] }
log = { version = "0.4.18", features = ["std", "kv_unstable", "kv_unstable_serde"] }
flume = "0.10.14"
Loading

0 comments on commit 222dc4d

Please sign in to comment.