Skip to content

Commit

Permalink
fix: recreating hasura3/ from scratch (#2409)
Browse files Browse the repository at this point in the history
* Cleaned out all the old sqlmesh stuff and starting over
  • Loading branch information
ryscheng authored Oct 25, 2024
1 parent cb15be5 commit 781d336
Show file tree
Hide file tree
Showing 38 changed files with 1,858 additions and 26,120 deletions.
3 changes: 2 additions & 1 deletion apps/hasura3/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
engine/build
.env*
/.env
/.env.*
2 changes: 1 addition & 1 deletion apps/hasura3/.hasura/context.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ definition:
current: default
contexts:
default:
project: dominant-snipe-4871
project: valid-robin-8499
supergraph: ../supergraph.yaml
subgraph: ../oso_subgraph/subgraph.yaml
localEnvFile: ../.env
Expand Down
Empty file added apps/hasura3/app/metadata/.keep
Empty file.
2 changes: 1 addition & 1 deletion apps/hasura3/app/subgraph.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ definition:
generator:
rootPath: .
includePaths:
- metadata
- metadata
20 changes: 9 additions & 11 deletions apps/hasura3/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,16 @@ services:
engine:
build:
context: engine
dockerfile_inline: |-
FROM ghcr.io/hasura/v3-engine
COPY ./build /md/
develop:
watch:
- action: sync+restart
path: engine/build
target: /md/
env_file:
- engine/.env.engine
dockerfile: Dockerfile.engine
pull: true
environment:
AUTHN_CONFIG_PATH: /md/auth_config.json
ENABLE_CORS: "true"
INTROSPECTION_METADATA_FILE: /md/metadata.json
METADATA_PATH: /md/open_dd.json
OTLP_ENDPOINT: http://local.hasura.dev:4317
extra_hosts:
- local.hasura.dev=host-gateway
- local.hasura.dev:host-gateway
ports:
- mode: ingress
protocol: tcp
Expand Down
5 changes: 0 additions & 5 deletions apps/hasura3/engine/.env.engine

This file was deleted.

2 changes: 2 additions & 0 deletions apps/hasura3/engine/Dockerfile.engine
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
FROM ghcr.io/hasura/v3-engine
COPY ./build /md/
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ version: v2
definition:
mode:
noAuth:
role: admin
role: anonymous
sessionVariables: {}
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
kind: CompatibilityConfig
date: "2024-08-27"
date: "2024-10-01"
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
---
kind: GraphqlConfig
version: v1
definition:
Expand Down Expand Up @@ -33,6 +32,3 @@ definition:
countDistinctFieldName: _count_distinct
mutation:
rootOperationTypeName: Mutation
apolloFederation:
enableRootFields: true

4 changes: 1 addition & 3 deletions apps/hasura3/globals/subgraph.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,4 @@ definition:
generator:
rootPath: .
includePaths:
- auth-config.hml
- compatibility-config.hml
- graphql-config.hml
- metadata
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
FROM ghcr.io/hasura/ndc-clickhouse:v1.0.5
COPY ./ /etc/connector
Original file line number Diff line number Diff line change
@@ -1,21 +1,29 @@
packagingDefinition:
type: PrebuiltDockerImage
dockerImage: "ghcr.io/hasura/ndc-clickhouse:v1.0.2"
dockerImage: "ghcr.io/hasura/ndc-clickhouse:v1.0.5"
supportedEnvironmentVariables:
- name: CLICKHOUSE_URL
description: The ClickHouse connection URL
defaultValue: ""
required: true
- name: CLICKHOUSE_USERNAME
description: The ClickHouse connection username
defaultValue: ""
required: true
- name: CLICKHOUSE_PASSWORD
description: The ClickHouse connection password
defaultValue: ""
required: true
commands:
update: hasura-clickhouse update
printSchemaAndCapabilities: hasura-clickhouse print-schema-and-capabilities
cliPlugin:
name: clickhouse
version: "v1.0.2"
version: "v1.0.5"
dockerComposeWatch:
- path: ./
target: /etc/connector
action: sync+restart
documentationPage: https://hasura.info/clickhouse-getting-started


17 changes: 5 additions & 12 deletions apps/hasura3/oso_subgraph/connector/oso_clickhouse/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,18 @@ services:
oso_subgraph_oso_clickhouse:
build:
context: .
dockerfile_inline: |-
FROM ghcr.io/hasura/ndc-clickhouse:v1.0.2
COPY ./ /etc/connector
develop:
watch:
- path: ./
action: sync+restart
target: /etc/connector
dockerfile: .hasura-connector/Dockerfile.oso_clickhouse
environment:
CLICKHOUSE_PASSWORD: $OSO_SUBGRAPH_OSO_CLICKHOUSE_CLICKHOUSE_PASSWORD
CLICKHOUSE_URL: $OSO_SUBGRAPH_OSO_CLICKHOUSE_CLICKHOUSE_URL
CLICKHOUSE_USERNAME: $OSO_SUBGRAPH_OSO_CLICKHOUSE_CLICKHOUSE_USERNAME
HASURA_SERVICE_TOKEN_SECRET: $OSO_SUBGRAPH_OSO_CLICKHOUSE_HASURA_SERVICE_TOKEN_SECRET
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: $OSO_SUBGRAPH_OSO_CLICKHOUSE_OTEL_EXPORTER_OTLP_TRACES_ENDPOINT
OTEL_EXPORTER_OTLP_ENDPOINT: $OSO_SUBGRAPH_OSO_CLICKHOUSE_OTEL_EXPORTER_OTLP_ENDPOINT
OTEL_SERVICE_NAME: $OSO_SUBGRAPH_OSO_CLICKHOUSE_OTEL_SERVICE_NAME
extra_hosts:
- local.hasura.dev=host-gateway
- local.hasura.dev:host-gateway
ports:
- mode: ingress
target: 8080
published: "8139"
protocol: tcp
published: "8763"
target: 8080
Loading

0 comments on commit 781d336

Please sign in to comment.