Repository navigation
Conversation
Bumps [goldenfile](https://github.com/calder/rust-goldenfile) from 1.9.1 to 1.11.0. <details> <summary>Commits</summary> <ul> <li>See full diff in <a href="https://github.com/calder/rust-goldenfile/commits">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> V3_GIT_ORIGIN_REV_ID: bd1aae94df7b0715b4260b917fb569046319984b
…ra#2438) <!-- The PR description should answer 2 important questions: --> ### What <!-- What is this PR trying to accomplish (and why, if it's not obvious)? --> <!-- Consider: do we need to add a changelog entry? --> <!-- Does this PR introduce new validation that might break old builds? --> <!-- Consider: do we need to put new checks behind a flag? --> Fix the regression of JWT auth between GraphQL Engine v2 and Hasura DDN. Currently, `x-hasura-allowed-roles` variable is useless. https://hasura.io/docs/2.0/auth/authentication/jwt/#hasura-jwt-format > A x-hasura-default-role field. The role that will be used when the optional `x-hasura-role` header is not passed. ### How <!-- How is it trying to accomplish it (what are the implementation steps)? --> - Check if the `x-hasura-role` header exists. - Validate if the value of `x-hasura-role` is in the `x-hasura-allowed-role` list. - Use this role instead of the`x-hasura-default-role` variable. --------- Co-authored-by: Daniel Harvey <danieljamesharvey@gmail.com> V3_GIT_ORIGIN_REV_ID: f3859f24127a75aad54333c067c1e55d58d01d96
PR-URL: hasura/graphql-engine-mono#11451 GitOrigin-RevId: 5a584e16c1aeb18dbd1f6e480efd5258c76fc138
GitOrigin-RevId: f2742d0953b1a423dd6c13eb33c4a0cc8ba14587
- haskell:9.10.2-slim doesn't exist on Docker Hub, use 9.10.3 - Free disk space on GHA runner before build - Add 8GB swap for linker memory safety - Limit GHC to -j1 with 6.5GB heap cap - Increase timeout to 180 min (Haskell builds are slow)
- Remove Citus and Cockroach from PostgresKind (now Vanilla-only) - Remove PostgresCitusKind/PostgresCockroachKind from BackendSourceKind - Remove PostgresCitusTag/PostgresCockroachTag from BackendTag - Remove PostgresCitusValue/PostgresCockroachValue from AnyBackend and all dispatch functions (liftTag, lowerTag, mapBackend, traverseBackend, mkAnyBackend, runBackend, dispatchAnyBackend*, composeAnyBackend, mergeAnyBackend, unpackAnyBackend, dispatchAnyBackendArrow, parseAnyBackendFromJSON, anyBackendCodec, backendSourceKindFromText, parseBackendSourceKindFromJSON) - Remove PostgresBackend 'Citus and 'Cockroach instances (Types.hs) - Remove Citus/Cockroach PostgresMetadata instances (Metadata.hs) - Remove Citus/Cockroach BackendAPI instances (API.hs) - Remove Citus/Cockroach BackendEventTrigger instances (Backend.hs) - Remove Citus/Cockroach PostgresSchema instances (Schema.hs) - Remove Citus/Cockroach PostgresAnnotatedFieldJSON instances - Remove Citus/Cockroach PostgresGenerateSQLSelect instances and applyCockroachDistinctOnWorkaround helper - Remove Citus/Cockroach ToMetadataFetchQuery, FetchTableMetadata, FetchFunctionMetadata instances (DDL/Source.hs) - Remove RQCitusRunSql/RQCockroachRunSql from V2Query API - Remove Citus/Cockroach subscription type detection (GraphQL/Execute.hs) - Remove CitusExtraTableMetadata from cabal exposed-modules - Remove citus_table_metadata.sql and cockroach_table_metadata.sql from cabal extra-source-files - Remove VersionCheck and PingSource (Cockroach-only) from cabal - Remove VersionCheckSpec from cabal test modules - Fix pg-client: remove text-builder from build-depends and fromBuilder from Transaction.hs; update all callers to use PG.fromText + toSQLTxt Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Remove the DataConnector backend entirely from the codebase, keeping only plain Postgres (Vanilla) and Remote Schemas. This includes: - Deleted server/lib/dc-api and all DataConnector adapter/plan modules - Removed DataConnector from BackendType, BackendTag, AnyBackend - Simplified backendSourceMetadataCodec to Postgres-only - Removed ciDataConnectors, _rmReloadDataConnectors, MODataConnectorAgent logic - Stubbed RMDCAddAgent/RMDCDeleteAgent with J.Value and NotSupported error - Added AgentLicenseKey stub to CredentialCache to preserve transport signatures - Updated test files (BackendMapSpec, MetadataSpec, VersionSpec) to remove references to removed backends Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
api-tests depends on dc-api which lives in dc-agents/ — excluded from the Docker context by .dockerignore. Remove api-tests, test-harness, and upgrade-tests dirs before cabal build to prevent Cabal-7107 dependency resolution failure.
graphql-parser declares text-builder as a dependency but doesn't use it, causing GHC-42258 with -Werror from dev-sh.project.local. Production builds don't need -Werror on third-party packages.
dev-sh.project.local sets program-options ghc-options: -Werror which can't be overridden by package * ghc-options. This causes graphql-parser to fail on -Wunused-packages (text-builder). Use standalone production config instead.
Without cabal.project.freeze, cabal resolves text-builder 1.0.0.5 which renamed Text.Builder to TextBuilder, breaking graphql-parser. Pin to 0.6.x to match upstream's freeze file.
Removing cabal.project.freeze caused cascading dependency issues: text-builder 1.0 (breaking API rename), jose/crypton incompatibility. Keep the upstream freeze file (all deps pinned to known-good versions), only relax the base version constraint for GHC 9.10.3 compatibility.
GHC 9.10.3 ships newer base, ghc-internal, ghc-boot, ghc-prim, etc. The freeze file pins 9.10.2 versions. Remove all boot library pins (they're installed with GHC and can't be overridden anyway) while keeping all third-party dependency pins intact.
Use ghc-pkg list to detect all boot/bundled packages installed with this GHC version, then remove their pins from the freeze file. Handles the full set (base, ghc, ghc-internal, Cabal, text, containers, etc.) without hardcoding package names.
Deleting constraint lines broke the freeze file syntax (first constraint on same line as 'constraints:' keyword). Replace with >=0 instead.
GHC 9.10.3 breaks multiple third-party deps (text-2.1.2 exports show, causing ambiguous name errors in mustache, etc.). The freeze file was built for 9.10.2 — use that instead of fighting every incompatibility.
Build fixes: - Add PostgresKind(..) to BackendMap.hs import (fixes Vanilla not in scope) - Add server/CURRENT_VERSION file (fixes compile-time version bake) - Remove unixodbc from Dockerfile (only needed for MSSQL) Dead code removal (62 files): - server/src-lib/Hasura/Backends/MSSQL/ (39 modules) - server/src-lib/Hasura/Backends/BigQuery/ (23 modules) - server/src-lib/Database/MSSQL/ (Pool, Transaction) - server/src-rsr/mssql/ (SQL templates) - server/test-mssql/ (test suite) - Remove odbc dep, MSSQL/BQ module refs from graphql-engine.cabal - Remove MSSQL import + CacheRM instance from SchemaCache.hs - Remove unused MSSQL/BigQuery comparison_exp names from Name.hs BigQuery experimental feature flags left as harmless dead code (entangled with Schema.Options, safe to remove in follow-up).
Dependencies.hs line 326 still referenced MODataConnectorAgent which was removed with the DataConnector backend strip. This was the sole build error — 439/441 modules compiled before GHC-76037 killed it.
…357) GHC 9.10.2 doesn't support trailing commas in record syntax. Previous fix removed the MODataConnectorAgent pattern match, revealing this parse error in the next compilation pass.
…data.hs:715) MODataConnectorAgent was removed from the MetadataObjId data type as part of DataConnector removal but the pattern match in purgeMetadataObj was not cleaned up, causing GHC-76037 'Not in scope: data constructor' error.
ReloadMetadata now has 3 fields (DC field removed), but runReloadMetadata still destructured 4. Another DataConnector remnant.
…ebug.Stub) Main.hs imports GHC.Debug.Stub for the maybeWithGhcDebug function but ghc-debug-stub was missing from the executable's build-depends stanza, causing GHC-87110 'Could not find module' error in CI.
cabal list-bin graphql-engine occasionally returns empty output in CI, causing 'cp: missing destination file operand'. Add a find-based fallback to locate the compiled binary in dist-newstyle if list-bin fails.
Adds an optional 'schema_file' field to RemoteSchemaDef. When set,
Hasura reads the introspection JSON from the local filesystem instead
of making an HTTP request to the remote endpoint at startup.
The URL is still required for runtime query forwarding — this only
skips the introspection call. The file format is standard GraphQL
introspection JSON ({"data": {"__schema": {...}}}).
Usage in metadata:
{
"type": "add_remote_schema",
"args": {
"name": "my-service",
"definition": {
"url": "https://my-service/v1/graphql",
"schema_file": "/etc/hasura/schemas/my-service.json"
}
}
}
Benefits:
- Faster boot (no network round-trip for large schemas)
- No dependency on remote service being up during Hasura startup
- Deterministic schema (baked into image at build time)
- Avoids introspection timeout on very large schemas (20K+ types)
Remote schema management via metadata API is now disabled. Returns 'not supported' error for add/update/remove/reload. Only supports loading from local file via schema_file config. Introspection endpoint still works for querying existing schema.
- Telemetry.hs reduced to no-op stub (sleep forever) - Remote schema metadata API endpoints now return 'not supported' - Only file-based remote schema loading supported - dc-agents already removed in prior commit
- Scheduled trigger API endpoints now return 'not supported' - Apollo Federation hardcoded to disabled (isApolloFederationEnabled always returns False) - Removed docs/, cli/, community/, install-manifests/ (~153MB)
The schema_file feature in fetchRemoteSchema (RemoteServer.hs:70) was implemented but unreachable because commit 36b43b3 blanket-blocked all remote schema API endpoints with throw400 NotSupported. Unblock RMAddRemoteSchema (calls runAddRemoteSchema which triggers fetchRemoteSchema → reads schema_file from disk if set), plus RMRemoveRemoteSchema and RMReloadRemoteSchema for manageability. Permissions and relationship endpoints remain blocked as they're not needed for the static schema_file use case.
|
Important Review skippedToo many files! This PR contains 299 files, which is 149 over the limit of 150. ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (299)
You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
…docs Implements the HASURA_GRAPHQL_REMOTE_SCHEMA_FILE environment variable as a global fallback for remote schema file paths. Priority order: 1. schema_file in remote schema metadata definition (per-schema) 2. HASURA_GRAPHQL_REMOTE_SCHEMA_FILE env var (global fallback) 3. Live HTTP introspection (default upstream behaviour) Also rewrites the README documentation section with: - Accurate description of both mechanisms - File format specification - Kubernetes/Docker usage example with ConfigMap volume mount - Introspection query snippet for generating the file - Updated Docker image tag reference
binary64
force-pushed
the
feat/hasura-lean-schema
branch
from
March 23, 2026 20:08
ce13efd to
2c8f3a3
Compare
binary64
force-pushed
the
feat/hasura-lean-schema
branch
from
March 23, 2026 21:34
2c8f3a3 to
5a1bc1b
Compare
… paths) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…d via glob) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Avoids the ~2 GB memory spike from live GraphQL introspection at Hasura startup by allowing remote schema definitions to load from a pre-fetched local JSON file instead.
Changes
schema_fileinadd_remote_schemametadataAdd an optional
schema_filefield to the remote schemadefinitionobject:{ "type": "add_remote_schema", "args": { "name": "my_api", "definition": { "url": "https://api.example.com/graphql", "schema_file": "/etc/hasura/schemas/my_api.json" } } }When
schema_fileis set, Hasura reads the introspection JSON from disk instead of performing an HTTP introspection request. Theurlfield is still required for runtime query forwarding.HASURA_GRAPHQL_REMOTE_SCHEMA_FILEenvironment variableA global fallback for any remote schema that doesn't have
schema_fileset in metadata:Priority order:
schema_filein metadata >HASURA_GRAPHQL_REMOTE_SCHEMA_FILEenv var > live HTTP introspection.File format
Standard GraphQL introspection JSON response:
{"data": {"__schema": {"queryType": {"name": "Query"}, "types": [...]}}}Impact
schema_filefalls through to live introspection