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

add region field to balancer protocol #1124

Merged
merged 1 commit into from
Nov 3, 2023
Merged

add region field to balancer protocol #1124

merged 1 commit into from
Nov 3, 2023

Conversation

dyc3
Copy link
Owner

@dyc3 dyc3 commented Nov 2, 2023

closes #1121

Copy link

cypress bot commented Nov 2, 2023

1 failed test on run #672 ↗︎

1 63 1 0 Flakiness 0

Details:

Merge da263ba into f5a8664...
Project: OpenTogetherTube Commit: 2ff93a9f53 ℹ️
Status: Failed Duration: 05:11 💡
Started: Nov 2, 2023 3:46 PM Ended: Nov 2, 2023 3:51 PM
Failed  client/tests/e2e/component/RoomSettingsForm.cy.ts • 1 failed test • Component - electron

View Output Video

Test Artifacts
An uncaught error was detected outside of a test Output Screenshots Video

Review all test suite changes for PR #1124 ↗︎

let init = M2BInit { port: http_port };
let init = M2BInit {
port: http_port,
region: "unknown".into(),
Copy link
Contributor

Choose a reason for hiding this comment

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

what does .into() do?

Copy link
Owner Author

Choose a reason for hiding this comment

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

It comes from the Into trait. https://doc.rust-lang.org/std/convert/trait.Into.html

You can read more in depth about From/Into here: https://practice.rs/type-conversions/from-into.html Specifically, this into() converts a &'static str into a String.

@@ -93,6 +93,7 @@ pub enum MsgM2B {
pub struct M2BInit {
/// The port that the monolith is listening for HTTP requests on.
pub port: u16,
pub region: String,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
Copy link
Contributor

Choose a reason for hiding this comment

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

line 99?

Copy link
Owner Author

Choose a reason for hiding this comment

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

derive invokes derive macros. They are macros that automatically implement traits for you. For example, #[derive(Clone)] will automatically implement Clone, and allow you to call clone() on the type that it's implemented for.

Copy link
Contributor

Choose a reason for hiding this comment

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

This file won't let me comment on individual lines so:
wss.on()?
this.emit() - emits to what?

Copy link
Owner Author

Choose a reason for hiding this comment

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

wss is a WebSocket.Server from the ws node js package.

on(event, handler) runs handler whenever event is emitted by the object.

this in that context is BalancerManager, which has an event bus that emits events from BalancerManagerEvemts (which ive just realized I've typod)

@@ -513,6 +519,11 @@ function postProcessConfig(): void {
if (conf.get("mail.enabled")) {
validateMail();
Copy link
Contributor

Choose a reason for hiding this comment

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

what does mail mean in this context?

Copy link
Owner Author

Choose a reason for hiding this comment

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

email. used for password recovery emails.

@dyc3 dyc3 merged commit 5c61552 into master Nov 3, 2023
12 of 13 checks passed
@dyc3 dyc3 deleted the proto-region branch November 3, 2023 20:02
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.

add region field to M2BInit
2 participants