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 shuttle-ecs-common to main #1753

Merged
merged 30 commits into from
Apr 25, 2024
Merged

chore: merge shuttle-ecs-common to main #1753

merged 30 commits into from
Apr 25, 2024

Conversation

jonaro00
Copy link
Member

No description provided.

iulianbarbu and others added 23 commits March 26, 2024 19:17
* feat: runtime healthcheck, start runtime on 0.0.0.0

running on unspecified ip was necessary for the runner to be able to reach the runtime when they are running in separate containers

* feat(proto): update runtime::get_client to work with

* misc(proto): get client takes u16 port

* feat: add health toggle to runtime

* feat: set runtime to unhealthy if it doesn't start within 60s

* feat: change runtime::get_client to take address

* feat: kill runtime if it doesn't become healthy in time

* feat: increase provisioning timeout duration
…1732)

* feat(cargo-shuttle): beta flag

* nit: client name

* fix: delete beta endpoint
* fix: debug runtime panic

* fix: try without service stop channel

* fix: move tx take into conditional kill block

* fix: revert other changes, use arc for kill tx

* refactor: use cancellation token instead of oneshot

* misc: revert timeout change

* misc: remove extra clone, switch panic to print

* fix: panic on error or cancellation
* common: updated deployment models

* cargo-shuttle: update deploy cmd

* common: add more information in a deployment response

* cargo-shuttle: add project uri in deploy output

* fix: Jocelyn's comments on fronted output

* cargo-shuttle: when deploying use the beta field on the Shuttle type

* cargo-shuttle: split beta/alpha deploy functions in client

* cargo-shuttle: addressed left over of alpha deployments table change

* cargo-shuttle: remove pub for beta flag on client

* cargo-shuttle: remove leftover comment

* address Jocelyn review comments
* feat(cargo-shuttle): make zip file on beta deploy

* feat(cargo-shuttle, service): deployment package name discovery

* fix: clippy
* common: add failed deployment state

* cargo-shuttle: add stopping ecs state

* cargo-shuttle: add the beta deployment status cmd handler
* feat(common): add new line for the logger

* feat(cargo): add support for logs of new platform

* fix(cargo): remove useless error handling

* fix(cargo): remove id from LogItemBeta
* cargo-shuttle: make EcsResponse uri optional

* cargo-shuttle: add pending ecs state

* cargo-shuttle: add deployment list for beta platform
Co-authored-by: jonaro00 <54029719+jonaro00@users.noreply.github.com>
@jonaro00 jonaro00 force-pushed the feat/shuttle-ecs-common branch from 44e43bc to 85a8d54 Compare April 23, 2024 12:37
Copy link
Contributor

@oddgrd oddgrd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The runtime compatibility changes LGTM!

runtime/src/alpha.rs Show resolved Hide resolved
cargo-shuttle/src/client.rs Outdated Show resolved Hide resolved
runtime/Cargo.toml Outdated Show resolved Hide resolved
runtime/src/alpha.rs Outdated Show resolved Hide resolved
@jonaro00 jonaro00 requested a review from Kazy April 24, 2024 12:52
@jonaro00 jonaro00 requested a review from oddgrd April 24, 2024 13:18
Copy link
Contributor

@chesedo chesedo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doing if beta checks everywhere seems to be a recipe for disaster. We should try to reduce this by making new structs for the beta code and diverting the code flow to them as early as possible.

@@ -43,7 +43,7 @@ where
.tracing()
.with_exporter(
opentelemetry_otlp::new_exporter()
.tonic()
.http()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we making this change?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Making it compatible with an ALB on beta platform IIRC

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, I had some trouble making gRPC work in front of the load balancer. I can try again though, I'll let you know how it goes.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep can confirm, it's a PITA. We have an ALB in front of OTEL, which requires an HTTPS listener when targeting a gRPC target group. The issue is that to have an HTTPS listener, you need to have a valid ACM certificate attached to it, and to get a valid ACM certificate, you need to be able to verify it, which isn't possible for internal facing address.

I think we might be able to use ACM PCA (Private Certificate Authority), but that's not my priority right now.

api_url: String,
api_key: Option<ApiKey>,
/// alter behaviour to interact with the new platform
beta: bool,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would recommend rather creating a new client for beta rather than passing this flag around everywhere

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The number of beta changes thus far is small enough for me to justify this. We might extract it later, but there will still be many places outside of this client that will do the same thing (modify behaviour based on passed flag).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, that more points to why it would have been a good idea to do it now instead of later when it will be harder.

@oddgrd oddgrd merged commit 3322112 into main Apr 25, 2024
30 of 32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants