Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/edgedb/edgedb into access…
Browse files Browse the repository at this point in the history
…-policy-fix-and-expansion
  • Loading branch information
Dhghomon committed Jan 30, 2024
2 parents 797f685 + 457bfc8 commit 8433c98
Show file tree
Hide file tree
Showing 160 changed files with 8,898 additions and 3,255 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/pull-request-meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Pull Request Meta

on:
pull_request:
types: [opened, edited, synchronize]

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true

jobs:

test-pr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: false

- name: Verify that postgres/ was not changed unintentionally
env:
PR_TITLE: ${{ github.event.pull_request.title }}
shell: bash
run: |
required_prefix="Update bundled PostgreSQL"
if [[ "$PR_TITLE" == $required_prefix* ]]; then
exit 0
fi
if git diff --quiet \
${{ github.event.pull_request.base.sha }} \
${{ github.event.pull_request.head.sha }} -- postgres/
then
echo 'all ok'
else
echo "postgres/ submodule has been changed,"\
"but PR title does not indicate that"
echo "(it should start with '$required_prefix')"
exit 1
fi
32 changes: 32 additions & 0 deletions docs/changelog/3_x.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1256,3 +1256,35 @@ receive support for a year and a half after their initial release.
* Correctly update functions when globals/aliases/computeds they depend on
change
(:eql:gh:`#6382`)

3.6
===
* Fix UPDATE with rewrites on tuples
(:eql:gh:`#6337`)

* Fix DML with constraints on abstract types
(:eql:gh:`#6421`)

* Fix some interactions between FOR and optional values
(:eql:gh:`#6526`)

* Fix inserts silently failing when a json->array cast handles 'null'
(:eql:gh:`#6544`)

* Fix tracing of enums in type expressions
(:eql:gh:`#6548`)

* Allow indexes that use user-defined functions to actually get hit
(:eql:gh:`#6551`)

* Fix schema delta for RESET EXPRESSION
(:eql:gh:`#6463`)

* Fix changing a pointer to be computed when there is a subtype
(:eql:gh:`#6565`)

* Fix migrating between aliased and non-aliased computeds
(:eql:gh:`#6566`)

* Fix some bugs involving union and coalescing of optional values
(:eql:gh:`#6590`)
100 changes: 100 additions & 0 deletions docs/changelog/4_x.rst
Original file line number Diff line number Diff line change
Expand Up @@ -570,3 +570,103 @@ Bug fixes
This might be considered a breaking change, but as it is clearly a bug in
user schema and as it could also be considered a bug in the compiler, we are
fixing it in a minor version.

4.3
===
* Fix non-rewritten tuple literals
(:eql:gh:`#6521`)

* Support ``connect_timeout`` in backend DSN
(:eql:gh:`#6531`)

* Fix coalesced DML in FOR loops over objects
(:eql:gh:`#6526`)

* Fix inserts silently failing when a ``json->array`` handles 'null'
(:eql:gh:`#6544`)

* Fix tracing of enums in type expressions
(:eql:gh:`#6548`)

* Fix dumps with FTS indexes
(:eql:gh:`#6560`)

* Allow indexes that use user-defined functions to actually get hit
(:eql:gh:`#6551`)

* Fix reloading readiness state and JWT ``*_list`` files in multi-tenant mode
(:eql:gh:`#6562`)

* Handle OPTIONS in the extension path which is needed for CORS preflight
(:eql:gh:`#6577`)

* Optimize the compiler and reduce time of an update test by ~52%
(:eql:gh:`#6579`)

* Always retry system connection on any BackendError
(:eql:gh:`#6588`)

* Properly support @source/@target on multi-link constraints
(:eql:gh:`#6585`)

* Fix constant extraction's interaction with the new if-then-else
(:eql:gh:`#6591`)

* Fix migrating between aliased and non-aliased computeds
(:eql:gh:`#6566`)

* Improve error message for illegal casts and parameters.
(:eql:gh:`#6511`)

* Don't eval ext::auth::ClientTokenIdentity on every row in a filter
(:eql:gh:`#6607`)

* Expose __type__ via SQL adapter
(:eql:gh:`#6519`)

* Fix some bugs involving union and coalescing of optional values
(:eql:gh:`#6590`)

* Avoid doing a join when injecting type ids
(:eql:gh:`#6601`)

* Generate better code for ?? with multi RHS or object type
(:eql:gh:`#6532`)

* Fix pgast nullability inference for subqueries and coalesce
(:eql:gh:`#6529`)

* Fix changing a pointer to be computed when there is a subtype
(:eql:gh:`#6565`)

4.4
===
* Fix DML-containing FOR when the iterator is an object set with duplicates
(:eql:gh:`#6609`)

* Fix very slow global introspection query when there are lots of databases
(:eql:gh:`#6633`)

* Use correct signature for in-memory cache method
(:eql:gh:`#6643`)

4.5
===

* Fix spurious delete/create of constraints with arguments in migrations
(:eql:gh:`#6712`)

* Speed up introspection of system objects like Database and Role
(:eql:gh:`#6665`)

* Fix some alter+rename combos on pointers in POPULATE MIGRATION
(:eql:gh:`#6666`)

* Fix issue with schema changes when trigger depends on a rewrite
(:eql:gh:`#6706`)

* Get verification data from request body
(:eql:gh:`#6723`)

* Make overloading a link when omitting ``link`` keyword work
(:eql:gh:`#6718`)
14 changes: 9 additions & 5 deletions docs/cli/edgedb_connopts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,13 @@ Connection flags

:cli:synopsis:`-I <name>, --instance=<name>`
Specifies the named instance to connect to. The actual connection
parameters are stored in ``<edgedb_config_dir>/credentials`` and are
usually created by :ref:`ref_cli_edgedb_instance_create` or similar
commands. Run ``edgedb info`` to see the location of
``<edgedb_config_dir>`` on your machine.
parameters for local and self-hosted instances are stored in
``<edgedb_config_dir>/credentials`` and are usually created by
:ref:`ref_cli_edgedb_instance_create` or similar commands. Run ``edgedb
info`` to see the location of ``<edgedb_config_dir>`` on your machine.

EdgeDB Cloud instance names are in the format
``<org-name>/<instance-name>``.

This option overrides host and port.

Expand Down Expand Up @@ -108,7 +111,8 @@ Connection flags

:cli:synopsis:`--secret-key <key>`
Specifies the secret key to use for authentication with EdgeDB Cloud
instances.
instances. This is not required when connecting to your own EdgeDB Cloud
instance if you have logged in with :ref:`ref_cli_edgedb_cloud_login`.

:cli:synopsis:`--wait-until-available=<wait_time>`
In case EdgeDB connection can't be established, keep retrying up
Expand Down
6 changes: 3 additions & 3 deletions docs/cli/edgedb_instance/edgedb_instance_create.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ EdgeDB Cloud users may use this command to create a Cloud instance after
logging in using :ref:`ref_cli_edgedb_cloud_login`.

To create a Cloud instance, your instance name should be in the format
``<github-username>/<instance-name>``. Cloud instance names may contain
alphanumeric characters and hyphens (i.e., ``-``).
``<org-name>/<instance-name>``. Cloud instance names may contain alphanumeric
characters and hyphens (i.e., ``-``).

.. note::

Expand All @@ -50,7 +50,7 @@ alphanumeric characters and hyphens (i.e., ``-``).
* can contain only Latin alpha-numeric characters or ``-``
* cannot start with a dash (``-``) or contain double dashes (``--``)
* maximum instance name length is 61 characters minus the length of your
GitHub username (i.e., length of GitHub username + length of instance
organization name (i.e., length of organization name + length of instance
name must be fewer than 62 characters)


Expand Down
39 changes: 39 additions & 0 deletions docs/cli/edgedb_instance/edgedb_instance_credentials.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
.. _ref_cli_edgedb_instance_credentials:


===========================
edgedb instance credentials
===========================

Display instance credentials.

.. cli:synopsis::
edgedb instance credentials [options] [connection-options]
Description
===========

``edgedb instance credentials`` is a terminal command for displaying the
credentials of an EdgeDB instance.


Options
=======

:cli:synopsis:`--json`
Output in JSON format. In addition to formatting the credentials as JSON,
this option also includes the password in cleartext and the TLS
certificates.

:cli:synopsis:`--insecure-dsn`
Output a DSN with password in cleartext.

Connection Options
==================

By default, the ``edgedb.toml`` connection is used.

:cli:synopsis:`<connection-options>`
See :ref:`connection options <ref_cli_edgedb_connopts>`.
2 changes: 1 addition & 1 deletion docs/cli/edgedb_instance/edgedb_instance_link.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ instance.
like migrations, dumps, and restores more convenient.

Linking is not required for EdgeDB Cloud instances. They can always be
accessed via CLI using ``<github-username>/<instance-name>``.
accessed via CLI using ``<org-name>/<instance-name>``.

Options
=======
Expand Down
3 changes: 3 additions & 0 deletions docs/cli/edgedb_instance/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ for managing EdgeDB instances.
:hidden:

edgedb_instance_create
edgedb_instance_credentials
edgedb_instance_destroy
edgedb_instance_link
edgedb_instance_list
Expand All @@ -35,6 +36,8 @@ for managing EdgeDB instances.

* - :ref:`ref_cli_edgedb_instance_create`
- Initialize a new server instance
* - :ref:`ref_cli_edgedb_instance_credentials`
- Display instance credentials
* - :ref:`ref_cli_edgedb_instance_destroy`
- Destroy a server instance and remove the data stored
* - :ref:`ref_cli_edgedb_instance_link`
Expand Down
10 changes: 5 additions & 5 deletions docs/cli/edgedb_project/edgedb_project_init.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ EdgeDB Cloud users may use this command to create a Cloud instance after
logging in using :ref:`ref_cli_edgedb_cloud_login`.

To create a Cloud instance, your instance name should be in the format
``<github-username>/<instance-name>``. Cloud instance names may contain
alphanumeric characters and hyphens (i.e., ``-``). You can provide this Cloud
instance name through the interactive project initiation by running ``edgedb
project init`` or by providing it via the ``--server-instance`` option.
``<org-name>/<instance-name>``. Cloud instance names may contain alphanumeric
characters and hyphens (i.e., ``-``). You can provide this Cloud instance name
through the interactive project initiation by running ``edgedb project init``
or by providing it via the ``--server-instance`` option.

.. note::

Expand All @@ -46,7 +46,7 @@ project init`` or by providing it via the ``--server-instance`` option.
* can contain only Latin alpha-numeric characters or ``-``
* cannot start with a dash (``-``) or contain double dashes (``--``)
* maximum instance name length is 61 characters minus the length of your
GitHub username (i.e., length of GitHub username + length of instance
organization name (i.e., length of organization name + length of instance
name must be fewer than 62 characters)


Expand Down
6 changes: 4 additions & 2 deletions docs/cli/network.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
Network usage
=============

Generally command-line tools connect only to the database host. But
there are two exceptions:
Generally command-line tools connect only to the database host with a few
exceptions:

1. When the command-line tool starts, it checks if its version is up to
date. :ref:`Details <ref_cli_edgedb_version_check>`
Expand All @@ -14,6 +14,8 @@ there are two exceptions:
docker images and also invoke package managers and the docker
engine to do :ref:`index updates and related data.
<ref_cli_edgedb_net_server>`
3. The CLI communicates with the EdgeDB Cloud API to provide easy access to
your EdgeDB Cloud instances.


.. _ref_cli_edgedb_version_check:
Expand Down
23 changes: 19 additions & 4 deletions docs/clients/connection.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
.. _edgedb_client_connection:

==========
Connection
----------
==========

There are several ways to provide connection information to a client
library.
Expand All @@ -19,9 +20,11 @@ library.
guide to DSNs, see the :ref:`DSN Specification <ref_dsn>`.

- Set the ``EDGEDB_INSTANCE`` environment variable to a :ref:`name
<ref_reference_connection_instance_name>` of a local or remote linked
instance. You can create new instances manually with the
:ref:`edgedb instance create <ref_cli_edgedb_instance_create>` command.
<ref_reference_connection_instance_name>` of a local instance, remote linked
instance, or an EdgeDB Cloud instance. (:ref:`More info on EdgeDB Cloud
connection details below. <edgedb_client_connection_cloud>`) You can create
new instances manually with the :ref:`edgedb instance create
<ref_cli_edgedb_instance_create>` command.

- Explicitly pass a DSN or :ref:`instance name
<ref_reference_connection_instance_name>`
Expand All @@ -45,3 +48,15 @@ These are the most common ways to connect to an instance, however EdgeDB
supports several other options for advanced use cases. For a complete reference
on connection configuration, see :ref:`Reference > Connection Parameters
<ref_reference_connection>`.

.. _edgedb_client_connection_cloud:

EdgeDB Cloud
============

To provide client connection information for an EdgeDB Cloud instance, set the
``EDGEDB_INSTANCE`` variable to the instance name
(``<org-name>/<instance-name>`` where ``<instance-name>`` is the name you set
when you created the EdgeDB Cloud instance) and the ``EDGEDB_SECRET_KEY``
variable to your secret key which can be created in the EdgeDB Cloud UI or by
running :ref:`ref_cli_edgedb_cloud_secretkey_create` via the CLI.
2 changes: 1 addition & 1 deletion docs/clients/rust/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ The Rust client uses tokio so add this to Cargo.toml as well:

.. code-block:: toml
tokio = { version = "1.29.1", features = ["macros", "rt-multi-thread"] }`
tokio = { version = "1.29.1", features = ["macros", "rt-multi-thread"] }
If you are avoiding async code and want to emulate a blocking client, you will
still need to use tokio as a dependency but can bridge with async using one of
Expand Down
Loading

0 comments on commit 8433c98

Please sign in to comment.