edgedb / edgedb-cli

The EdgeDB CLI
https://www.edgedb.com/docs/cli/index
Apache License 2.0
166 stars 23 forks source link

Unable to set `effective_io_concurrency` via CLI or REPL (`InternalServerError` when attempting from the REPL) #1140

Closed raddevon closed 10 months ago

raddevon commented 11 months ago

Steps to Reproduce:

  1. Start a new project (edgedb project init)
  2. Attempt to set effective_io_concurrency

via CLI

$ edgedb configure set effective_io_concurrency 10
edgedb error: ConfigurationError: invalid setting value type for effective_io_concurrency: 'std::str' (expecting 'std::int64')
…
$ edgedb configure set effective_io_concurrency <int64>10
zsh: no such file or directory: int64
$ edgedb configure set effective_io_concurrency \<int64\>10
edgedb error: ConfigurationError: invalid setting value type for effective_io_concurrency: 'std::str' (expecting 'std::int64')
…
$ edgedb configure set effective_io_concurrency "<int64>10"edgedb error: ConfigurationError: invalid setting value type for effective_io_concurrency: 'std::str' (expecting 'std::int64')

or via REPL:

edgedb> configure instance set effective_io_concurrency := 10;
edgedb error: InternalServerError: None
  Hint: This is most likely a bug in EdgeDB. Please consider opening an issue ticket at https://github.com/edgedb/edgedb/issues/new?template=bug_report.md
  Server traceback:
      Traceback (most recent call last):
        File "/Users/raddevon/Library/Application Support/edgedb/portable/3.3/lib/python3.11/site-packages/edb/pgsql/compiler/__init__.py", line 134, in compile_ir_to_sql_tree
          qtree = dispatch.compile(ir_expr, ctx=ctx)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/Users/raddevon/Library/Application Support/edgedb/portable/3.3/lib/python3.11/functools.py", line 909, in wrapper
          return dispatch(args[0].__class__)(*args, **kw)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/Users/raddevon/Library/Application Support/edgedb/portable/3.3/lib/python3.11/site-packages/edb/pgsql/compiler/config.py", line 48, in compile_ConfigSet
          val = _compile_config_value(op, ctx=ctx)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/Users/raddevon/Library/Application Support/edgedb/portable/3.3/lib/python3.11/site-packages/edb/pgsql/compiler/config.py", line 476, in _compile_config_value
          assert op.backend_expr is not None
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
      AssertionError

      The above exception was the direct cause of the following exception:

      Traceback (most recent call last):
        File "/Users/raddevon/Library/Application Support/edgedb/portable/3.3/lib/python3.11/site-packages/edb/server/compiler_pool/worker.py", line 161, in compile
          units, cstate = COMPILER.compile(
                          ^^^^^^^^^^^^^^^^^
        File "/Users/raddevon/Library/Application Support/edgedb/portable/3.3/lib/python3.11/site-packages/edb/server/compiler/compiler.py", line 856, in compile
          unit_group = compile(ctx=ctx, source=source)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/Users/raddevon/Library/Application Support/edgedb/portable/3.3/lib/python3.11/site-packages/edb/server/compiler/compiler.py", line 2045, in compile
          return _try_compile(ctx=ctx, source=source)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/Users/raddevon/Library/Application Support/edgedb/portable/3.3/lib/python3.11/site-packages/edb/server/compiler/compiler.py", line 2113, in _try_compile
          comp, capabilities = _compile_dispatch_ql(
                               ^^^^^^^^^^^^^^^^^^^^^
        File "/Users/raddevon/Library/Application Support/edgedb/portable/3.3/lib/python3.11/site-packages/edb/server/compiler/compiler.py", line 1999, in _compile_dispatch_ql
          _compile_ql_config_op(ctx, ql),
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/Users/raddevon/Library/Application Support/edgedb/portable/3.3/lib/python3.11/site-packages/edb/server/compiler/compiler.py", line 1890, in _compile_ql_config_op
          sql_text, _ = pg_compiler.compile_ir_to_sql(
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/Users/raddevon/Library/Application Support/edgedb/portable/3.3/lib/python3.11/site-packages/edb/pgsql/compiler/__init__.py", line 227, in compile_ir_to_sql
          _, sql_text, argmap = compile_ir_to_tree_and_sql(
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/Users/raddevon/Library/Application Support/edgedb/portable/3.3/lib/python3.11/site-packages/edb/pgsql/compiler/__init__.py", line 169, in compile_ir_to_tree_and_sql
          qtree, _ = compile_ir_to_sql_tree(
                     ^^^^^^^^^^^^^^^^^^^^^^^
        File "/Users/raddevon/Library/Application Support/edgedb/portable/3.3/lib/python3.11/site-packages/edb/pgsql/compiler/__init__.py", line 151, in compile_ir_to_sql_tree
          raise errors.InternalServerError(*args) from e
      edb.errors.InternalServerError: None
edgedb> configure instance set effective_io_concurrency := <int64>10;
edgedb error: InternalServerError: None
  Hint: This is most likely a bug in EdgeDB. Please consider opening an issue ticket at https://github.com/edgedb/edgedb/issues/new?template=bug_report.md
  Server traceback:
      Traceback (most recent call last):
        File "/Users/raddevon/Library/Application Support/edgedb/portable/3.3/lib/python3.11/site-packages/edb/pgsql/compiler/__init__.py", line 134, in compile_ir_to_sql_tree
          qtree = dispatch.compile(ir_expr, ctx=ctx)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/Users/raddevon/Library/Application Support/edgedb/portable/3.3/lib/python3.11/functools.py", line 909, in wrapper
          return dispatch(args[0].__class__)(*args, **kw)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/Users/raddevon/Library/Application Support/edgedb/portable/3.3/lib/python3.11/site-packages/edb/pgsql/compiler/config.py", line 48, in compile_ConfigSet
          val = _compile_config_value(op, ctx=ctx)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/Users/raddevon/Library/Application Support/edgedb/portable/3.3/lib/python3.11/site-packages/edb/pgsql/compiler/config.py", line 476, in _compile_config_value
          assert op.backend_expr is not None
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
      AssertionError

      The above exception was the direct cause of the following exception:

      Traceback (most recent call last):
        File "/Users/raddevon/Library/Application Support/edgedb/portable/3.3/lib/python3.11/site-packages/edb/server/compiler_pool/worker.py", line 161, in compile
          units, cstate = COMPILER.compile(
                          ^^^^^^^^^^^^^^^^^
        File "/Users/raddevon/Library/Application Support/edgedb/portable/3.3/lib/python3.11/site-packages/edb/server/compiler/compiler.py", line 856, in compile
          unit_group = compile(ctx=ctx, source=source)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/Users/raddevon/Library/Application Support/edgedb/portable/3.3/lib/python3.11/site-packages/edb/server/compiler/compiler.py", line 2045, in compile
          return _try_compile(ctx=ctx, source=source)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/Users/raddevon/Library/Application Support/edgedb/portable/3.3/lib/python3.11/site-packages/edb/server/compiler/compiler.py", line 2113, in _try_compile
          comp, capabilities = _compile_dispatch_ql(
                               ^^^^^^^^^^^^^^^^^^^^^
        File "/Users/raddevon/Library/Application Support/edgedb/portable/3.3/lib/python3.11/site-packages/edb/server/compiler/compiler.py", line 1999, in _compile_dispatch_ql
          _compile_ql_config_op(ctx, ql),
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/Users/raddevon/Library/Application Support/edgedb/portable/3.3/lib/python3.11/site-packages/edb/server/compiler/compiler.py", line 1890, in _compile_ql_config_op
          sql_text, _ = pg_compiler.compile_ir_to_sql(
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/Users/raddevon/Library/Application Support/edgedb/portable/3.3/lib/python3.11/site-packages/edb/pgsql/compiler/__init__.py", line 227, in compile_ir_to_sql
          _, sql_text, argmap = compile_ir_to_tree_and_sql(
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/Users/raddevon/Library/Application Support/edgedb/portable/3.3/lib/python3.11/site-packages/edb/pgsql/compiler/__init__.py", line 169, in compile_ir_to_tree_and_sql
          qtree, _ = compile_ir_to_sql_tree(
                     ^^^^^^^^^^^^^^^^^^^^^^^
        File "/Users/raddevon/Library/Application Support/edgedb/portable/3.3/lib/python3.11/site-packages/edb/pgsql/compiler/__init__.py", line 151, in compile_ir_to_sql_tree
          raise errors.InternalServerError(*args) from e
      edb.errors.InternalServerError: None

Schema:

msullivan commented 11 months ago

https://github.com/edgedb/edgedb/pull/6289 fixes the server side issue.

The errors from the CLI are a CLI issue, though.

msullivan commented 11 months ago

Reopening the CLI side of this