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

neon-* 4344 #87

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Formula/neon-extension.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ class NeonExtension < Formula
desc "Extension enabling storage manager API and Pageserver communication"
homepage "https://github.com/neondatabase/neon"
url "https://github.com/neondatabase/neon.git",
tag: "release-4277",
revision: "e65be4c2dcb26011fcb963e8445854305795286e"
tag: "release-4344",
revision: "60af392e4506f880de81a14cc5c361cb0af8a47c"
license "Apache-2.0"
head "https://github.com/neondatabase/neon.git", branch: "main"

Expand Down
28 changes: 15 additions & 13 deletions Formula/neon-local.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ class NeonLocal < Formula
desc "CLI for running Neon locally"
homepage "https://github.com/neondatabase/neon"
url "https://github.com/neondatabase/neon.git",
tag: "release-4277",
revision: "e65be4c2dcb26011fcb963e8445854305795286e"
tag: "release-4344",
revision: "60af392e4506f880de81a14cc5c361cb0af8a47c"
license "Apache-2.0"
head "https://github.com/neondatabase/neon.git", branch: "main"

Expand Down Expand Up @@ -102,10 +102,11 @@ def post_install
assert_includes output, "tenant #{tenant_id} successfully created on the pageserver", output

ep_pg_port = free_port
system bin/"neon_local", "endpoint", "start", "ep-main-#{v}",
"--pg-version", vv,
"--tenant-id", tenant_id,
"--pg-port", ep_pg_port
system bin/"neon_local", "endpoint", "create", "ep-main-#{v}",
"--pg-version", vv,
"--tenant-id", tenant_id,
"--pg-port", ep_pg_port
system bin/"neon_local", "endpoint", "start", "ep-main-#{v}"

output = shell_output psql.call("SELECT VERSION()", ep_pg_port)
assert_match "PostgreSQL #{vv}", output.strip
Expand All @@ -121,11 +122,12 @@ def post_install
"--ancestor-start-lsn", lsn,
"--ancestor-branch-name", "main"
br_ep_pg_port = free_port
system bin/"neon_local", "endpoint", "start", "ep-branch-#{v}",
"--pg-version", vv,
"--branch-name", "branch",
"--tenant-id", tenant_id,
"--pg-port", br_ep_pg_port
system bin/"neon_local", "endpoint", "create", "ep-branch-#{v}",
"--pg-version", vv,
"--branch-name", "branch",
"--tenant-id", tenant_id,
"--pg-port", br_ep_pg_port
system bin/"neon_local", "endpoint", "start", "ep-branch-#{v}"

count_output = shell_output psql.call("SELECT COUNT(*) FROM test", br_ep_pg_port)
assert_match "1", count_output
Expand All @@ -134,8 +136,8 @@ def post_install
count_output = shell_output psql.call("SELECT COUNT(*) FROM test", br_ep_pg_port)
assert_match "2", count_output

system bin/"neon_local", "endpoint", "stop", "ep-branch-#{v}", "--tenant-id", tenant_id
system bin/"neon_local", "endpoint", "stop", "ep-main-#{v}", "--tenant-id", tenant_id
system bin/"neon_local", "endpoint", "stop", "--destroy", "ep-branch-#{v}"
system bin/"neon_local", "endpoint", "stop", "--destroy", "ep-main-#{v}"
end
ensure
system bin/"neon_local", "stop"
Expand Down
4 changes: 2 additions & 2 deletions Formula/neon-postgres.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ class NeonPostgres < Formula
desc "Neon's fork of PostgreSQL"
homepage "https://github.com/neondatabase/postgres"
url "https://github.com/neondatabase/neon.git",
tag: "release-4277",
revision: "e65be4c2dcb26011fcb963e8445854305795286e"
tag: "release-4344",
revision: "60af392e4506f880de81a14cc5c361cb0af8a47c"
license "Apache-2.0"
head "https://github.com/neondatabase/neon.git", branch: "main"

Expand Down
4 changes: 2 additions & 2 deletions Formula/neon-storage.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ class NeonStorage < Formula
desc "Storage components for Neon"
homepage "https://github.com/neondatabase/neon"
url "https://github.com/neondatabase/neon.git",
tag: "release-4277",
revision: "e65be4c2dcb26011fcb963e8445854305795286e"
tag: "release-4344",
revision: "60af392e4506f880de81a14cc5c361cb0af8a47c"
license "Apache-2.0"
head "https://github.com/neondatabase/neon.git", branch: "main"

Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@ Based on examples from [neondatabase/neon](https://github.com/neondatabase/neon#
neon-local start
neon-local tenant create --set-default # use `--pg-version \d+` for a particular Postgres version
neon-local tenant list
neon-local endpoint start main # use `--pg-version \d+` for a particular Postgres version, should match Postgres version for the tenant
neon_local endpoint create main # use `--pg-version \d+` for a particular Postgres version, should match Postgres version for the tenant
neon-local endpoint start main
neon-local endpoint list
neon-local timeline branch --branch-name test
neon-local timeline list
neon-local endpoint start test --branch-name test
neon_local endpoint create test --branch-name test
neon-local endpoint start test
```

```bash
Expand Down
Loading