-
Notifications
You must be signed in to change notification settings - Fork 258
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feat/shuttle-runtime-scaling
- Loading branch information
Showing
114 changed files
with
3,429 additions
and
1,816 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#! /usr/bin/env sh | ||
|
||
set -ue | ||
|
||
# add our config to the .ssh/config in circleci | ||
cat >> $HOME/.ssh/config <<- EOF | ||
Host admin | ||
HostName 18.132.154.166 | ||
User ec2-user | ||
Host *.shuttle.prod.internal | ||
User ec2-user | ||
ProxyJump ec2-user@admin | ||
EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Would actually like to error on all errors, but `Enable-ExperimentalFeature` | ||
# does not work for this version of Windows | ||
# https://github.com/PowerShell/PowerShell/issues/3415#issuecomment-1354457563 | ||
Set-StrictMode -Version Latest | ||
$ErrorActionPreference = "Stop" | ||
|
||
# Add cargo to PATH | ||
$env:Path += [IO.Path]::PathSeparator + "$env:USERPROFILE/.cargo/bin" | ||
|
||
# Start locally | ||
$job = Start-Job -Name "local-run" -ScriptBlock { cd examples/rocket/postgres; cargo shuttle run } | ||
Start-Sleep -Seconds 300 | ||
|
||
echo "Testing local docker endpoint" | ||
$postParams = @{note='test'} | ||
$output=curl http://localhost:8000/todo -Method Post -Body $postParams | Select-Object -ExpandProperty Content | ||
if ( $output -ne '{"id":1,"note":"test"}') | ||
{ | ||
echo "Did not expect POST output: $output" | ||
exit 1 | ||
} | ||
|
||
$output=curl http://localhost:8000/todo/1 | Select-Object -ExpandProperty Content | ||
if ( $output -ne '{"id":1,"note":"test"}') | ||
{ | ||
echo "Did not expect output: $output" | ||
exit 1 | ||
} | ||
|
||
Stop-Job $job | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Would actually like to error on all errors, but `Enable-ExperimentalFeature` | ||
# does not work for this version of Windows | ||
# https://github.com/PowerShell/PowerShell/issues/3415#issuecomment-1354457563 | ||
Set-StrictMode -Version Latest | ||
$ErrorActionPreference = "Stop" | ||
|
||
# Add cargo to PATH | ||
$env:Path += [IO.Path]::PathSeparator + "$env:USERPROFILE/.cargo/bin" | ||
|
||
# Install the WASM target | ||
rustup target add wasm32-wasi | ||
|
||
# Install wasm runtime from checked out code | ||
cargo install shuttle-runtime --path runtime --bin shuttle-next --features next | ||
|
||
# Start locally | ||
$job = Start-Job -Name "local-run" -ScriptBlock { cd examples/next/hello-world; cargo shuttle run } | ||
Start-Sleep -Seconds 70 | ||
|
||
echo "Testing local wasm endpoint" | ||
$output=curl http://localhost:8000 | Select-Object -ExpandProperty Content | ||
if ( $output -ne "Hello, world!") | ||
{ | ||
echo "Did not expect output: $output" | ||
exit 1 | ||
} | ||
|
||
Stop-Job $job | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Would actually like to error on all errors, but `Enable-ExperimentalFeature` | ||
# does not work for this version of Windows | ||
# https://github.com/PowerShell/PowerShell/issues/3415#issuecomment-1354457563 | ||
Set-StrictMode -Version Latest | ||
$ErrorActionPreference = "Stop" | ||
|
||
# Prepare directory | ||
mkdir -p /tmp/qa-windows | ||
cd /tmp/qa-windows | ||
|
||
# Add cargo to PATH | ||
$env:Path += [IO.Path]::PathSeparator + "$env:USERPROFILE/.cargo/bin" | ||
|
||
# Init app | ||
cargo shuttle init --name qa-windows --template axum | ||
|
||
# # Start locally | ||
$job = Start-Job -Name "local-run" -ScriptBlock { cd /tmp/qa-windows; cargo shuttle run } | ||
Start-Sleep -Seconds 270 | ||
|
||
echo "Testing local hello endpoint" | ||
$output=curl http://localhost:8000 | Select-Object -ExpandProperty Content | ||
if ( $output -ne "Hello, world!") | ||
{ | ||
echo "Did not expect output: $output" | ||
exit 1 | ||
} | ||
|
||
Stop-Job $job | ||
|
||
cargo shuttle project start | ||
|
||
cargo shuttle deploy --allow-dirty | ||
|
||
echo "Testing remote hello endpoint" | ||
$output=curl https://qa-windows.unstable.shuttleapp.rs | Select-Object -ExpandProperty Content | ||
if ( $output -ne "Hello, world!") | ||
{ | ||
echo "Did not expect output: $output" | ||
exit 1 | ||
} | ||
|
||
cargo shuttle project stop | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#! /usr/bin/env sh | ||
|
||
set -ue | ||
|
||
# add our config to the .ssh/config in circleci | ||
cat >> $HOME/.ssh/config <<- EOF | ||
Host admin.unstable | ||
HostName 3.11.51.209 | ||
User ec2-user | ||
Host *.shuttle.internal | ||
User ec2-user | ||
ProxyJump ec2-user@admin.unstable | ||
EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# EditorConfig is awesome: https://EditorConfig.org | ||
|
||
# top-most EditorConfig file | ||
root = true | ||
|
||
# Unix-style newlines with a newline ending every file | ||
[*] | ||
end_of_line = lf | ||
insert_final_newline = true | ||
|
||
# Indentation settings matching the default rustfmt config | ||
[*.rs] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 4 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Improvement suggestion | ||
description: Suggest an improvement to an existing feature | ||
title: "[Improvement]: " | ||
labels: ["improvement"] | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: Thanks for taking the time to suggest an improvement! | ||
- type: textarea | ||
id: describe | ||
attributes: | ||
label: Describe the improvement | ||
description: A high level description. | ||
placeholder: Add functionality that allows users to ... | ||
validations: | ||
required: true | ||
- type: checkboxes | ||
id: duplicate | ||
attributes: | ||
label: Duplicate declaration | ||
description: Please confirm that you are not creating a duplicate issue. | ||
options: | ||
- label: I have searched the issues and this improvement has not been requested before. | ||
required: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
## Description of change | ||
<!-- Please write a summary of your changes and why you made them. --> | ||
<!-- Be sure to reference any related issues by adding `Closes #`. --> | ||
|
||
Please write a summary of your changes and why you made them. | ||
|
||
Be sure to reference any related issues by adding `closes issue #`. | ||
|
||
## How Has This Been Tested (if applicable)? | ||
## How has this been tested? (if applicable) | ||
<!-- Please describe the tests that you ran to verify your changes. --> | ||
|
||
|
||
Please describe the tests that you ran to verify your changes. |
Oops, something went wrong.