Skip to content

deployment: add monitoring endpoint port to the deployment file #7957

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

Conversation

nadin-Starkware
Copy link
Collaborator

No description provided.

@reviewable-StarkWare
Copy link

This change is Reviewable

@nadin-Starkware nadin-Starkware marked this pull request as ready for review July 14, 2025 06:56
Copy link
Collaborator Author

nadin-Starkware commented Jul 14, 2025

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copy link

github-actions bot commented Jul 14, 2025

Benchmark movements: No major performance changes detected.

Copy link
Contributor

@Itay-Tsabary-Starkware Itay-Tsabary-Starkware left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 27 files reviewed, 2 unresolved discussions


crates/apollo_deployments/resources/testing_secrets_locally.json line 1 at r1 (raw file):

{

What is the difference between this file and crates/apollo_deployments/resources/testing_secrets.json ?


crates/apollo_deployments/src/deployments/distributed.rs line 278 at r1 (raw file):

    fn get_ports(&self) -> BTreeMap<ServicePort, u16> {
        let mut ports = BTreeMap::new();
        ports.insert(ServicePort::MonitoringEndpoint, MONITORING_ENDPOINT_DEFAULT_PORT);

Please:

  1. define iteration over ServicePort (check for EnumIter in the code)
  2. define iteration over the enum variants, and use match case to set the value

The above ensures that once a new enum variant is added there will be a compliation error until it is set in the map.

Code quote:

 ports.insert(ServicePort::MonitoringEndpoint, MONITORING_ENDPOINT_DEFAULT_PORT);

Copy link
Contributor

@Itay-Tsabary-Starkware Itay-Tsabary-Starkware left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 27 files reviewed, 2 unresolved discussions (waiting on @nadin-Starkware)


crates/apollo_deployments/src/deployments/distributed.rs line 278 at r1 (raw file):

Previously, Itay-Tsabary-Starkware wrote…

Please:

  1. define iteration over ServicePort (check for EnumIter in the code)
  2. define iteration over the enum variants, and use match case to set the value

The above ensures that once a new enum variant is added there will be a compliation error until it is set in the map.

(same for all 3 functions)

@nadin-Starkware nadin-Starkware force-pushed the 07-14-deployment_add_monitoring_endpoint_port_to_the_deployment_file branch from e8a46e2 to 4812829 Compare July 14, 2025 09:21
Copy link
Collaborator Author

@nadin-Starkware nadin-Starkware left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 27 files reviewed, 2 unresolved discussions (waiting on @Itay-Tsabary-Starkware)


crates/apollo_deployments/src/deployments/distributed.rs line 278 at r1 (raw file):

Previously, Itay-Tsabary-Starkware wrote…

(same for all 3 functions)

Done.


crates/apollo_deployments/resources/testing_secrets_locally.json line 1 at r1 (raw file):

Previously, Itay-Tsabary-Starkware wrote…

What is the difference between this file and crates/apollo_deployments/resources/testing_secrets.json ?

This shouldn't be committed, Deleting it

Copy link
Contributor

@Itay-Tsabary-Starkware Itay-Tsabary-Starkware left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 27 files reviewed, 2 unresolved discussions


crates/apollo_deployments/src/deployments/distributed.rs line 286 at r2 (raw file):

                ServicePort::HttpServer => match self {
                    DistributedNodeServiceName::HttpServer => None,
                    _ => None,

OK, I didn't think through my previous suggestion, apologies 😅

My concern here (and with _ branches in general) is that it prevents the compiler from protecting us in case we add another variant: then we'd have to go through all the usages and find the relevant ones.

Is there a way to unify these with the component config fns? Maybe incorporate the enum in there? I'm scared of hiding these knobs deep down in the code, and having to back-trace on how to change them later on.

Code quote:

_ => None,

@nadin-Starkware nadin-Starkware force-pushed the 07-14-deployment_add_monitoring_endpoint_port_to_the_deployment_file branch 3 times, most recently from f8c34ad to e8b07e3 Compare July 15, 2025 12:03
Copy link
Contributor

@Itay-Tsabary-Starkware Itay-Tsabary-Starkware left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 28 files reviewed, 1 unresolved discussion


crates/apollo_deployments/src/deployments/consolidated.rs line 24 at r4 (raw file):

};
use crate::service::{GetComponentConfigs, NodeService, ServiceNameInner};

Restore new line please

@nadin-Starkware nadin-Starkware force-pushed the 07-14-deployment_add_monitoring_endpoint_port_to_the_deployment_file branch from e8b07e3 to be56ded Compare July 16, 2025 07:10
Copy link
Collaborator Author

@nadin-Starkware nadin-Starkware left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 28 files reviewed, 1 unresolved discussion (waiting on @Itay-Tsabary-Starkware)


crates/apollo_deployments/src/deployments/consolidated.rs line 24 at r4 (raw file):

Previously, Itay-Tsabary-Starkware wrote…

Restore new line please

Done.

Copy link
Contributor

@Itay-Tsabary-Starkware Itay-Tsabary-Starkware left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 28 files reviewed, 2 unresolved discussions


crates/apollo_deployments/src/service.rs line 281 at r4 (raw file):

    fn get_service_ports(&self) -> BTreeSet<ServicePort>;

    fn get_ports(&self) -> BTreeMap<ServicePort, u16> {

Could you please rename to something more descriptive in comparsion to get_service_ports?

Maybe
get_ports -> get_service_port_values or get_service_port_mapping?

Code quote:

fn get_ports(

@nadin-Starkware nadin-Starkware force-pushed the 07-14-deployment_add_monitoring_endpoint_port_to_the_deployment_file branch from be56ded to b345a55 Compare July 16, 2025 07:15
Copy link
Collaborator Author

@nadin-Starkware nadin-Starkware left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 28 files reviewed, 2 unresolved discussions (waiting on @Itay-Tsabary-Starkware)


crates/apollo_deployments/src/service.rs line 281 at r4 (raw file):

Previously, Itay-Tsabary-Starkware wrote…

Could you please rename to something more descriptive in comparsion to get_service_ports?

Maybe
get_ports -> get_service_port_values or get_service_port_mapping?

Done.

@nadin-Starkware nadin-Starkware force-pushed the 07-14-deployment_add_monitoring_endpoint_port_to_the_deployment_file branch from b345a55 to b69ce7b Compare July 16, 2025 07:31
Copy link
Contributor

@Itay-Tsabary-Starkware Itay-Tsabary-Starkware left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 22 of 27 files at r1, 3 of 5 files at r4, 1 of 1 files at r5, 1 of 1 files at r6, all commit messages.
Reviewable status: 27 of 28 files reviewed, all discussions resolved

Copy link
Collaborator Author

@nadin-Starkware nadin-Starkware left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 5 files at r2.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @nadin-Starkware)

@nadin-Starkware nadin-Starkware added this pull request to the merge queue Jul 17, 2025
Merged via the queue into main with commit 2940ea3 Jul 17, 2025
26 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jul 19, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants