Skip to content

Commit

Permalink
Remove forward compatibility hacks related to compute HTTP servers (#…
Browse files Browse the repository at this point in the history
…10797)

These hacks were added to appease the forward compatibility tests and
can be removed.

Signed-off-by: Tristan Partin <[email protected]>
  • Loading branch information
tristan957 authored Feb 20, 2025
1 parent e808e94 commit f7474d3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 18 deletions.
15 changes: 6 additions & 9 deletions compute_tools/src/bin/compute_ctl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,16 +112,13 @@ struct Cli {
/// outside the compute will talk to the compute through this port. Keep
/// the previous name for this argument around for a smoother release
/// with the control plane.
///
/// TODO: Remove the alias after the control plane release which teaches the
/// control plane about the renamed argument.
#[arg(long, alias = "http-port", default_value_t = 3080)]
#[arg(long, default_value_t = 3080)]
pub external_http_port: u16,

/// The port to bind the internal listening HTTP server to. Clients like
/// The port to bind the internal listening HTTP server to. Clients include
/// the neon extension (for installing remote extensions) and local_proxy.
#[arg(long)]
pub internal_http_port: Option<u16>,
#[arg(long, default_value_t = 3081)]
pub internal_http_port: u16,

#[arg(short = 'D', long, value_name = "DATADIR")]
pub pgdata: String,
Expand Down Expand Up @@ -359,7 +356,7 @@ fn wait_spec(
pgbin: cli.pgbin.clone(),
pgversion: get_pg_version_string(&cli.pgbin),
external_http_port: cli.external_http_port,
internal_http_port: cli.internal_http_port.unwrap_or(cli.external_http_port + 1),
internal_http_port: cli.internal_http_port,
live_config_allowed,
state: Mutex::new(new_state),
state_changed: Condvar::new(),
Expand All @@ -383,7 +380,7 @@ fn wait_spec(

// The internal HTTP server could be launched later, but there isn't much
// sense in waiting.
Server::Internal(cli.internal_http_port.unwrap_or(cli.external_http_port + 1)).launch(&compute);
Server::Internal(cli.internal_http_port).launch(&compute);

if !spec_set {
// No spec provided, hang waiting for it.
Expand Down
14 changes: 5 additions & 9 deletions control_plane/src/endpoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -713,18 +713,14 @@ impl Endpoint {
println!("Also at '{}'", conn_str);
}
let mut cmd = Command::new(self.env.neon_distrib_dir.join("compute_ctl"));
//cmd.args([
// "--external-http-port",
// &self.external_http_address.port().to_string(),
//])
//.args([
// "--internal-http-port",
// &self.internal_http_address.port().to_string(),
//])
cmd.args([
"--http-port",
"--external-http-port",
&self.external_http_address.port().to_string(),
])
.args([
"--internal-http-port",
&self.internal_http_address.port().to_string(),
])
.args(["--pgdata", self.pgdata().to_str().unwrap()])
.args(["--connstr", &conn_str])
.args([
Expand Down

1 comment on commit f7474d3

@github-actions
Copy link

Choose a reason for hiding this comment

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

7730 tests run: 7345 passed, 1 failed, 384 skipped (full report)


Failures on Postgres 16

# Run all failed tests locally:
scripts/pytest -vv -n $(nproc) -k "test_branch_creation_many[release-pg16-github-actions-selfhosted-random-1024]"
Flaky tests (1)

Postgres 17

Code coverage* (full report)

  • functions: 32.9% (8618 of 26227 functions)
  • lines: 48.8% (72734 of 149029 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
f7474d3 at 2025-02-20T20:07:05.502Z :recycle:

Please sign in to comment.