hasura / hasura/graphql-engine

hasura console from CLI won't start if console is disabled on the server BUT assets directory is set

Open
#7,841 0 comments 1 reaction 0 assignees View on GitHub
c/cli k/bug support/needs-triage t/product-platform
Dominant language
TypeScript
Stars
32.1k
Forks
3k
PR merge metrics
PR metrics pending

Description

### Version Information

Server Version: 2.0.10
CLI Version (for CLI related issue): 2.0.10

### Environment

Docker

### What is the expected behaviour?

`hasura run console` loads when `HASURA_GRAPHQL_ENABLE_CONSOLE=false` is set despite `HASURA_GRAPHQL_CONSOLE_ASSETS_DIR` being also set
### Keywords

hasura-cli, console

### What is the current behaviour?

When console is disabled on the server, but a console assets directory is given, it won't be possible to start the console from the CLI correctly, as `cdnAssets` will be set to `false`. As the console is disabled in the server, the frontend won't find the assets and will get a 404...

### Can you identify the location in the source code where the problem exists?

(https://github.com/hasura/graphql-engine/blob/52efcc208db598aea4326f80ab8b328738e3e1d7/cli/commands/console.go#L124)
In addition to checking if `ConsoleAssetsDir` is set, it must also check the console is enabled.

### If the bug is confirmed, would you be willing to submit a PR?

no - I don't know go

Contributor guide

Open the contributing guide

Research direction

Start in cli/commands/console.go around line 124 and inspect how ConsoleAssetsDir and console enablement determine the cdnAssets setting for `hasura run console`. Verify the behavior with HASURA_GRAPHQL_ENABLE_CONSOLE=false and HASURA_GRAPHQL_CONSOLE_ASSETS_DIR set. Done means the CLI console loads correctly in that configuration without breaking the disabled-console behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.