From 314db983cf36d858bb9a6c318dc0c8e4cd2d53bd Mon Sep 17 00:00:00 2001 From: Tim Diekmann Date: Wed, 11 Dec 2024 03:55:45 +0100 Subject: [PATCH] Support DNS for HaRPC client and align environment variables --- .env | 8 +- .env.development | 3 + apps/hash-ai-worker-ts/README.md | 6 +- .../src/activities/shared/graph-api-client.ts | 4 +- apps/hash-ai-worker-ts/src/main.ts | 4 +- .../src/ensure-system-graph-is-initialized.ts | 4 +- .../src/generate-ontology-type-ids.ts | 4 +- apps/hash-api/src/index.ts | 12 +- .../src/seed-data/seed-flow-test-types.ts | 4 +- .../docker-compose.prod.yml | 10 +- apps/hash-graph/src/subcommand/server.rs | 29 ++-- apps/hash-graph/src/subcommand/test_server.rs | 12 +- apps/hash-integration-worker/README.md | 6 +- apps/hash-integration-worker/src/main.ts | 4 +- infra/terraform/hash/.terraform.lock.hcl | 127 +++++++++++------- infra/terraform/hash/hash_application/api.tf | 12 +- .../terraform/hash/hash_application/graph.tf | 57 +++++--- infra/terraform/hash/hash_application/main.tf | 27 +++- .../hash_application/temporal_worker_ai_ts.tf | 6 +- .../temporal_worker_integration.tf | 6 +- infra/terraform/hash/main.tf | 2 + infra/terraform/hash/prod-usea1.tfvars | 6 +- .../src/tests/util.ts | 4 +- tests/hash-backend-load/src/graph/api.ts | 4 +- 24 files changed, 217 insertions(+), 144 deletions(-) diff --git a/.env b/.env index 951fd1c773d..c8c770b5c88 100644 --- a/.env +++ b/.env @@ -70,7 +70,7 @@ HASH_TEMPORAL_VISIBILITY_PG_DATABASE=temporal_visibility HASH_GRAPH_PG_USER=graph HASH_GRAPH_PG_PASSWORD=graph HASH_GRAPH_PG_DATABASE=graph -HASH_GRAPH_LOG_LEVEL=trace,h2=info,tokio_util=debug,tower=info,tonic=debug,hyper=info,tokio_postgres=info,rustls=info,tarpc=warn +HASH_GRAPH_LOG_LEVEL=info HASH_GRAPH_TYPE_FETCHER_HOST=localhost HASH_GRAPH_TYPE_FETCHER_PORT=4455 @@ -78,8 +78,10 @@ HASH_GRAPH_TYPE_FETCHER_PORT=4455 HASH_GRAPH_REALTIME_PG_USER=realtime HASH_GRAPH_REALTIME_PG_PASSWORD=realtime -HASH_GRAPH_API_HOST=127.0.0.1 -HASH_GRAPH_API_PORT=4000 +HASH_GRAPH_HTTP_HOST=127.0.0.1 +HASH_GRAPH_HTTP_PORT=4000 +HASH_GRAPH_RPC_HOST=127.0.0.1 +HASH_GRAPH_RPC_PORT=4002 HASH_GRAPH_TEST_API_HOST=127.0.0.1 HASH_GRAPH_TEST_API_PORT=4001 diff --git a/.env.development b/.env.development index 0fb81c8a829..183708f08c3 100644 --- a/.env.development +++ b/.env.development @@ -8,6 +8,9 @@ HASH_TEMPORAL_PG_DATABASE=dev_temporal HASH_TEMPORAL_VISIBILITY_PG_DATABASE=dev_temporal_visibility HASH_GRAPH_PG_DATABASE=dev_graph +HASH_GRAPH_RPC_ENABLED=true +HASH_RPC_ENABLED=true + # For locally-running minio instance AWS_REGION=local AWS_S3_UPLOADS_ENDPOINT=http://localhost:9000 diff --git a/apps/hash-ai-worker-ts/README.md b/apps/hash-ai-worker-ts/README.md index c7ca127c15b..fd9d5ee4767 100644 --- a/apps/hash-ai-worker-ts/README.md +++ b/apps/hash-ai-worker-ts/README.md @@ -10,8 +10,10 @@ The service uses the following environment variables: - `HASH_TEMPORAL_SERVER_PORT`: The port that the Temporal server is running on (defaults to `7233`). - `OPENAI_API_KEY`: The OpenAI API key that is made available to workflows and activities. - `ANTHROPIC_API_KEY`: The Anthropic API key that is made available to workflows and activities. -- `HASH_GRAPH_API_HOST`: The host address that the HASH Graph API is running on, e.g. `graph`, `127.0.0.1` -- `HASH_GRAPH_API_PORT`: The port that the HASH Graph API is running on, e.g. `4000` +- `HASH_GRAPH_HTTP_HOST`: The host address that the HASH Graph service is running on, e.g. `graph`, `127.0.0.1` +- `HASH_GRAPH_HTTP_PORT`: The port that the HASH Graph HTTP service is running on, e.g. `4000` +- `HASH_GRAPH_RPC_HOST`: The host address that the HASH Graph RPC service is running on, e.g. `graph`, `127.0.0.1` +- `HASH_GRAPH_RPC_PORT`: The port that the HASH Graph RPC service is running on, e.g. `4002` - `INTERNAL_API_HOST`: The host for the internal API, required if the internal API is not running locally for workflows making use of the `getWebSearchResultsActivity` activity - `INTERNAL_API_KEY`: The API key used to authenticate with the internal API, required for workflows making use of the `getWebSearchResultsActivity` activity - `HASH_VAULT_HOST`: The host address (including protocol) that the Vault server is running on, e.g. `http://127.0.0.1` diff --git a/apps/hash-ai-worker-ts/src/activities/shared/graph-api-client.ts b/apps/hash-ai-worker-ts/src/activities/shared/graph-api-client.ts index bd02e593e79..4fd91257959 100644 --- a/apps/hash-ai-worker-ts/src/activities/shared/graph-api-client.ts +++ b/apps/hash-ai-worker-ts/src/activities/shared/graph-api-client.ts @@ -4,6 +4,6 @@ import { getRequiredEnv } from "@local/hash-backend-utils/environment"; import { logger } from "../../shared/logger.js"; export const graphApiClient = createGraphClient(logger, { - host: getRequiredEnv("HASH_GRAPH_API_HOST"), - port: parseInt(getRequiredEnv("HASH_GRAPH_API_PORT"), 10), + host: getRequiredEnv("HASH_GRAPH_HTTP_HOST"), + port: parseInt(getRequiredEnv("HASH_GRAPH_HTTP_PORT"), 10), }); diff --git a/apps/hash-ai-worker-ts/src/main.ts b/apps/hash-ai-worker-ts/src/main.ts index 504a5c4d92c..f1d5ddec316 100644 --- a/apps/hash-ai-worker-ts/src/main.ts +++ b/apps/hash-ai-worker-ts/src/main.ts @@ -100,8 +100,8 @@ async function run() { logger.info("Starting AI worker..."); const graphApiClient = createGraphClient(logger, { - host: getRequiredEnv("HASH_GRAPH_API_HOST"), - port: parseInt(getRequiredEnv("HASH_GRAPH_API_PORT"), 10), + host: getRequiredEnv("HASH_GRAPH_HTTP_HOST"), + port: parseInt(getRequiredEnv("HASH_GRAPH_HTTP_PORT"), 10), }); logger.info("Created Graph client"); diff --git a/apps/hash-api/src/ensure-system-graph-is-initialized.ts b/apps/hash-api/src/ensure-system-graph-is-initialized.ts index 380923429f1..0ae3562763d 100644 --- a/apps/hash-api/src/ensure-system-graph-is-initialized.ts +++ b/apps/hash-api/src/ensure-system-graph-is-initialized.ts @@ -14,8 +14,8 @@ const context: ImpureGraphContext = { }, }, graphApi: createGraphClient(logger, { - host: getRequiredEnv("HASH_GRAPH_API_HOST"), - port: parseInt(getRequiredEnv("HASH_GRAPH_API_PORT"), 10), + host: getRequiredEnv("HASH_GRAPH_HTTP_HOST"), + port: parseInt(getRequiredEnv("HASH_GRAPH_HTTP_PORT"), 10), }), temporalClient: await createTemporalClient(logger), }; diff --git a/apps/hash-api/src/generate-ontology-type-ids.ts b/apps/hash-api/src/generate-ontology-type-ids.ts index 7aca3bbf2b6..a7cc35c1206 100644 --- a/apps/hash-api/src/generate-ontology-type-ids.ts +++ b/apps/hash-api/src/generate-ontology-type-ids.ts @@ -184,8 +184,8 @@ const generateOntologyIds = async () => { serviceName: "generate-ontology-ids", }); - const graphApiHost = getRequiredEnv("HASH_GRAPH_API_HOST"); - const graphApiPort = parseInt(getRequiredEnv("HASH_GRAPH_API_PORT"), 10); + const graphApiHost = getRequiredEnv("HASH_GRAPH_HTTP_HOST"); + const graphApiPort = parseInt(getRequiredEnv("HASH_GRAPH_HTTP_PORT"), 10); const graphApi = createGraphClient(logger, { host: graphApiHost, diff --git a/apps/hash-api/src/index.ts b/apps/hash-api/src/index.ts index d5733cab7f7..79af0468000 100644 --- a/apps/hash-api/src/index.ts +++ b/apps/hash-api/src/index.ts @@ -212,8 +212,8 @@ const main = async () => { const redisEncryptedTransit = process.env.HASH_REDIS_ENCRYPTED_TRANSIT === "true"; - const graphApiHost = getRequiredEnv("HASH_GRAPH_API_HOST"); - const graphApiPort = parseInt(getRequiredEnv("HASH_GRAPH_API_PORT"), 10); + const graphApiHost = getRequiredEnv("HASH_GRAPH_HTTP_HOST"); + const graphApiPort = parseInt(getRequiredEnv("HASH_GRAPH_HTTP_PORT"), 10); await Promise.all([ waitOnResource(`tcp:${redisHost}:${redisPort}`, logger), @@ -542,8 +542,8 @@ const main = async () => { shutdown.addCleanup("ManagedRuntime", () => runtime.dispose()); - const rpcHost = process.env.HASH_RPC_HOST ?? "127.0.0.1"; - const rpcPort = parseInt(process.env.HASH_RPC_PORT ?? "4002", 10); + const rpcHost = getRequiredEnv("HASH_GRAPH_RPC_HOST"); + const rpcPort = parseInt(process.env.HASH_GRAPH_RPC_PORT ?? "4002", 10); app.get("/rpc/echo", (req, res, next) => { // eslint-disable-next-line func-names @@ -560,10 +560,10 @@ const main = async () => { }).pipe( Effect.provide( RpcClient.connectLayer( - Transport.multiaddr(`/ip4/${rpcHost}/tcp/${rpcPort}`), + Transport.multiaddr(`/dns/${rpcHost}/tcp/${rpcPort}`), ), ), - Logger.withMinimumLogLevel(LogLevel.Trace), + Logger.withMinimumLogLevel(LogLevel.Info), ); runtime.runCallback(effect, { diff --git a/apps/hash-api/src/seed-data/seed-flow-test-types.ts b/apps/hash-api/src/seed-data/seed-flow-test-types.ts index 39255ac2606..5aaa088b941 100644 --- a/apps/hash-api/src/seed-data/seed-flow-test-types.ts +++ b/apps/hash-api/src/seed-data/seed-flow-test-types.ts @@ -165,8 +165,8 @@ const createSystemEntityTypeIfNotExists: ImpureGraphFunction< */ const seedFlowTestTypes = async () => { const graphApi = createGraphClient(logger, { - host: getRequiredEnv("HASH_GRAPH_API_HOST"), - port: parseInt(getRequiredEnv("HASH_GRAPH_API_PORT"), 10), + host: getRequiredEnv("HASH_GRAPH_HTTP_HOST"), + port: parseInt(getRequiredEnv("HASH_GRAPH_HTTP_PORT"), 10), }); const context = { graphApi, provenance }; diff --git a/apps/hash-external-services/docker-compose.prod.yml b/apps/hash-external-services/docker-compose.prod.yml index 1f6ccea9777..822c55d3d4e 100644 --- a/apps/hash-external-services/docker-compose.prod.yml +++ b/apps/hash-external-services/docker-compose.prod.yml @@ -153,8 +153,8 @@ services: HASH_GRAPH_ALLOWED_URL_DOMAIN_PATTERN: "${HASH_GRAPH_ALLOWED_URL_DOMAIN_PATTERN}" HASH_GRAPH_TYPE_FETCHER_HOST: "type-fetcher" HASH_GRAPH_TYPE_FETCHER_PORT: "${HASH_GRAPH_TYPE_FETCHER_PORT}" - HASH_GRAPH_API_HOST: "0.0.0.0" - HASH_GRAPH_API_PORT: "${HASH_GRAPH_API_PORT}" + HASH_GRAPH_HTTP_HOST: "0.0.0.0" + HASH_GRAPH_HTTP_PORT: "${HASH_GRAPH_HTTP_PORT}" HASH_GRAPH_LOG_LEVEL: "${HASH_GRAPH_LOG_LEVEL}" HASH_GRAPH_LOG_CONSOLE_FORMAT: "${HASH_GRAPH_LOG_CONSOLE_FORMAT:-full}" HASH_GRAPH_LOG_FOLDER: "/logs/graph-service" @@ -173,7 +173,7 @@ services: "server", "--healthcheck", "--api-port", - "${HASH_GRAPH_API_PORT}", + "${HASH_GRAPH_HTTP_PORT}", ] interval: 2s timeout: 2s @@ -197,8 +197,8 @@ services: API_ORIGIN: "${API_ORIGIN}" HASH_SEED_USERS: "${HASH_SEED_USERS}" - HASH_GRAPH_API_HOST: "graph" - HASH_GRAPH_API_PORT: "${HASH_GRAPH_API_PORT}" + HASH_GRAPH_HTTP_HOST: "graph" + HASH_GRAPH_HTTP_PORT: "${HASH_GRAPH_HTTP_PORT}" LOG_LEVEL: "${LOG_LEVEL}" HASH_REDIS_HOST: "redis" diff --git a/apps/hash-graph/src/subcommand/server.rs b/apps/hash-graph/src/subcommand/server.rs index ef12041b08a..a0d44339a2d 100644 --- a/apps/hash-graph/src/subcommand/server.rs +++ b/apps/hash-graph/src/subcommand/server.rs @@ -38,33 +38,22 @@ use crate::{ }; #[derive(Debug, Clone, Parser)] -pub struct ApiAddress { +pub struct HttpAddress { /// The host the REST client is listening at. - #[clap(long, default_value = "127.0.0.1", env = "HASH_GRAPH_API_HOST")] + #[clap(long, default_value = "127.0.0.1", env = "HASH_GRAPH_HTTP_HOST")] pub api_host: String, /// The port the REST client is listening at. - #[clap(long, default_value_t = 4000, env = "HASH_GRAPH_API_PORT")] + #[clap(long, default_value_t = 4000, env = "HASH_GRAPH_HTTP_PORT")] pub api_port: u16, } -impl fmt::Display for ApiAddress { +impl fmt::Display for HttpAddress { fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result { write!(fmt, "{}:{}", self.api_host, self.api_port) } } -impl TryFrom for SocketAddr { - type Error = Report; - - fn try_from(address: ApiAddress) -> Result> { - address - .to_string() - .parse::() - .attach_printable(address) - } -} - #[derive(Debug, Clone, Parser)] pub struct RpcAddress { /// The host the RPC client is listening at. @@ -107,7 +96,7 @@ pub struct ServerArgs { /// The address the REST server is listening at. #[clap(flatten)] - pub api_address: ApiAddress, + pub http_address: HttpAddress, /// Enable the experimental RPC server. #[clap(long, default_value_t = false, env = "HASH_GRAPH_RPC_ENABLED")] @@ -237,7 +226,7 @@ where pub async fn server(args: ServerArgs) -> Result<(), Report> { if args.healthcheck { return wait_healthcheck( - || healthcheck(args.api_address.clone()), + || healthcheck(args.http_address.clone()), args.wait, args.timeout.map(Duration::from_secs), ) @@ -330,9 +319,9 @@ pub async fn server(args: ServerArgs) -> Result<(), Report> { rest_api_router(dependencies) }; - tracing::info!("Listening on {}", args.api_address); + tracing::info!("Listening on {}", args.http_address); axum::serve( - TcpListener::bind((args.api_address.api_host, args.api_address.api_port)) + TcpListener::bind((args.http_address.api_host, args.http_address.api_port)) .await .change_context(GraphError)?, router.into_make_service_with_connect_info::(), @@ -343,7 +332,7 @@ pub async fn server(args: ServerArgs) -> Result<(), Report> { Ok(()) } -pub async fn healthcheck(address: ApiAddress) -> Result<(), Report> { +pub async fn healthcheck(address: HttpAddress) -> Result<(), Report> { let request_url = format!("http://{address}/api-doc/openapi.json"); timeout( diff --git a/apps/hash-graph/src/subcommand/test_server.rs b/apps/hash-graph/src/subcommand/test_server.rs index 0ada05304c7..28a66faefc4 100644 --- a/apps/hash-graph/src/subcommand/test_server.rs +++ b/apps/hash-graph/src/subcommand/test_server.rs @@ -17,7 +17,7 @@ use tokio_postgres::NoTls; use crate::{ error::{GraphError, HealthcheckError}, - subcommand::{server::ApiAddress, wait_healthcheck}, + subcommand::{server::HttpAddress, wait_healthcheck}, }; #[derive(Debug, Parser)] @@ -31,7 +31,7 @@ pub struct TestServerArgs { /// The address the REST server is listening at. #[clap(flatten)] - pub api_address: ApiAddress, + pub http_address: HttpAddress, /// Runs the healthcheck for the test server. #[clap(long, default_value_t = false)] @@ -63,7 +63,7 @@ pub async fn test_server(args: TestServerArgs) -> Result<(), Report> if args.healthcheck { return wait_healthcheck( - || healthcheck(args.api_address.clone()), + || healthcheck(args.http_address.clone()), args.wait, args.timeout.map(Duration::from_secs), ) @@ -101,9 +101,9 @@ pub async fn test_server(args: TestServerArgs) -> Result<(), Report> let router = hash_graph_test_server::routes(pool, zanzibar_client); - tracing::info!("Listening on {}", args.api_address); + tracing::info!("Listening on {}", args.http_address); axum::serve( - TcpListener::bind((args.api_address.api_host, args.api_address.api_port)) + TcpListener::bind((args.http_address.api_host, args.http_address.api_port)) .await .change_context(GraphError)?, router.into_make_service_with_connect_info::(), @@ -114,7 +114,7 @@ pub async fn test_server(args: TestServerArgs) -> Result<(), Report> Ok(()) } -pub async fn healthcheck(address: ApiAddress) -> Result<(), Report> { +pub async fn healthcheck(address: HttpAddress) -> Result<(), Report> { let request_url = format!("http://{address}/snapshot"); timeout( diff --git a/apps/hash-integration-worker/README.md b/apps/hash-integration-worker/README.md index e5351b2d1d4..738b6fc54cf 100644 --- a/apps/hash-integration-worker/README.md +++ b/apps/hash-integration-worker/README.md @@ -6,8 +6,10 @@ This app is a Temporal worker that is able to run workflows and activities for d The service uses the following environment variables: -- `HASH_GRAPH_API_HOST`: The host address (including protocol) that the HASH Graph API is running on, e.g. `http://localhost` -- `HASH_GRAPH_API_PORT`: The port that the HASH Graph API is running on, e.g. `4000` +- `HASH_GRAPH_HTTP_HOST`: The host address that the HASH Graph HTTP service is running on, e.g. `graph`, `127.0.0.1` +- `HASH_GRAPH_HTTP_PORT`: The port that the HASH Graph HTTP service is running on, e.g. `4000` +- `HASH_GRAPH_RPC_HOST`: The host address that the HASH Graph RPC service is running on, e.g. `graph`, `127.0.0.1` +- `HASH_GRAPH_RPC_PORT`: The port that the HASH Graph RPC service is running on, e.g. `4002` - `HASH_TEMPORAL_SERVER_HOST`: The host address (including protocol) that the Temporal server is running on (defaults to `http://localhost`). - `HASH_TEMPORAL_SERVER_PORT`: The port that the Temporal server is running on (defaults to `7233`). - `HASH_VAULT_HOST`: The host address (including protocol) that the Vault server is running on, e.g. `http://127.0.0.1` diff --git a/apps/hash-integration-worker/src/main.ts b/apps/hash-integration-worker/src/main.ts index 519b7e1307e..62360813c69 100644 --- a/apps/hash-integration-worker/src/main.ts +++ b/apps/hash-integration-worker/src/main.ts @@ -84,8 +84,8 @@ async function run() { // eslint-disable-next-line no-console console.info("Starting integration worker..."); const graphApiClient = createGraphClient(logger, { - host: getRequiredEnv("HASH_GRAPH_API_HOST"), - port: parseInt(getRequiredEnv("HASH_GRAPH_API_PORT"), 10), + host: getRequiredEnv("HASH_GRAPH_HTTP_HOST"), + port: parseInt(getRequiredEnv("HASH_GRAPH_HTTP_PORT"), 10), }); const worker = await Worker.create({ diff --git a/infra/terraform/hash/.terraform.lock.hcl b/infra/terraform/hash/.terraform.lock.hcl index c7fc6608c3b..4e30f3aad9c 100644 --- a/infra/terraform/hash/.terraform.lock.hcl +++ b/infra/terraform/hash/.terraform.lock.hcl @@ -1,6 +1,29 @@ # This file is maintained automatically by "terraform init". # Manual edits may be lost in future updates. +provider "registry.terraform.io/cloudflare/cloudflare" { + version = "4.47.0" + constraints = "~> 4.0" + hashes = [ + "h1:1Te3c+iMmpQYOHrB2WP3rHSjOQgT46T8qfbwV6ocz3I=", + "zh:1df6a36bad08e95518987a15584e535a1dad5fa0ee6e067c0c39d709a285f6b9", + "zh:20dce2a63f24f571f4d52d3217811d71e8d21f149f751d5972ec19200674638a", + "zh:6571aeeb61d4a27b4210a1979028119a1905e162b0c3845e7b549d6e0a08c36d", + "zh:87ec7ebe65c8884e174999c22970e2f28b0da4e0f65bdc92db051eb3dd649f78", + "zh:890df766e9b839623b1f0437355032a3c006226a6c200cd911e15ee1a9014e9f", + "zh:a20d1c0865a9443ada90ab7c83bd8605024452cf1e9f3b2ed2efcf06221b7835", + "zh:a5a5a91f658029ae3bb0414643ca09bd6a98a1980e197a9eb2ea4ba96a190d88", + "zh:b12623a85840821c465b87b1d65542f8f4a77079afef0ad2cc102a9f6eb4045c", + "zh:b83ac4f0b81aee32b3670f5870245172741bb86b153623da687d3c45ec9c1af9", + "zh:bb1ad4fcb949b12e5b40a21e65963ff64e20e72ab4c87a3ec91306b440a2cf35", + "zh:cb5a8bc24444a9d8f536b5acb7f6346f12c03e23539b183cb370f4876992360f", + "zh:ce6cc02ac4fc8cdf48a64254fdb0ea859b5b48e7fc08c7f1fcb8e9364ed32434", + "zh:e44643c86d38799991f5eb2378c00ca4738ec0f21dd64536dadffd71a337d778", + "zh:e5024d6792fcaa974b5f294399eea9b9c7d3d5d228423e71941994858a20c58f", + "zh:f9b18d0443487e30e0f3b83e311f17c85d184dc9f55b3f9b31332e815c41745a", + ] +} + provider "registry.terraform.io/cyrilgdn/postgresql" { version = "1.18.0" constraints = "1.18.0" @@ -47,78 +70,78 @@ provider "registry.terraform.io/hashicorp/aws" { } provider "registry.terraform.io/hashicorp/external" { - version = "2.3.1" + version = "2.3.4" hashes = [ - "h1:gznGscVJ0USxy4CdihpjRKPsKvyGr/zqPvBoFLJTQDc=", - "zh:001e2886dc81fc98cf17cf34c0d53cb2dae1e869464792576e11b0f34ee92f54", - "zh:2eeac58dd75b1abdf91945ac4284c9ccb2bfb17fa9bdb5f5d408148ff553b3ee", - "zh:2fc39079ba61411a737df2908942e6970cb67ed2f4fb19090cd44ce2082903dd", - "zh:472a71c624952cff7aa98a7b967f6c7bb53153dbd2b8f356ceb286e6743bb4e2", - "zh:4cff06d31272aac8bc35e9b7faec42cf4554cbcbae1092eaab6ab7f643c215d9", + "h1:cCabxnWQ5fX1lS7ZqgUzsvWmKZw9FA7NRxAZ94vcTcc=", + "zh:037fd82cd86227359bc010672cd174235e2d337601d4686f526d0f53c87447cb", + "zh:0ea1db63d6173d01f2fa8eb8989f0809a55135a0d8d424b08ba5dabad73095fa", + "zh:17a4d0a306566f2e45778fbac48744b6fd9c958aaa359e79f144c6358cb93af0", + "zh:298e5408ab17fd2e90d2cd6d406c6d02344fe610de5b7dae943a58b958e76691", + "zh:38ecfd29ee0785fd93164812dcbe0664ebbe5417473f3b2658087ca5a0286ecb", + "zh:59f6a6f31acf66f4ea3667a555a70eba5d406c6e6d93c2c641b81d63261eeace", "zh:78d5eefdd9e494defcb3c68d282b8f96630502cac21d1ea161f53cfe9bb483b3", - "zh:7ed16ccd2049fa089616b98c0bd57219f407958f318f3c697843e2397ddf70df", - "zh:842696362c92bf2645eb85c739410fd51376be6c488733efae44f4ce688da50e", - "zh:8985129f2eccfd7f1841ce06f3bf2bbede6352ec9e9f926fbaa6b1a05313b326", - "zh:a5f0602d8ec991a5411ef42f872aa90f6347e93886ce67905c53cfea37278e05", - "zh:bf4ab82cbe5256dcef16949973bf6aa1a98c2c73a98d6a44ee7bc40809d002b8", - "zh:e70770be62aa70198fa899526d671643ff99eecf265bf1a50e798fc3480bd417", + "zh:ad0279dfd09d713db0c18469f585e58d04748ca72d9ada83883492e0dd13bd58", + "zh:c69f66fd21f5e2c8ecf7ca68d9091c40f19ad913aef21e3ce23836e91b8cbb5f", + "zh:d4a56f8c48aa86fc8e0c233d56850f5783f322d6336f3bf1916e293246b6b5d4", + "zh:f2b394ebd4af33f343835517e80fc876f79361f4688220833bc3c77655dd2202", + "zh:f31982f29f12834e5d21e010856eddd19d59cd8f449adf470655bfd19354377e", ] } provider "registry.terraform.io/hashicorp/local" { - version = "2.4.0" + version = "2.5.2" hashes = [ - "h1:ZUEYUmm2t4vxwzxy1BvN1wL6SDWrDxfH7pxtzX8c6d0=", - "zh:53604cd29cb92538668fe09565c739358dc53ca56f9f11312b9d7de81e48fab9", - "zh:66a46e9c508716a1c98efbf793092f03d50049fa4a83cd6b2251e9a06aca2acf", - "zh:70a6f6a852dd83768d0778ce9817d81d4b3f073fab8fa570bff92dcb0824f732", + "h1:IyFbOIO6mhikFNL/2h1iZJ6kyN3U00jgkpCLUCThAfE=", + "zh:136299545178ce281c56f36965bf91c35407c11897f7082b3b983d86cb79b511", + "zh:3b4486858aa9cb8163378722b642c57c529b6c64bfbfc9461d940a84cd66ebea", + "zh:4855ee628ead847741aa4f4fc9bed50cfdbf197f2912775dd9fe7bc43fa077c0", + "zh:4b8cd2583d1edcac4011caafe8afb7a95e8110a607a1d5fb87d921178074a69b", + "zh:52084ddaff8c8cd3f9e7bcb7ce4dc1eab00602912c96da43c29b4762dc376038", + "zh:71562d330d3f92d79b2952ffdda0dad167e952e46200c767dd30c6af8d7c0ed3", "zh:78d5eefdd9e494defcb3c68d282b8f96630502cac21d1ea161f53cfe9bb483b3", - "zh:82a803f2f484c8b766e2e9c32343e9c89b91997b9f8d2697f9f3837f62926b35", - "zh:9708a4e40d6cc4b8afd1352e5186e6e1502f6ae599867c120967aebe9d90ed04", - "zh:973f65ce0d67c585f4ec250c1e634c9b22d9c4288b484ee2a871d7fa1e317406", - "zh:c8fa0f98f9316e4cfef082aa9b785ba16e36ff754d6aba8b456dab9500e671c6", - "zh:cfa5342a5f5188b20db246c73ac823918c189468e1382cb3c48a9c0c08fc5bf7", - "zh:e0e2b477c7e899c63b06b38cd8684a893d834d6d0b5e9b033cedc06dd7ffe9e2", - "zh:f62d7d05ea1ee566f732505200ab38d94315a4add27947a60afa29860822d3fc", - "zh:fa7ce69dde358e172bd719014ad637634bbdabc49363104f4fca759b4b73f2ce", + "zh:805f81ade06ff68fa8b908d31892eaed5c180ae031c77ad35f82cb7a74b97cf4", + "zh:8b6b3ebeaaa8e38dd04e56996abe80db9be6f4c1df75ac3cccc77642899bd464", + "zh:ad07750576b99248037b897de71113cc19b1a8d0bc235eb99173cc83d0de3b1b", + "zh:b9f1c3bfadb74068f5c205292badb0661e17ac05eb23bfe8bd809691e4583d0e", + "zh:cc4cbcd67414fefb111c1bf7ab0bc4beb8c0b553d01719ad17de9a047adff4d1", ] } provider "registry.terraform.io/hashicorp/tls" { - version = "4.0.4" + version = "4.0.6" hashes = [ - "h1:GZcFizg5ZT2VrpwvxGBHQ/hO9r6g0vYdQqx3bFD3anY=", - "zh:23671ed83e1fcf79745534841e10291bbf34046b27d6e68a5d0aab77206f4a55", - "zh:45292421211ffd9e8e3eb3655677700e3c5047f71d8f7650d2ce30242335f848", - "zh:59fedb519f4433c0fdb1d58b27c210b27415fddd0cd73c5312530b4309c088be", - "zh:5a8eec2409a9ff7cd0758a9d818c74bcba92a240e6c5e54b99df68fff312bbd5", - "zh:5e6a4b39f3171f53292ab88058a59e64825f2b842760a4869e64dc1dc093d1fe", - "zh:810547d0bf9311d21c81cc306126d3547e7bd3f194fc295836acf164b9f8424e", - "zh:824a5f3617624243bed0259d7dd37d76017097dc3193dac669be342b90b2ab48", - "zh:9361ccc7048be5dcbc2fafe2d8216939765b3160bd52734f7a9fd917a39ecbd8", - "zh:aa02ea625aaf672e649296bce7580f62d724268189fe9ad7c1b36bb0fa12fa60", - "zh:c71b4cd40d6ec7815dfeefd57d88bc592c0c42f5e5858dcc88245d371b4b8b1e", - "zh:dabcd52f36b43d250a3d71ad7abfa07b5622c69068d989e60b79b2bb4f220316", + "h1:n3M50qfWfRSpQV9Pwcvuse03pEizqrmYEryxKky4so4=", + "zh:10de0d8af02f2e578101688fd334da3849f56ea91b0d9bd5b1f7a243417fdda8", + "zh:37fc01f8b2bc9d5b055dc3e78bfd1beb7c42cfb776a4c81106e19c8911366297", + "zh:4578ca03d1dd0b7f572d96bd03f744be24c726bfd282173d54b100fd221608bb", + "zh:6c475491d1250050765a91a493ef330adc24689e8837a0f07da5a0e1269e11c1", + "zh:81bde94d53cdababa5b376bbc6947668be4c45ab655de7aa2e8e4736dfd52509", + "zh:abdce260840b7b050c4e401d4f75c7a199fafe58a8b213947a258f75ac18b3e8", + "zh:b754cebfc5184873840f16a642a7c9ef78c34dc246a8ae29e056c79939963c7a", + "zh:c928b66086078f9917aef0eec15982f2e337914c5c4dbc31dd4741403db7eb18", + "zh:cded27bee5f24de6f2ee0cfd1df46a7f88e84aaffc2ecbf3ff7094160f193d50", + "zh:d65eb3867e8f69aaf1b8bb53bd637c99c6b649ba3db16ded50fa9a01076d1a27", + "zh:ecb0c8b528c7a619fa71852bb3fb5c151d47576c5aab2bf3af4db52588722eeb", "zh:f569b65999264a9416862bca5cd2a6177d94ccb0424f3a4ef424428912b9cb3c", ] } provider "registry.terraform.io/hashicorp/vault" { - version = "3.19.0" + version = "3.25.0" constraints = "~> 3.15" hashes = [ - "h1:wt3U9/SC+IDaif2Kkmxpl5pmEJ4spgKlus6UH6Ab95Q=", - "zh:2571ca03777afcb70d51d7f591bfa0bf770bbcc93bb87563ec295b17a9b21947", - "zh:25d096ab433e4eb5ed0f17f82beb661681c6abac93df35c15d5adf26da822709", - "zh:33776aa50d597448539251b4b706b4dbaf599ebee47a4244361400f93cd10986", - "zh:4d9d1fe67c0a7d2097f3d67fa867fd34dec6d880fe4d76e93bb38ccf74a2fadf", - "zh:5c2310226e1be065e75b7cf29633fd175a2180f5d9d9fb6f587e6b3d6ffb328d", - "zh:66b0e3e2819bb34fd592bb436391b08cb34f345832f4db1057b0169872537931", + "h1:3GN5k6zxDAI5gfcKENb/jnJyFGWA/0JoumnD6eyVZjs=", + "zh:430308f5dbd322a2e5afafd2be810f44eb35e28afa0aa0ac30b270cd6f413da8", + "zh:6c36da504c4af84ea9fbaf1e6c2560f691dc3d2d7f0b382a937bfae78830fa17", "zh:78d5eefdd9e494defcb3c68d282b8f96630502cac21d1ea161f53cfe9bb483b3", - "zh:85f44baf07eae1c9087c9ddb867d561d0fb6adf8f081558587c71bb99aba034f", - "zh:92cffaeebf531b27f5f1d798dca04813ae1541381e67cffe7157facf84a8f9c7", - "zh:c2964602306935ddd2d005b38207b57a919c1574737c3daff82e058a16439d7a", - "zh:cd7fe84a7030b59bc4457a251ec97e0286956a0c3fb489323affcb306116fdd1", - "zh:f68303735e4a2ac0e9122feb65f338d99bee835a4309ca34dac77879c8bfd637", + "zh:7bc39cb2a7d91631cb8be54b0b06de29fb47910923e54f779e74d8b218b1ab70", + "zh:7e4a5bebcfa19b9f1e3a6bbda5c6771b6dd28b3dfa19fdf3d4fced419cfa416f", + "zh:7ea473203b37d006a0d2b1cdc8bff55c96b3c5819dbb62862cdabff6f2f0e2f2", + "zh:9ad136feece62f0c545fefa4592b2cdaa896a39acb697fb129233dce880a69aa", + "zh:ad0c9980295c902804af23da0250830b912eb13089349bf5c7be0649fac2689c", + "zh:b305835cc13dcd9ec996d49d23163c6311f30786296f86ca5657b93aea4f3591", + "zh:d8fe6ab7da12efbb5b122ae9b6856375c5a3759add9df577a8fb448898ceffe3", + "zh:ef59ef2c06a55571e64fdd5888a074ed9556436738e9737e32bacab93ca133ff", + "zh:f59c2605d916e1806dc494241467dd430194f5e7bdbf331c5aca904873347ad8", ] } diff --git a/infra/terraform/hash/hash_application/api.tf b/infra/terraform/hash/hash_application/api.tf index 57df0aea3a8..da2564028f3 100644 --- a/infra/terraform/hash/hash_application/api.tf +++ b/infra/terraform/hash/hash_application/api.tf @@ -56,8 +56,10 @@ locals { [ { name = "HASH_TEMPORAL_SERVER_HOST", value = var.temporal_host }, { name = "HASH_TEMPORAL_SERVER_PORT", value = var.temporal_port }, - { name = "HASH_GRAPH_API_HOST", value = local.graph_container_port_dns }, - { name = "HASH_GRAPH_API_PORT", value = tostring(local.graph_container_port) }, + { name = "HASH_GRAPH_HTTP_HOST", value = local.graph_http_container_port_dns }, + { name = "HASH_GRAPH_HTTP_PORT", value = tostring(local.graph_http_container_port) }, + { name = "HASH_GRAPH_RPC_HOST", value = local.graph_rpc_container_port_dns }, + { name = "HASH_GRAPH_RPC_PORT", value = tostring(local.graph_rpc_container_port) }, ]) secrets = [ @@ -112,8 +114,10 @@ locals { [ { name = "HASH_TEMPORAL_SERVER_HOST", value = var.temporal_host }, { name = "HASH_TEMPORAL_SERVER_PORT", value = var.temporal_port }, - { name = "HASH_GRAPH_API_HOST", value = local.graph_container_port_dns }, - { name = "HASH_GRAPH_API_PORT", value = tostring(local.graph_container_port) }, + { name = "HASH_GRAPH_HTTP_HOST", value = local.graph_http_container_port_dns }, + { name = "HASH_GRAPH_HTTP_PORT", value = tostring(local.graph_http_container_port) }, + { name = "HASH_GRAPH_RPC_HOST", value = local.graph_rpc_container_port_dns }, + { name = "HASH_GRAPH_RPC_PORT", value = tostring(local.graph_rpc_container_port) }, ]) secrets = [ diff --git a/infra/terraform/hash/hash_application/graph.tf b/infra/terraform/hash/hash_application/graph.tf index a3efb0ba1ce..77e28b89e6b 100644 --- a/infra/terraform/hash/hash_application/graph.tf +++ b/infra/terraform/hash/hash_application/graph.tf @@ -1,10 +1,13 @@ locals { - graph_service_name = "graph" - graph_prefix = "${var.prefix}-${local.graph_service_name}" - graph_param_prefix = "${local.param_prefix}/${local.graph_service_name}" - graph_container_port = 4000 - graph_container_port_name = local.graph_service_name - graph_container_port_dns = "${local.graph_container_port_name}.${aws_service_discovery_private_dns_namespace.app.name}" + graph_service_name = "graph" + graph_prefix = "${var.prefix}-${local.graph_service_name}" + graph_param_prefix = "${local.param_prefix}/${local.graph_service_name}" + graph_http_container_port = 4000 + graph_http_container_port_name = "${local.graph_service_name}-http" + graph_http_container_port_dns = "${local.graph_http_container_port_name}.${aws_service_discovery_private_dns_namespace.app.name}" + graph_rpc_container_port = 4002 + graph_rpc_container_port_name = "${local.graph_service_name}-rpc" + graph_rpc_container_port_dns = "${local.graph_rpc_container_port_name}.${aws_service_discovery_private_dns_namespace.app.name}" } @@ -82,10 +85,18 @@ resource "aws_security_group" "graph" { } ingress { - from_port = local.graph_container_port - to_port = local.graph_container_port + from_port = local.graph_http_container_port + to_port = local.graph_http_container_port protocol = "tcp" - description = "Allow communication with the graph" + description = "Allow communication with the graph through OpenAPI" + cidr_blocks = [var.vpc.cidr_block] + } + + ingress { + from_port = local.graph_rpc_container_port + to_port = local.graph_rpc_container_port + protocol = "tcp" + description = "Allow communication with the graph through HaRPC" cidr_blocks = [var.vpc.cidr_block] } } @@ -124,10 +135,18 @@ resource "aws_ecs_service" "graph" { namespace = aws_service_discovery_private_dns_namespace.app.arn service { - port_name = local.graph_container_port_name + port_name = local.graph_http_container_port_name client_alias { - port = local.graph_container_port + port = local.graph_http_container_port + } + } + + service { + port_name = local.graph_rpc_container_port_name + + client_alias { + port = local.graph_rpc_container_port } } } @@ -180,9 +199,15 @@ locals { } portMappings = [ { - name = local.graph_container_port_name + name = local.graph_http_container_port_name appProtocol = "http" - containerPort = local.graph_container_port + containerPort = local.graph_http_container_port + protocol = "tcp" + }, + { + name = local.graph_rpc_container_port_name + appProtocol = "http2" + containerPort = local.graph_rpc_container_port protocol = "tcp" } ] @@ -200,8 +225,10 @@ locals { { name = env_var.name, value = env_var.value } if !env_var.secret ], [ - { name = "HASH_GRAPH_API_HOST", value = "0.0.0.0" }, - { name = "HASH_GRAPH_API_PORT", value = tostring(local.graph_container_port) }, + { name = "HASH_GRAPH_HTTP_HOST", value = "0.0.0.0" }, + { name = "HASH_GRAPH_HTTP_PORT", value = tostring(local.graph_http_container_port) }, + { name = "HASH_GRAPH_RPC_HOST", value = "0.0.0.0" }, + { name = "HASH_GRAPH_RPC_PORT", value = tostring(local.graph_rpc_container_port) }, { name = "HASH_GRAPH_TYPE_FETCHER_HOST", value = local.type_fetcher_container_port_dns }, { name = "HASH_GRAPH_TYPE_FETCHER_PORT", value = tostring(local.type_fetcher_container_port) }, { name = "HASH_SPICEDB_HOST", value = "http://${local.spicedb_container_http_port_dns}" }, diff --git a/infra/terraform/hash/hash_application/main.tf b/infra/terraform/hash/hash_application/main.tf index 0de27f0f4e5..c155f1aee02 100644 --- a/infra/terraform/hash/hash_application/main.tf +++ b/infra/terraform/hash/hash_application/main.tf @@ -136,10 +136,18 @@ resource "aws_security_group" "alb_sg" { } egress { - from_port = local.graph_container_port - to_port = local.graph_container_port + from_port = local.graph_http_container_port + to_port = local.graph_http_container_port protocol = "tcp" - description = "Allow connections to the graph from the load balancer" + description = "Allow connections to the Graph HTTP endpoint from the load balancer" + cidr_blocks = [var.vpc.cidr_block] + } + + egress { + from_port = local.graph_rpc_container_port + to_port = local.graph_rpc_container_port + protocol = "tcp" + description = "Allow connections to the Graph RPC endpoint from the load balancer" cidr_blocks = [var.vpc.cidr_block] } } @@ -500,10 +508,17 @@ resource "aws_security_group" "app_sg" { cidr_blocks = ["0.0.0.0/0"] } egress { - from_port = local.graph_container_port - to_port = local.graph_container_port + from_port = local.graph_http_container_port + to_port = local.graph_http_container_port + protocol = "tcp" + description = "Allow connections to the Graph HTTP interface" + cidr_blocks = [var.vpc.cidr_block] + } + egress { + from_port = local.graph_rpc_container_port + to_port = local.graph_rpc_container_port protocol = "tcp" - description = "Allow connections to the graph" + description = "Allow connections to the Graph RPC interface" cidr_blocks = [var.vpc.cidr_block] } diff --git a/infra/terraform/hash/hash_application/temporal_worker_ai_ts.tf b/infra/terraform/hash/hash_application/temporal_worker_ai_ts.tf index f920e39cc86..b7f316f6cee 100644 --- a/infra/terraform/hash/hash_application/temporal_worker_ai_ts.tf +++ b/infra/terraform/hash/hash_application/temporal_worker_ai_ts.tf @@ -47,8 +47,10 @@ locals { [ { name = "HASH_TEMPORAL_SERVER_HOST", value = var.temporal_host }, { name = "HASH_TEMPORAL_SERVER_PORT", value = var.temporal_port }, - { name = "HASH_GRAPH_API_HOST", value = local.graph_container_port_dns }, - { name = "HASH_GRAPH_API_PORT", value = tostring(local.graph_container_port) }, + { name = "HASH_GRAPH_HTTP_HOST", value = local.graph_http_container_port_dns }, + { name = "HASH_GRAPH_HTTP_PORT", value = tostring(local.graph_http_container_port) }, + { name = "HASH_GRAPH_RPC_HOST", value = local.graph_rpc_container_port_dns }, + { name = "HASH_GRAPH_RPC_PORT", value = tostring(local.graph_rpc_container_port) }, ], ) diff --git a/infra/terraform/hash/hash_application/temporal_worker_integration.tf b/infra/terraform/hash/hash_application/temporal_worker_integration.tf index ef43a90dbf2..50ea20dac5b 100644 --- a/infra/terraform/hash/hash_application/temporal_worker_integration.tf +++ b/infra/terraform/hash/hash_application/temporal_worker_integration.tf @@ -47,8 +47,10 @@ locals { [ { name = "HASH_TEMPORAL_SERVER_HOST", value = var.temporal_host }, { name = "HASH_TEMPORAL_SERVER_PORT", value = var.temporal_port }, - { name = "HASH_GRAPH_API_HOST", value = local.graph_container_port_dns }, - { name = "HASH_GRAPH_API_PORT", value = tostring(local.graph_container_port) }, + { name = "HASH_GRAPH_HTTP_HOST", value = local.graph_http_container_port_dns }, + { name = "HASH_GRAPH_HTTP_PORT", value = tostring(local.graph_http_container_port) }, + { name = "HASH_GRAPH_RPC_HOST", value = local.graph_rpc_container_port_dns }, + { name = "HASH_GRAPH_RPC_PORT", value = tostring(local.graph_rpc_container_port) }, ], ) diff --git a/infra/terraform/hash/main.tf b/infra/terraform/hash/main.tf index 4ceb8fec619..18b5d2a6f58 100644 --- a/infra/terraform/hash/main.tf +++ b/infra/terraform/hash/main.tf @@ -257,6 +257,7 @@ module "application" { { name = "HASH_GRAPH_PG_HOST", secret = false, value = module.postgres.pg_host }, { name = "HASH_GRAPH_PG_PORT", secret = false, value = module.postgres.pg_port }, { name = "HASH_GRAPH_PG_DATABASE", secret = false, value = "graph" }, + # { name = "HASH_GRAPH_RPC_ENABLED", secret = false, value = "true" }, { name = "HASH_SPICEDB_GRPC_PRESHARED_KEY", secret = true, value = sensitive(data.vault_kv_secret_v2.secrets.data["spicedb_grpc_preshared_key"]) @@ -357,6 +358,7 @@ module "application" { { name = "HASH_REDIS_PORT", secret = false, value = module.redis.node.port }, { name = "HASH_REDIS_ENCRYPTED_TRANSIT", secret = false, value = "true" }, { name = "HASH_INTEGRATION_QUEUE_NAME", secret = false, value = "integration" }, + # { name = "HASH_RPC_ENABLED", secret = false, value = "true" }, { name = "HASH_VAULT_HOST", secret = true, value = sensitive(data.vault_kv_secret_v2.secrets.data["hash_vault_host"]) diff --git a/infra/terraform/hash/prod-usea1.tfvars b/infra/terraform/hash/prod-usea1.tfvars index df6adc48aca..2a8aa8bb024 100644 --- a/infra/terraform/hash/prod-usea1.tfvars +++ b/infra/terraform/hash/prod-usea1.tfvars @@ -39,12 +39,12 @@ hydra_env_vars = [ { name = "COOKIES_PATH", secret = false, value = "/" }, { name = "SERVE_COOKIES_DOMAIN", secret = false, value = "hash.ai" }, { name = "SERVE_COOKIES_SAME_SITE_MODE", secret = false, value = "Lax" }, - { name = "URLS_CONSENT", secret = false, value = "https://app-api.hash.ai/oauth2/consent"}, + { name = "URLS_CONSENT", secret = false, value = "https://app-api.hash.ai/oauth2/consent" }, { name = "URLS_LOGIN", secret = false, value = "https://app.hash.ai/signin" }, { name = "URLS_REGISTRATION", secret = false, value = "https://app.hash.ai/signup" }, { name = "URLS_POST_LOGOUT_REDIRECT", secret = false, value = "https://app.hash.ai" }, { name = "URLS_IDENTITY_PROVIDER_PUBLICURL", secret = false, value = "http://localhost:4433" }, # Kratos public endpoint - { name = "URLS_IDENTITY_PROVIDER_URL", secret = false, value = "http://localhost:4434" }, # Kratos admin endpoint + { name = "URLS_IDENTITY_PROVIDER_URL", secret = false, value = "http://localhost:4434" }, # Kratos admin endpoint { name = "URLS_SELF_ISSUER", secret = false, value = "https://app-api.hash.ai" }, { name = "URLS_SELF_PUBLIC", secret = false, value = "https://app-api.hash.ai" } ] @@ -57,7 +57,7 @@ hash_graph_env_vars = [ { name = "HASH_GRAPH_LOG_FILE_ENABLED", secret = false, value = "false" }, { name = "HASH_GRAPH_LOG_CONSOLE_FORMAT", secret = false, value = "full" }, { name = "HASH_GRAPH_LOG_CONSOLE_COLOR", secret = false, value = "never" }, - { name = "HASH_GRAPH_LOG_LEVEL", secret = false, value = "trace,h2=info,tokio_util=debug,tower=info,tonic=debug,hyper=info,tokio_postgres=info,rustls=info,tarpc=info" }, + { name = "HASH_GRAPH_LOG_LEVEL", secret = false, value = "info" }, { name = "RUST_BACKTRACE", secret = false, value = "1" } ] diff --git a/tests/hash-backend-integration/src/tests/util.ts b/tests/hash-backend-integration/src/tests/util.ts index e20b08692fa..e53baccc02a 100644 --- a/tests/hash-backend-integration/src/tests/util.ts +++ b/tests/hash-backend-integration/src/tests/util.ts @@ -31,8 +31,8 @@ export const createTestImpureGraphContext = (): ImpureGraphContext< serviceName: "integration-tests", }); - const graphApiHost = getRequiredEnv("HASH_GRAPH_API_HOST"); - const graphApiPort = parseInt(getRequiredEnv("HASH_GRAPH_API_PORT"), 10); + const graphApiHost = getRequiredEnv("HASH_GRAPH_HTTP_HOST"); + const graphApiPort = parseInt(getRequiredEnv("HASH_GRAPH_HTTP_PORT"), 10); const graphApi = createGraphClient(logger, { host: graphApiHost, diff --git a/tests/hash-backend-load/src/graph/api.ts b/tests/hash-backend-load/src/graph/api.ts index 0c1070e7b32..06fc6668a32 100644 --- a/tests/hash-backend-load/src/graph/api.ts +++ b/tests/hash-backend-load/src/graph/api.ts @@ -17,8 +17,8 @@ export const getGraphApiClient = (): GraphApi => { serviceName: "hash-backend-load", }), { - host: getRequiredEnv("HASH_GRAPH_API_HOST"), - port: parseInt(getRequiredEnv("HASH_GRAPH_API_PORT"), 10), + host: getRequiredEnv("HASH_GRAPH_HTTP_HOST"), + port: parseInt(getRequiredEnv("HASH_GRAPH_HTTP_PORT"), 10), requestInterceptor: (request) => { opentelemetry.propagation.inject( opentelemetry.context.active(),