Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: merge main into prod for v0.12.0 #730

Merged
merged 78 commits into from
Mar 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
a1c5fc5
feat: shuttle-serenity initial commit poc (#429)
brokad Oct 25, 2022
f7e09b6
shuttle next wrapper POC (#431)
oddgrd Oct 25, 2022
f6e1766
refactor: create runtimes workspace (#432)
chesedo Oct 26, 2022
e773225
feat: add --provisioner-address arg to both runtimes (#433)
chesedo Oct 26, 2022
37ade4c
feat: create a control plane interface (part 1) (#436)
chesedo Oct 27, 2022
da46e60
refactor: combine runtimes into one (#438)
chesedo Oct 27, 2022
67a4e91
feat(deployer): add support for building wasm projects (#437)
akrantz01 Oct 28, 2022
5546fb2
feat: move factory to runtime (#444)
oddgrd Nov 1, 2022
0e8ce8b
WIP feat: start runtime from deployer (#450)
oddgrd Nov 4, 2022
ee342e4
feat: get logs from runtime (#459)
chesedo Nov 14, 2022
019764e
feat(shuttle-next): first edition of axum-wasm router (#472)
oddgrd Nov 21, 2022
f913b8a
Feat(shuttle-next): stop runtime services (#481)
oddgrd Nov 24, 2022
c2b0f63
feat(next): expand macro into axum routes (#488)
chesedo Nov 24, 2022
16abe40
Feat: parse shuttle::endpoint macro (#490)
oddgrd Dec 4, 2022
b6e668b
feat: merge main into shuttle-next (#543)
oddgrd Dec 21, 2022
a4ef6c3
refactor: one store per request (#510)
chesedo Dec 22, 2022
c4dd391
refactor: remove the serenity runtime (#549)
chesedo Dec 22, 2022
1487ddf
Feat: shuttle next bump deps (#551)
oddgrd Dec 28, 2022
9db7f90
feat: return streaming body from wasm router (#558)
oddgrd Jan 4, 2023
c34d5e4
feat: embed runtime into client and deployer (#559)
chesedo Jan 6, 2023
d7ff85f
bug: expanded broken merge (#567)
chesedo Jan 6, 2023
8324824
feat: refactor router and router inner (#566)
oddgrd Jan 6, 2023
5b033d0
feat: hook in runtime logs (#568)
chesedo Jan 10, 2023
9697090
misc: merge main (#572)
chesedo Jan 11, 2023
a660b15
fix: missing feature flag in common dep (#573)
oddgrd Jan 11, 2023
509e373
feat: change log read to spawn blocking (#574)
oddgrd Jan 12, 2023
39c9d1c
feat: DX (#577)
chesedo Jan 12, 2023
b17b3a1
feat: get runtime binary from cargo install (#578)
oddgrd Jan 16, 2023
cc072b2
feat: deployer next (#575)
chesedo Jan 16, 2023
8414714
Merge remote-tracking branch 'upstream/main' into shuttle-next
chesedo Jan 16, 2023
05f7469
misc: remove unneeded codegen feature (#584)
chesedo Jan 18, 2023
325b90f
refactor: proto fixups (#585)
chesedo Jan 18, 2023
35c0660
Feat: cleanup fds and tmp (#586)
oddgrd Jan 18, 2023
a8b6166
refactor: unwraps and mor (#587)
chesedo Jan 18, 2023
d191d66
feat: build our images with the release profile (#583)
oddgrd Jan 23, 2023
3dc3ac7
Feature/eng 378 axum wasm multiple handlers per endpoint (#588)
oddgrd Mar 3, 2023
91a9fdd
refactor: find code to wrap legacy runtime (#675)
chesedo Mar 3, 2023
69b82e6
feat: remove box self from services, remove syncwrapper from axum ser…
oddgrd Mar 3, 2023
91f12b4
Fix/move docker profiles to dev (#674)
oddgrd Mar 3, 2023
52096fc
feat: extract next runtime into separate binary (#679)
oddgrd Mar 6, 2023
3489e83
Feature: remove tokio runtime from all resources (#680)
oddgrd Mar 6, 2023
8be4742
feat: trim the service loader, unpin tokio (#681)
oddgrd Mar 6, 2023
a6279c6
chore(typos): fix typos (#682)
stavares843 Mar 6, 2023
0fecace
Fix indentation for poise init example (#687)
HexPandaa Mar 7, 2023
a93ba51
Feature/eng 477 make wasm dependencies optional (#688)
oddgrd Mar 7, 2023
3699f7f
Feature: eng 465 update all the codegens (#686)
oddgrd Mar 7, 2023
67cf6bd
docs: add note about git tags in contrib (#691)
oddgrd Mar 7, 2023
9fa862e
bug: idle static folder (#692)
chesedo Mar 8, 2023
349f578
chore: v0.11.3 (#695)
oddgrd Mar 8, 2023
4e1690d
Feature: eng 483 trim and fix the tests in shuttle-service (#693)
oddgrd Mar 9, 2023
9f7a482
fix: Respect `Cargo.lock` when building containers (#700)
kierendavies Mar 10, 2023
adf8926
ci: resolve CI errors in shuttle-next (#580)
oddgrd Mar 10, 2023
60be73d
Merge remote-tracking branch 'upstream/main' into shuttle-next
chesedo Mar 13, 2023
4e88558
Merge remote-tracking branch 'upstream/main' into shuttle-next
chesedo Mar 13, 2023
66ba530
Feature/eng 486 update deployer with runtime changes (#696)
oddgrd Mar 13, 2023
c6061be
feat: extract service integrations into separate crates (#702)
oddgrd Mar 13, 2023
69819c9
[next] tests: CI go green (#704)
chesedo Mar 14, 2023
9f80ee8
feat: emit error when shuttle::main is named main (#707)
oddgrd Mar 14, 2023
918829b
Feature: eng 484 update init with codegen changes (#706)
oddgrd Mar 14, 2023
db09323
fix: codegen clippy (#709)
oddgrd Mar 14, 2023
9f73d61
misc: v0.12.0-rc1 (#708)
chesedo Mar 14, 2023
add6a8e
[next] refactor: update runtime manager (#711)
chesedo Mar 14, 2023
f21d0dd
Feature: eng 497 update or remove the docs in shuttle (#710)
oddgrd Mar 14, 2023
ff2ba8a
refactor: rename legacy runtime to alpha (#713)
oddgrd Mar 14, 2023
95fe7ad
refactor: move next to services (#714)
chesedo Mar 15, 2023
2ea253a
[next] refactor: remove ids from runtime (#712)
chesedo Mar 15, 2023
a588e25
feat: embed protoc in shuttle-proto (#715)
oddgrd Mar 15, 2023
6c02135
[next] bug: communicating resources (#716)
chesedo Mar 16, 2023
5ea3159
feat(local): don't install next-runtime from git (#718)
oddgrd Mar 16, 2023
3cff60d
fix: static folder local run clearing file contents, add missing test…
oddgrd Mar 16, 2023
9471ed5
[next] refactor: tracing (#719)
chesedo Mar 16, 2023
2d7b126
fix: windows local run path bug (#721)
oddgrd Mar 16, 2023
5e1e527
refactor: pull out vendored protoc from shuttle-proto (#726)
oddgrd Mar 17, 2023
ee04376
[next] bug: misc fixes (#725)
chesedo Mar 17, 2023
ba66b33
bug: next runtime not sending stop signal (#728)
chesedo Mar 20, 2023
72ce9b4
chore: v0.12.0 (#727)
oddgrd Mar 20, 2023
b6d7b6f
Merge pull request #579 from shuttle-hq/shuttle-next
chesedo Mar 20, 2023
c30a893
Merge branch 'main' into production
oddgrd Mar 20, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
111 changes: 47 additions & 64 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ executors:
docker-rust:
docker:
- image: cimg/rust:1.65.0
resource_class: small
image-ubuntu:
machine:
image: ubuntu-2204:2022.04.1
docker_layer_caching: true
resource_class: xlarge

# sscache steps are from this guide
# https://medium.com/@edouard.oger/rust-caching-on-circleci-using-sccache-c996344f0115
Expand Down Expand Up @@ -86,18 +88,33 @@ commands:
cat\<< EOF > ~/.cargo/config.toml
[patch.crates-io]
shuttle-service = { path = "$PWD/service" }
shuttle-runtime = { path = "$PWD/runtime" }

shuttle-aws-rds = { path = "$PWD/resources/aws-rds" }
shuttle-persist = { path = "$PWD/resources/persist" }
shuttle-shared-db = { path = "$PWD/resources/shared-db" }
shuttle-secrets = { path = "$PWD/resources/secrets" }
shuttle-static-folder = { path = "$PWD/resources/static-folder" }

shuttle-axum = { path = "$PWD/services/shuttle-axum" }
shuttle-actix-web = { path = "$PWD/services/shuttle-actix-web" }
shuttle-next = { path = "$PWD/services/shuttle-next" }
shuttle-poem = { path = "$PWD/services/shuttle-poem" }
shuttle-poise = { path = "$PWD/services/shuttle-poise" }
shuttle-rocket = { path = "$PWD/services/shuttle-rocket" }
shuttle-salvo = { path = "$PWD/services/shuttle-salvo" }
shuttle-serenity = { path = "$PWD/services/shuttle-serenity" }
shuttle-thruster = { path = "$PWD/services/shuttle-thruster" }
shuttle-tide = { path = "$PWD/services/shuttle-tide" }
shuttle-tower = { path = "$PWD/services/shuttle-tower" }
shuttle-warp = { path = "$PWD/services/shuttle-warp" }
EOF
install-rust:
steps:
- run:
name: Install Rust
command: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --target add wasm32-wasi
sudo apt update && sudo apt install -y libssl1.1
install-protoc:
steps:
Expand Down Expand Up @@ -146,33 +163,22 @@ commands:
- << parameters.target >>.env

jobs:
workspace-fmt:
workspace:
executor: docker-rust
resource_class: xlarge
steps:
- checkout
- restore-cargo-cache
- install-protoc
- run: cargo fmt --all --check
- run: cargo install cargo-sort
# TODO: this is incompatible with workspace inheritance, uncomment when
# https://github.com/DevinR528/cargo-sort/pull/29 is merged
# - run: cargo install cargo-sort
# - run: cargo sort --check --workspace
- run: cargo check --workspace --all-targets
- save-cargo-cache
workspace-clippy:
parameters:
framework:
description: "Framework to activate"
type: string
executor: docker-rust
steps:
- checkout
- restore-cargo-cache
- install-protoc
- run: |
cargo clippy --tests \
--all-targets \
--features="codegen,loader,<< parameters.framework >>" \
--all-features \
--no-deps -- \
--D warnings \
-A clippy::let-unit-value \
Expand All @@ -190,9 +196,9 @@ jobs:
- install-protoc
- apply-patches
- run: cargo fmt --all --check --manifest-path << parameters.path >>/Cargo.toml
- run: cargo install cargo-sort
# TODO: this is incompatible with workspace inheritance, uncomment when
# https://github.com/DevinR528/cargo-sort/pull/29 is merged
# - run: cargo install cargo-sort
# - run: cargo sort --check << parameters.path >>
- run: |
cargo clippy --tests \
Expand All @@ -205,20 +211,6 @@ jobs:
-A clippy::format-push-string
- run: cargo test --all-features --manifest-path << parameters.path >>/Cargo.toml -- --nocapture
- save-cargo-cache
service-test:
# Using an image since tests will start a docker container
executor: image-ubuntu
steps:
- install-rust
- checkout
- restore-cargo-cache
- run:
name: Run unit tests
command: cargo test --package shuttle-service --features="codegen,loader" --lib -- --nocapture
- run:
name: Run integration tests
command: cargo test --package shuttle-service --features="codegen,loader" --test '*' -- --nocapture
- save-cargo-cache
platform-test:
parameters:
crate:
Expand All @@ -228,6 +220,7 @@ jobs:
executor: image-ubuntu
steps:
- install-rust
- install-protoc
- checkout
- run: git submodule sync
- run: git submodule update --init
Expand All @@ -244,7 +237,6 @@ jobs:
(cargo test --package << parameters.crate >> --all-features --test '*' -- --list 2>&1 | grep -q "no test target matches pattern") && echo "nothing to test" || cargo test --package << parameters.crate >> --all-features --test '*' -- --nocapture
- save-cargo-cache
e2e-test:
resource_class: xlarge
executor: image-ubuntu
steps:
- install-rust
Expand Down Expand Up @@ -276,7 +268,6 @@ jobs:
key: docker-buildx-{{ .Branch }}
when: always
build-and-push:
resource_class: xlarge
executor: image-ubuntu
steps:
- checkout
Expand Down Expand Up @@ -350,7 +341,7 @@ jobs:
build-binaries-mac:
macos:
xcode: 12.5.1
resource_class: medium
resource_class: xlarge
steps:
- checkout
- run:
Expand Down Expand Up @@ -388,28 +379,9 @@ jobs:
workflows:
ci:
jobs:
- workspace-fmt
- workspace-clippy:
name: workspace-clippy-<< matrix.framework >>
requires:
- workspace-fmt
matrix:
parameters:
framework:
[
"web-actix-web",
"web-axum",
"web-rocket",
"web-poem",
"web-thruster",
"web-tide",
"web-tower",
"web-warp",
"web-salvo",
"bot-serenity",
"bot-poise",
]
- workspace
- check-standalone:
name: << matrix.path >>
matrix:
parameters:
path:
Expand All @@ -418,27 +390,38 @@ workflows:
- resources/secrets
- resources/shared-db
- resources/static-folder
- service-test:
requires:
- workspace-clippy
- services/shuttle-actix-web
- services/shuttle-axum
- services/shuttle-next
- services/shuttle-poem
- services/shuttle-poise
- services/shuttle-rocket
- services/shuttle-salvo
- services/shuttle-serenity
- services/shuttle-thruster
- services/shuttle-tide
- services/shuttle-tower
- services/shuttle-warp
- platform-test:
name: << matrix.crate >>
requires:
- workspace-clippy
- workspace
matrix:
parameters:
crate:
[
"shuttle-auth",
"shuttle-deployer",
"cargo-shuttle",
"shuttle-codegen",
"shuttle-common",
"shuttle-deployer",
"shuttle-proto",
"shuttle-provisioner",
"shuttle-runtime",
"shuttle-service",
]
- e2e-test:
requires:
- service-test
- platform-test
- check-standalone
filters:
Expand All @@ -454,23 +437,23 @@ workflows:
name: build-binaries-x86_64-gnu
image: ubuntu-2204:2022.04.1
target: x86_64-unknown-linux-gnu
resource_class: medium
resource_class: xlarge
filters:
branches:
only: production
- build-binaries-linux:
name: build-binaries-x86_64-musl
image: ubuntu-2204:2022.04.1
target: x86_64-unknown-linux-musl
resource_class: medium
resource_class: xlarge
filters:
branches:
only: production
- build-binaries-linux:
name: build-binaries-aarch64
image: ubuntu-2004:202101-01
target: aarch64-unknown-linux-musl
resource_class: arm.medium
resource_class: arm.xlarge
filters:
branches:
only: production
Expand Down
22 changes: 19 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ git clone [email protected]:shuttle-hq/shuttle.git
cd shuttle
```

> Note: We need the git tags for the local development workflow, but they may not be included when you clone the repository.
To make sure you have them, run `git fetch upstream --tags`, where upstream is the name of the shuttle remote repository.

You should now be ready to setup a local environment to test code changes to core `shuttle` packages as follows:

From the root of the shuttle repo, build the required images with:
Expand Down Expand Up @@ -53,13 +56,26 @@ In order to test local changes to the library crates, you may want to add the be
```toml
[patch.crates-io]
shuttle-service = { path = "[base]/shuttle/service" }
shuttle-common = { path = "[base]/shuttle/common" }
shuttle-proto = { path = "[base]/shuttle/proto" }
shuttle-runtime = { path = "[base]/shuttle/runtime" }

shuttle-aws-rds = { path = "[base]/shuttle/resources/aws-rds" }
shuttle-persist = { path = "[base]/shuttle/resources/persist" }
shuttle-shared-db = { path = "[base]/shuttle/resources/shared-db" }
shuttle-secrets = { path = "[base]/shuttle/resources/secrets" }
shuttle-static-folder = { path = "[base]/shuttle/resources/static-folder" }

shuttle-axum = { path = "[base]/shuttle/services/shuttle-axum" }
shuttle-actix-web = { path = "[base]/shuttle/services/shuttle-actix-web" }
shuttle-next = { path = "[base]/shuttle/services/shuttle-next" }
shuttle-poem = { path = "[base]/shuttle/services/shuttle-poem" }
shuttle-poise = { path = "[base]/shuttle/services/shuttle-poise" }
shuttle-rocket = { path = "[base]/shuttle/services/shuttle-rocket" }
shuttle-salvo = { path = "[base]/shuttle/services/shuttle-salvo" }
shuttle-serenity = { path = "[base]/shuttle/services/shuttle-serenity" }
shuttle-thruster = { path = "[base]/shuttle/services/shuttle-thruster" }
shuttle-tide = { path = "[base]/shuttle/services/shuttle-tide" }
shuttle-tower = { path = "[base]/shuttle/services/shuttle-tower" }
shuttle-warp = { path = "[base]/shuttle/services/shuttle-warp" }
```

Before we can login to our local instance of shuttle, we need to create a user.
Expand Down Expand Up @@ -164,7 +180,7 @@ To run the unit tests for a specific crate, from the root of the repository run:
cargo test --package <crate-name> --all-features --lib -- --nocapture
```

To run the integration tests for a spesific crate (if it has any), from the root of the repository run:
To run the integration tests for a specific crate (if it has any), from the root of the repository run:

```bash
# replace <crate-name> with the name of the crate to test, e.g. `cargo-shuttle`
Expand Down
Loading