From e566a9dec5f966d6d037382fcea37d05c2295154 Mon Sep 17 00:00:00 2001 From: Sophie-Xie <84560950+Sophie-Xie@users.noreply.github.com> Date: Wed, 3 Nov 2021 13:58:07 +0800 Subject: [PATCH] Revert "Cherry pick from master to v2.6.1 (#3250)" (#3260) This reverts commit 96fa1f0f43f8842ad4cdae175b238df13b918f2f. --- .github/workflows/nightly.yml | 25 ++++++++----------- .github/workflows/release.yml | 2 -- src/graph/validator/LookupValidator.cpp | 4 +-- .../validator/test/LookupValidatorTest.cpp | 5 ---- tests/tck/features/lookup/WithYield.feature | 7 ------ .../features/lookup/WithYield.intVid.feature | 8 ------ third-party/install-cmake.sh | 2 +- third-party/install-gcc.sh | 2 +- third-party/install-third-party.sh | 2 +- 9 files changed, 16 insertions(+), 41 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index cbb7040c527..f477bb6d05b 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -62,20 +62,17 @@ jobs: - tools steps: - uses: actions/checkout@v2 - - uses: docker/setup-qemu-action@v1 - - uses: docker/setup-buildx-action@v1 - - uses: docker/login-action@v1 + - name: Build and push Docker images + uses: docker/build-push-action@v1 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - - uses: docker/build-push-action@v2 - with: - context: . - file: ./docker/Dockerfile.${{ matrix.service }} - platforms: linux/amd64,linux/arm64 - tags: | - vesoft/nebula-${{ matrix.service }}:nightly - push: true + repository: vesoft/nebula-${{ matrix.service }} + path: . + dockerfile: docker/Dockerfile.${{ matrix.service }} + tags: nightly,v2-nightly + cache_froms: vesoft/nebula-dev:centos7 + add_git_labels: true coverage: name: coverage @@ -87,6 +84,7 @@ jobs: - ubuntu2004 compiler: - gcc-9.2 + container: image: vesoft/nebula-dev:${{ matrix.os }} env: @@ -115,12 +113,11 @@ jobs: -DENABLE_TESTING=on \ -DENABLE_COVERAGE=on \ -B build - echo "::set-output name=j::8" - echo "::set-output name=t::6" + echo "::set-output name=j::10" + echo "::set-output name=t::10" - name: Make run: | ccache -z - cmake --build build/ -j ${{ steps.cmake.outputs.j }} --target nebula-metad nebula-storaged nebula-graphd cmake --build build/ -j ${{ steps.cmake.outputs.t }} ccache -s - name: CTest diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1bc97345d8b..efe26e0367f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -78,7 +78,6 @@ jobs: tag="vesoft/nebula-${{ matrix.service }}:latest" fi echo "::set-output name=tag::$tag" - - uses: docker/setup-qemu-action@v1 - uses: docker/setup-buildx-action@v1 - uses: docker/login-action@v1 with: @@ -88,7 +87,6 @@ jobs: with: context: . file: ./docker/Dockerfile.${{ matrix.service }} - platforms: linux/amd64,linux/arm64 tags: | vesoft/nebula-${{ matrix.service }}:${{ steps.tagname.outputs.tag }} vesoft/nebula-${{ matrix.service }}:${{ steps.tagname.outputs.majorver }} diff --git a/src/graph/validator/LookupValidator.cpp b/src/graph/validator/LookupValidator.cpp index d5099f83f18..de1672b6f0c 100644 --- a/src/graph/validator/LookupValidator.cpp +++ b/src/graph/validator/LookupValidator.cpp @@ -106,7 +106,7 @@ Status LookupValidator::validateYieldEdge() { auto yieldExpr = lookupCtx_->yieldExpr; for (auto col : yield->columns()) { if (ExpressionUtils::hasAny(col->expr(), - {Expression::Kind::kAggregate, Expression::Kind::kVertex})) { + {Expression::Kind::kPathBuild, Expression::Kind::kVertex})) { return Status::SemanticError("illegal yield clauses `%s'", col->toString().c_str()); } if (ExpressionUtils::hasAny(col->expr(), {Expression::Kind::kEdge})) { @@ -136,7 +136,7 @@ Status LookupValidator::validateYieldTag() { auto yieldExpr = lookupCtx_->yieldExpr; for (auto col : yield->columns()) { if (ExpressionUtils::hasAny(col->expr(), - {Expression::Kind::kAggregate, Expression::Kind::kEdge})) { + {Expression::Kind::kPathBuild, Expression::Kind::kEdge})) { return Status::SemanticError("illegal yield clauses `%s'", col->toString().c_str()); } if (ExpressionUtils::hasAny(col->expr(), {Expression::Kind::kVertex})) { diff --git a/src/graph/validator/test/LookupValidatorTest.cpp b/src/graph/validator/test/LookupValidatorTest.cpp index 5c7b69656a1..be9389db527 100644 --- a/src/graph/validator/test/LookupValidatorTest.cpp +++ b/src/graph/validator/test/LookupValidatorTest.cpp @@ -136,11 +136,6 @@ TEST_F(LookupValidatorTest, wrongYield) { EXPECT_EQ(std::string(result.message()), "SyntaxError: please add alias when using `vertex'. near `vertex'"); } - { - std::string query = "LOOKUP ON person YIELD count(*)"; - auto result = checkResult(query); - EXPECT_EQ(std::string(result.message()), "SemanticError: illegal yield clauses `count(*)'"); - } { std::string query = "LOOKUP ON person YIELD vertex as node, edge"; auto result = checkResult(query); diff --git a/tests/tck/features/lookup/WithYield.feature b/tests/tck/features/lookup/WithYield.feature index 3cacd5e1a04..b3a960f6270 100644 --- a/tests/tck/features/lookup/WithYield.feature +++ b/tests/tck/features/lookup/WithYield.feature @@ -90,10 +90,3 @@ Feature: Lookup with yield | "Marco Belinelli" | "Tony Parker" | 0 | 50 | [:like "Marco Belinelli"->"Tony Parker" @0 {likeness: 50}] | | "Rajon Rondo" | "Ray Allen" | 0 | -1 | [:like "Rajon Rondo"->"Ray Allen" @0 {likeness: -1}] | | "Ray Allen" | "Rajon Rondo" | 0 | 9 | [:like "Ray Allen"->"Rajon Rondo" @0 {likeness: 9}] | - When executing query: - """ - LOOKUP ON like WHERE like.likeness < 50 + 1 YIELD like.likeness, edge as relationship | YIELD count(*) as nums - """ - Then the result should be, in any order: - | nums | - | 6 | diff --git a/tests/tck/features/lookup/WithYield.intVid.feature b/tests/tck/features/lookup/WithYield.intVid.feature index f685ca643d1..5d102620501 100644 --- a/tests/tck/features/lookup/WithYield.intVid.feature +++ b/tests/tck/features/lookup/WithYield.intVid.feature @@ -90,11 +90,3 @@ Feature: Lookup with yield in integer vid | "Marco Belinelli" | "Tony Parker" | 0 | 50 | [:like "Marco Belinelli"->"Tony Parker" @0 {likeness: 50}] | | "Rajon Rondo" | "Ray Allen" | 0 | -1 | [:like "Rajon Rondo"->"Ray Allen" @0 {likeness: -1}] | | "Ray Allen" | "Rajon Rondo" | 0 | 9 | [:like "Ray Allen"->"Rajon Rondo" @0 {likeness: 9}] | - When executing query: - """ - LOOKUP ON serve WHERE serve.start_year == 2008 and serve.end_year == 2019 - YIELD serve.start_year AS startYear | YIELD count(*) as nums - """ - Then the result should be, in any order: - | nums | - | 2 | diff --git a/third-party/install-cmake.sh b/third-party/install-cmake.sh index 74a682ba342..f969975146b 100755 --- a/third-party/install-cmake.sh +++ b/third-party/install-cmake.sh @@ -9,7 +9,7 @@ # Always use bash shell=$(basename $(readlink /proc/$$/exe)) -if [ ! x$shell = x"bash" ] && [[ x$shell != x"qemu-aarch64"* ]] +if [ ! x$shell = x"bash" ] then bash $0 $@ exit $? diff --git a/third-party/install-gcc.sh b/third-party/install-gcc.sh index a31868a29a8..3d6d225dfa2 100755 --- a/third-party/install-gcc.sh +++ b/third-party/install-gcc.sh @@ -9,7 +9,7 @@ # Always use bash shell=$(basename $(readlink /proc/$$/exe)) -if [ ! x$shell = x"bash" ] && [[ x$shell != x"qemu-aarch64"* ]] +if [ ! x$shell = x"bash" ] then bash $0 $@ exit $? diff --git a/third-party/install-third-party.sh b/third-party/install-third-party.sh index a26fdc4419a..028cc644046 100755 --- a/third-party/install-third-party.sh +++ b/third-party/install-third-party.sh @@ -14,7 +14,7 @@ # Always use bash shell=$(basename $(readlink /proc/$$/exe)) -if [ ! x$shell = x"bash" ] && [[ x$shell != x"qemu-aarch64"* ]] +if [ ! x$shell = x"bash" ] then bash $0 $@ exit $?