|
| 1 | +=========== |
| 2 | +v7.0 beta 1 |
| 3 | +=========== |
| 4 | + |
| 5 | +:edb-alt-title: Gel v7 |
| 6 | + |
| 7 | +To explore the new features, ensure you specify version 7.0 when initializing |
| 8 | +your project. Pre-release versions are not considered stable and will not be |
| 9 | +automatically suggested: |
| 10 | + |
| 11 | +.. code-block:: bash |
| 12 | +
|
| 13 | + $ gel project init --server-version 7.0-beta.1 |
| 14 | +
|
| 15 | +
|
| 16 | +Upgrading |
| 17 | +========= |
| 18 | + |
| 19 | +.. edb:collapsed:: |
| 20 | +
|
| 21 | +**Local instances** |
| 22 | + |
| 23 | +To upgrade a local project, first ensure that your CLI is up to date with |
| 24 | +:gelcmd:`cli upgrade`. Then run the following command inside the project |
| 25 | +directory. |
| 26 | + |
| 27 | +.. code-block:: bash |
| 28 | +
|
| 29 | + $ gel project upgrade --to-testing |
| 30 | +
|
| 31 | +Alternatively, specify an instance name if you aren't using a project: |
| 32 | + |
| 33 | +.. code-block:: bash |
| 34 | +
|
| 35 | + $ gel instance upgrade -I my_instance |
| 36 | +
|
| 37 | +The CLI will check if your schema can migrate cleanly to Gel 7.0. If any |
| 38 | +issues are found, they will be reported. |
| 39 | + |
| 40 | +**Hosted instances** |
| 41 | + |
| 42 | +To upgrade a remote instance, we recommend the following dump-and-restore |
| 43 | +process: |
| 44 | + |
| 45 | +1. Gel v7.0 supports PostgreSQL 14 or above. Verify your PostgreSQL version |
| 46 | + before upgrading Gel. If you're using Postgres 13 or below, upgrade |
| 47 | + Postgres first. |
| 48 | + |
| 49 | +2. Spin up an empty 7.0 instance. You can use one of our :ref:`deployment |
| 50 | + guides <ref_guide_deployment>`. |
| 51 | + |
| 52 | + For Debian/Ubuntu, when adding the Gel package repository, use this |
| 53 | + command: |
| 54 | + |
| 55 | + .. code-block:: bash |
| 56 | +
|
| 57 | + $ echo deb [signed-by=/usr/local/share/keyrings/gel-keyring.gpg] \ |
| 58 | + https://packages.geldata.com/apt \ |
| 59 | + $(grep "VERSION_CODENAME=" /etc/os-release | cut -d= -f2) main \ |
| 60 | + | sudo tee /etc/apt/sources.list.d/gel.list |
| 61 | + $ sudo apt-get update && sudo apt-get install gel-7 |
| 62 | +
|
| 63 | + For CentOS/RHEL, use this installation command: |
| 64 | + |
| 65 | + .. code-block:: bash |
| 66 | +
|
| 67 | + $ sudo yum install gel-7 |
| 68 | +
|
| 69 | + In any required ``systemctl`` commands, replace ``edgedb-server-6`` with |
| 70 | + ``gel-server-7``. |
| 71 | + |
| 72 | + For Docker setups, use the ``7.0`` tag. |
| 73 | + |
| 74 | +3. Take your application offline, then dump your v5.x database with the CLI: |
| 75 | + |
| 76 | + .. code-block:: bash |
| 77 | +
|
| 78 | + $ gel dump --dsn <old dsn> --all --format dir my_database.dump/ |
| 79 | +
|
| 80 | + This will dump the schema and contents of your current database to a |
| 81 | + directory on your local disk called ``my_database.dump``. The directory name |
| 82 | + isn't important. |
| 83 | + |
| 84 | +4. Restore the empty v6.x instance from the dump: |
| 85 | + |
| 86 | + .. code-block:: bash |
| 87 | +
|
| 88 | + $ gel restore --all my_database.dump/ --dsn <new dsn> |
| 89 | +
|
| 90 | + Once the restore is complete, update your application to connect to the new |
| 91 | + instance. |
| 92 | + |
| 93 | + This process will involve some downtime, specifically during steps 2 and 3. |
| 94 | + |
| 95 | + |
| 96 | +Breaking Changes |
| 97 | +================ |
| 98 | + |
| 99 | +SQL adapter access policies on by default |
| 100 | +----------------------------------------- |
| 101 | + |
| 102 | +The default value of ``apply_access_policies_pg`` has been changed |
| 103 | +from ``false`` to ``true``. |
| 104 | + |
| 105 | +This means that by default, EdgeQL access policies will be applied |
| 106 | +when running SQL queries over the SQL protocol connection. |
| 107 | + |
| 108 | +To accomodate third-party tools that cannot be configured to run |
| 109 | +configuration commands, we have introduced the |
| 110 | +``apply_access_policies_pg_default`` field to ``Role`` in order to |
| 111 | +override this: |
| 112 | + |
| 113 | +.. code-block:: edgeql |
| 114 | +
|
| 115 | + CREATE SUPERUSER ROLE pg_connector { |
| 116 | + # ... |
| 117 | + SET apply_access_policies_pg_default := false; |
| 118 | + } |
| 119 | +
|
| 120 | +Third-party SQL tools can use the pg_connector role and access |
| 121 | +policies will be disable. |
| 122 | + |
| 123 | + |
| 124 | +Simpler scoping rules deprecation warnings |
| 125 | +------------------------------------------ |
| 126 | + |
| 127 | +In 6.0, we began simplifying our scoping rules. See `our RFC 1027 outlining the |
| 128 | +changes |
| 129 | +<https://github.com/geldata/rfcs/blob/master/text/1027-no-factoring.rst>`_. |
| 130 | + |
| 131 | +In 7.0, we emit a warning when creating a migration if the schema does |
| 132 | +not contain ``using simple_scoping;`` or ``using warn_old_scoping;``. |
| 133 | + |
| 134 | +We plan to remove the old scoping in 8.0. |
| 135 | + |
| 136 | + |
| 137 | +New features |
| 138 | +============ |
| 139 | + |
| 140 | +Role Based Access Control (RBAC) |
| 141 | +-------------------------------- |
| 142 | + |
| 143 | +Gel 7.0 introduces more fine-grained access controls. It is now |
| 144 | +possible to create *non*-SUPERUSER roles, with limited permissions. |
| 145 | + |
| 146 | +Non-SUPERUSER roles deliberately choose the "secure by default" end of |
| 147 | +the security-vs-convenience tradeoff, and are extremely locked down by |
| 148 | +default. |
| 149 | + |
| 150 | +.. code-block:: edgeql |
| 151 | +
|
| 152 | + CREATE ROLE my_role { |
| 153 | + # ... |
| 154 | + SET permissions := { |
| 155 | + sys::perm::data_modifiction, |
| 156 | + sys::perm::query_stats, |
| 157 | + cfg::perm::configure_timeouts, |
| 158 | + cfg::perm::configure_apply_access_policies, |
| 159 | + ext::auth::perm::auth_read, |
| 160 | + ext::auth::perm::auth_write, |
| 161 | + }; |
| 162 | + }; |
| 163 | +
|
| 164 | +
|
| 165 | +Will create a user that can do DDL, look at query stats, configure |
| 166 | +timeouts and whether to use access policies, and read and write the |
| 167 | +auth extension tables. |
| 168 | + |
| 169 | +See `our RFC 1029 for more details on the changes |
| 170 | +<https://github.com/geldata/rfcs/blob/master/text/1029-rbac.rst>`_. |
| 171 | + |
| 172 | + |
| 173 | +* Look up role permissions when executing queries. |
| 174 | + (:eql:gh:`#8760`) |
| 175 | + |
| 176 | +* Make role permission computation look at all ancestors |
| 177 | + (:eql:gh:`#8784`) |
| 178 | + |
| 179 | +* Add sys::data_modification to grant non-superusers the ability to run DML. |
| 180 | + (:eql:gh:`#8771`) |
| 181 | + |
| 182 | +* rbac: Implement RBAC permissions for session configs |
| 183 | + (:eql:gh:`#8806`) |
| 184 | + |
| 185 | +* rbac: Make the HTTP interfaces aware of the current role |
| 186 | + (:eql:gh:`#8809`) |
| 187 | + |
| 188 | +* rbac: Support required_permissions for function |
| 189 | + (:eql:gh:`#8812`) |
| 190 | + |
| 191 | +* rbac: Restrict dump, restore, ADMINISTER, DESCRIBE, ANALYZE |
| 192 | + (:eql:gh:`#8810`) |
| 193 | + |
| 194 | +* rbac: Make a branch_config permission but require superuser for system |
| 195 | + (:eql:gh:`#8822`) |
| 196 | + |
| 197 | +* rbac: Make system-wide DDL require SUPERUSER |
| 198 | + (:eql:gh:`#8823`) |
| 199 | + |
| 200 | +* rbac: Add a branches field to Role to restrict a role to certain branches |
| 201 | + (:eql:gh:`#8830`) |
| 202 | + |
| 203 | +* rbac: Add sys::perm::superuser which is granted to superusers only. |
| 204 | + (:eql:gh:`#8853`) |
| 205 | + |
| 206 | +* rbac: Add permissions to stdlib objects and functions. |
| 207 | + (:eql:gh:`#8846`) |
| 208 | + |
| 209 | +* Add permissions to sys types and functions. |
| 210 | + (:eql:gh:`#8865`) |
| 211 | + |
| 212 | +* Add ``global sys::current_role`` |
| 213 | + (:eql:gh:`#8889`) |
| 214 | + |
| 215 | + |
| 216 | +Other features |
| 217 | +-------------- |
| 218 | + |
| 219 | +* Support required link properties |
| 220 | + (:eql:gh:`#8735`) |
| 221 | + |
| 222 | +* Allow (most) unparenthesized statements in calls, etc |
| 223 | + (:eql:gh:`#8763`) |
| 224 | + |
| 225 | +* Implement sys::approximate_count() |
| 226 | + (:eql:gh:`#8692`) |
| 227 | + |
| 228 | +* Implement ``splat_strategy`` qualifier for pointers |
| 229 | + (:eql:gh:`#8757`) |
| 230 | + |
| 231 | +* Add http schedule_request with json body. |
| 232 | + (:eql:gh:`#8724`) |
| 233 | + |
| 234 | +* Support graphql over the binary protocol |
| 235 | + (:eql:gh:`#8878`) |
| 236 | + |
| 237 | +* One-time code implementation for ``ext::auth`` |
| 238 | + (:eql:gh:`#8905`) |
| 239 | + |
| 240 | + |
| 241 | + |
| 242 | +Additional changes |
| 243 | +================== |
| 244 | + |
| 245 | + |
| 246 | +Fixes |
| 247 | +----- |
| 248 | + |
| 249 | + |
| 250 | +* Fix schema type inconsistencies with collection aliases |
| 251 | + (:eql:gh:`#8672`) |
| 252 | + |
| 253 | +* Fix mangled type names leaking into introspectable names |
| 254 | + (:eql:gh:`#8772`) |
| 255 | + |
| 256 | +* Drop bionic support |
| 257 | + (:eql:gh:`#8328`) |
| 258 | + |
| 259 | +* Check that function parameter and return types exist when migrating. |
| 260 | + (:eql:gh:`#8386`) |
| 261 | + |
| 262 | +* Add hint to partial path errors if anchor is available. |
| 263 | + (:eql:gh:`#8380`) |
| 264 | + |
| 265 | +* Implement permissions in access policies over SQL adapter |
| 266 | + (:eql:gh:`#8837`) |
| 267 | + |
| 268 | +* Support creating indexes concurrently |
| 269 | + (:eql:gh:`#8747`) |
| 270 | + |
| 271 | +* Fix WITH computation duplication in auth module |
| 272 | + (:eql:gh:`#8851`) |
| 273 | + |
| 274 | +* Access policies for link tables over SQL adapter |
| 275 | + (:eql:gh:`#8849`) |
| 276 | + |
| 277 | +* Fix params with union types producing ISEs |
| 278 | + (:eql:gh:`#8863`) |
| 279 | + |
| 280 | +* Support intersection and complex composite types in SDL parameters. |
| 281 | + (:eql:gh:`#8864`) |
| 282 | + |
| 283 | +* Add ``std::identifier`` annotations to abstract operators |
| 284 | + (:eql:gh:`#8862`) |
| 285 | + |
| 286 | + |
| 287 | +Other |
| 288 | +----- |
| 289 | + |
| 290 | +* Warn on START MIGRATION if no scoping future is present |
| 291 | + (:eql:gh:`#8896`) |
| 292 | + |
| 293 | +* Add ``apply_access_policies_pg_default`` flag to ``Role`` |
| 294 | + (:eql:gh:`#8918`) |
| 295 | + |
| 296 | +* Expose 'protected' on schema::Property |
| 297 | + (:eql:gh:`#8930`) |
| 298 | + |
| 299 | +* Retry serialization errors that occur internal to the auth extension. |
| 300 | + (:eql:gh:`#8942`) |
0 commit comments