Skip to content

Commit

Permalink
Merge branch 'master' into mv_gel_auth
Browse files Browse the repository at this point in the history
  • Loading branch information
mmastrac authored Feb 6, 2025
2 parents bcaf262 + 9ca3eaf commit c42134d
Show file tree
Hide file tree
Showing 53 changed files with 2,150 additions and 173 deletions.
17 changes: 14 additions & 3 deletions .github/workflows.src/tests-inplace.tpl.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<% from "tests.inc.yml" import build, calc_cache_key, restore_cache -%>

name: Tests of in-place upgrades
name: Tests of in-place upgrades and patching

on:
schedule:
Expand All @@ -22,7 +22,7 @@ jobs:
<< calc_cache_key()|indent >>
<%- endcall %>

test:
test-inplace:
runs-on: ubuntu-latest
needs: build
strategy:
Expand All @@ -47,12 +47,23 @@ jobs:
run: |
./tests/inplace-testing/test.sh ${{ matrix.flags }} vt ${{ matrix.tests }}
test-patches:
runs-on: ubuntu-latest
needs: build
steps:
<<- restore_cache() >>

- name: Test performing in-place upgrades
run: |
./tests/patch-testing/test.sh test-dir -k test_link_on_target_delete -k test_edgeql_select -k test_edgeql_scope -k test_dump
workflow-notifications:
if: failure() && github.event_name != 'pull_request'
name: Notify in Slack on failures
needs:
- build
- test
- test-inplace
- test-patches
runs-on: ubuntu-latest
permissions:
actions: 'read'
Expand Down
168 changes: 165 additions & 3 deletions .github/workflows/tests-inplace.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion edb/buildmeta.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
# The merge conflict there is a nice reminder that you probably need
# to write a patch in edb/pgsql/patches.py, and then you should preserve
# the old value.
EDGEDB_CATALOG_VERSION = 2024_01_28_00_00
EDGEDB_CATALOG_VERSION = 2025_02_04_00_00
EDGEDB_MAJOR_VERSION = 7


Expand Down
12 changes: 12 additions & 0 deletions edb/common/ast/transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ def generic_visit(self, node):
changes = {}

for field, old_value in base.iter_fields(node, include_meta=False):
field_spec = node._fields[field]
if self.skip_hidden and field_spec.hidden:
continue
if field in self.extra_skips:
continue

old_value = getattr(node, field, None)

if typeutils.is_container(old_value):
Expand All @@ -79,6 +85,12 @@ def generic_visit(self, node):

else:
for field, old_value in base.iter_fields(node, include_meta=False):
field_spec = node._fields[field]
if self.skip_hidden and field_spec.hidden:
continue
if field in self.extra_skips:
continue

old_value = getattr(node, field, None)

if typeutils.is_container(old_value):
Expand Down
4 changes: 4 additions & 0 deletions edb/edgeql/compiler/func.py
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,10 @@ def compile_FunctionCall(

class ArgumentInliner(ast.NodeTransformer):

# Don't look through hidden nodes, they may contain references to nodes
# which should not be modified. For example, irast.Stmt.parent_stmt.
skip_hidden = True

mapped_args: dict[irast.PathId, irast.PathId]
inlined_arg_keys: list[int | str]

Expand Down
2 changes: 1 addition & 1 deletion edb/ir/astexpr.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def is_possibly_wrapped_distinct_expr(
if not isinstance(tree, irast.SelectStmt):
return None

return is_pure_distinct_expr(tree.result)
return is_set_expr(tree.result)


def is_set_expr(tree: irast.Base) -> Optional[List[irast.Base]]:
Expand Down
Loading

0 comments on commit c42134d

Please sign in to comment.