From d05ca512b4dd8cfe49930143ef418e99fe6732fc Mon Sep 17 00:00:00 2001
From: "Harris.Chu" <1726587+HarrisChu@users.noreply.github.com>
Date: Tue, 19 Oct 2021 21:29:55 +0800
Subject: [PATCH 1/2] change codecov uploader (#3072)

* change codecov uploader

* change ail_ci_if_error

Co-authored-by: Yee <2520865+yixinglu@users.noreply.github.com>
---
 .github/workflows/nightly.yml      | 5 ++++-
 .github/workflows/pull_request.yml | 6 +++++-
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml
index 8090d5f54bd..5352ddb128d 100644
--- a/.github/workflows/nightly.yml
+++ b/.github/workflows/nightly.yml
@@ -150,7 +150,10 @@ jobs:
       - name: coverage
         run: |
             ~/.local/bin/fastcov -d build -l -o fastcov.info -p --exclude /usr/include --exclude=/opt/vesoft --exclude scanner.lex
-            bash <(curl -s https://codecov.io/bash) -Z -f fastcov.info
+      - uses: codecov/codecov-action@v2
+        with:
+          files: fastcov.info
+          fail_ci_if_error: false
       - name: Upload logs
         uses: actions/upload-artifact@v2
         if: ${{ failure() }}
diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml
index ff6427ae75f..7f8bda75acb 100644
--- a/.github/workflows/pull_request.yml
+++ b/.github/workflows/pull_request.yml
@@ -167,7 +167,11 @@ jobs:
         if: ${{ matrix.compiler == 'gcc-9.2' && matrix.os == 'ubuntu2004' }}
         run: |
             ~/.local/bin/fastcov -d build -l -o fastcov.info -p --exclude /usr/include --exclude=/opt/vesoft --exclude scanner.lex
-            bash <(curl -s https://codecov.io/bash) -Z -f fastcov.info
+      - uses: codecov/codecov-action@v2
+        if: ${{ matrix.compiler == 'gcc-9.2' && matrix.os == 'ubuntu2004' }}
+        with:
+          files: fastcov.info
+          fail_ci_if_error: false
       - name: Sanitizer
         if: ${{ always() }}
         run: |

From 4f4804509595ae4c94b7935d7e74252c2271e4d3 Mon Sep 17 00:00:00 2001
From: jimingquan <mingquan.ji@vesoft.com>
Date: Wed, 20 Oct 2021 08:20:37 +0800
Subject: [PATCH 2/2] add reduncant header file (#3156)

---
 src/graph/util/SchemaUtil.h                  | 1 -
 src/graph/util/ToJson.h                      | 2 --
 src/graph/util/ValidateUtil.h                | 1 -
 src/graph/validator/ACLValidator.cpp         | 3 ---
 src/graph/validator/ACLValidator.h           | 1 -
 src/graph/validator/AdminValidator.cpp       | 4 ----
 src/graph/validator/AdminValidator.h         | 1 -
 src/graph/validator/BalanceValidator.cpp     | 2 --
 src/graph/validator/DownloadValidator.cpp    | 1 -
 src/graph/validator/DownloadValidator.h      | 1 -
 src/graph/validator/FindPathValidator.h      | 1 -
 src/graph/validator/GetSubgraphValidator.cpp | 3 ---
 src/graph/validator/GoValidator.cpp          | 1 -
 src/graph/validator/GroupByValidator.h       | 1 -
 src/graph/validator/IngestValidator.cpp      | 3 ---
 src/graph/validator/IngestValidator.h        | 2 --
 src/graph/validator/LookupValidator.cpp      | 1 -
 src/graph/validator/LookupValidator.h        | 2 --
 src/graph/validator/MaintainValidator.cpp    | 1 -
 src/graph/validator/MaintainValidator.h      | 1 -
 src/graph/validator/MatchValidator.h         | 1 -
 src/graph/validator/PipeValidator.h          | 1 -
 src/graph/validator/SequentialValidator.cpp  | 1 -
 src/graph/validator/Validator.cpp            | 1 -
 src/graph/validator/YieldValidator.cpp       | 2 --
 src/graph/validator/YieldValidator.h         | 2 --
 26 files changed, 41 deletions(-)

diff --git a/src/graph/util/SchemaUtil.h b/src/graph/util/SchemaUtil.h
index 138df96be22..ac82d90811e 100644
--- a/src/graph/util/SchemaUtil.h
+++ b/src/graph/util/SchemaUtil.h
@@ -7,7 +7,6 @@
 #ifndef GRAPH_UTIL_SCHEMAUTIL_H_
 #define GRAPH_UTIL_SCHEMAUTIL_H_
 
-#include "common/base/Base.h"
 #include "common/base/StatusOr.h"
 #include "common/datatypes/DataSet.h"
 #include "common/expression/Expression.h"
diff --git a/src/graph/util/ToJson.h b/src/graph/util/ToJson.h
index 53ee80ffdbc..2a7cf37e62d 100644
--- a/src/graph/util/ToJson.h
+++ b/src/graph/util/ToJson.h
@@ -9,9 +9,7 @@
 #include <folly/dynamic.h>
 
 #include <iterator>
-#include <string>
 #include <utility>
-#include <vector>
 
 namespace nebula {
 
diff --git a/src/graph/util/ValidateUtil.h b/src/graph/util/ValidateUtil.h
index ea532e166ad..80ed02a5e08 100644
--- a/src/graph/util/ValidateUtil.h
+++ b/src/graph/util/ValidateUtil.h
@@ -6,7 +6,6 @@
 
 #ifndef GRAPH_UTIL_VALIDATE_UTIL_H_
 #define GRAPH_UTIL_VALIDATE_UTIL_H_
-#include "common/base/Base.h"
 #include "common/base/StatusOr.h"
 #include "common/expression/Expression.h"
 #include "parser/Clauses.h"
diff --git a/src/graph/validator/ACLValidator.cpp b/src/graph/validator/ACLValidator.cpp
index 5f119adfe0a..44b62822edb 100644
--- a/src/graph/validator/ACLValidator.cpp
+++ b/src/graph/validator/ACLValidator.cpp
@@ -6,11 +6,8 @@
 
 #include "graph/validator/ACLValidator.h"
 
-#include "clients/meta/MetaClient.h"
-#include "common/base/Base.h"
 #include "graph/planner/plan/Admin.h"
 #include "graph/service/PermissionManager.h"
-#include "graph/util/SchemaUtil.h"
 
 namespace nebula {
 namespace graph {
diff --git a/src/graph/validator/ACLValidator.h b/src/graph/validator/ACLValidator.h
index 5876c80228d..39dd688f16c 100644
--- a/src/graph/validator/ACLValidator.h
+++ b/src/graph/validator/ACLValidator.h
@@ -7,7 +7,6 @@
 #ifndef GRAPH_VALIDATOR_ACLVALIDATOR_H_
 #define GRAPH_VALIDATOR_ACLVALIDATOR_H_
 
-#include "common/base/Base.h"
 #include "graph/validator/Validator.h"
 #include "parser/UserSentences.h"
 
diff --git a/src/graph/validator/AdminValidator.cpp b/src/graph/validator/AdminValidator.cpp
index 81cdbe0f7f6..2d47e2b718e 100644
--- a/src/graph/validator/AdminValidator.cpp
+++ b/src/graph/validator/AdminValidator.cpp
@@ -8,14 +8,10 @@
 
 #include <thrift/lib/cpp/util/EnumUtils.h>
 
-#include "common/base/Base.h"
 #include "common/charset/Charset.h"
 #include "graph/planner/plan/Admin.h"
 #include "graph/planner/plan/Query.h"
 #include "graph/service/GraphFlags.h"
-#include "graph/util/ExpressionUtils.h"
-#include "graph/util/SchemaUtil.h"
-#include "interface/gen-cpp2/meta_types.h"
 #include "parser/MaintainSentences.h"
 
 namespace nebula {
diff --git a/src/graph/validator/AdminValidator.h b/src/graph/validator/AdminValidator.h
index 9eadf9c09fc..dadae9492e9 100644
--- a/src/graph/validator/AdminValidator.h
+++ b/src/graph/validator/AdminValidator.h
@@ -8,7 +8,6 @@
 #define GRAPH_VALIDATOR_ADMINVALIDATOR_H_
 
 #include "clients/meta/MetaClient.h"
-#include "common/base/Base.h"
 #include "common/plugin/fulltext/elasticsearch/ESGraphAdapter.h"
 #include "graph/validator/Validator.h"
 #include "parser/AdminSentences.h"
diff --git a/src/graph/validator/BalanceValidator.cpp b/src/graph/validator/BalanceValidator.cpp
index 71319493877..f2603f6133d 100644
--- a/src/graph/validator/BalanceValidator.cpp
+++ b/src/graph/validator/BalanceValidator.cpp
@@ -5,8 +5,6 @@
  */
 
 #include "graph/validator/BalanceValidator.h"
-
-#include "common/base/Base.h"
 #include "graph/planner/plan/Admin.h"
 
 namespace nebula {
diff --git a/src/graph/validator/DownloadValidator.cpp b/src/graph/validator/DownloadValidator.cpp
index 32495d3b26b..0fa2b5e8e0d 100644
--- a/src/graph/validator/DownloadValidator.cpp
+++ b/src/graph/validator/DownloadValidator.cpp
@@ -6,7 +6,6 @@
 
 #include "graph/validator/DownloadValidator.h"
 
-#include "common/base/Base.h"
 #include "graph/planner/plan/Admin.h"
 #include "parser/MutateSentences.h"
 
diff --git a/src/graph/validator/DownloadValidator.h b/src/graph/validator/DownloadValidator.h
index 9a1868f7afb..9804ca0822a 100644
--- a/src/graph/validator/DownloadValidator.h
+++ b/src/graph/validator/DownloadValidator.h
@@ -7,7 +7,6 @@
 #ifndef GRAPH_VALIDATOR_DOWNLOADVALIDATOR_H_
 #define GRAPH_VALIDATOR_DOWNLOADVALIDATOR_H_
 
-#include "common/base/Base.h"
 #include "graph/validator/Validator.h"
 #include "parser/AdminSentences.h"
 
diff --git a/src/graph/validator/FindPathValidator.h b/src/graph/validator/FindPathValidator.h
index 0f2d03a23ec..6e54a3b94ce 100644
--- a/src/graph/validator/FindPathValidator.h
+++ b/src/graph/validator/FindPathValidator.h
@@ -7,7 +7,6 @@
 #ifndef GRAPH_VALIDATOR_FINDPATHVALIDATOR_H_
 #define GRAPH_VALIDATOR_FINDPATHVALIDATOR_H_
 
-#include "common/base/Base.h"
 #include "graph/context/ast/QueryAstContext.h"
 #include "graph/validator/Validator.h"
 
diff --git a/src/graph/validator/GetSubgraphValidator.cpp b/src/graph/validator/GetSubgraphValidator.cpp
index fd7cf6fb184..722329366cb 100644
--- a/src/graph/validator/GetSubgraphValidator.cpp
+++ b/src/graph/validator/GetSubgraphValidator.cpp
@@ -8,9 +8,6 @@
 
 #include <memory>
 
-#include "common/expression/UnaryExpression.h"
-#include "common/expression/VariableExpression.h"
-#include "common/expression/VertexExpression.h"
 #include "graph/context/QueryExpressionContext.h"
 #include "graph/planner/plan/Logic.h"
 #include "graph/planner/plan/Query.h"
diff --git a/src/graph/validator/GoValidator.cpp b/src/graph/validator/GoValidator.cpp
index 5527e38d4a9..6cbbbb4df85 100644
--- a/src/graph/validator/GoValidator.cpp
+++ b/src/graph/validator/GoValidator.cpp
@@ -6,7 +6,6 @@
 
 #include "graph/validator/GoValidator.h"
 
-#include "common/base/Base.h"
 #include "common/expression/VariableExpression.h"
 #include "graph/planner/plan/Logic.h"
 #include "graph/util/ExpressionUtils.h"
diff --git a/src/graph/validator/GroupByValidator.h b/src/graph/validator/GroupByValidator.h
index b1e38b5c717..ce9bae67218 100644
--- a/src/graph/validator/GroupByValidator.h
+++ b/src/graph/validator/GroupByValidator.h
@@ -7,7 +7,6 @@
 #ifndef GRAPH_VALIDATOR_GROUPBY_VALIDATOR_H_
 #define GRAPH_VALIDATOR_GROUPBY_VALIDATOR_H_
 
-#include "common/base/Base.h"
 #include "graph/planner/plan/Query.h"
 #include "graph/validator/Validator.h"
 
diff --git a/src/graph/validator/IngestValidator.cpp b/src/graph/validator/IngestValidator.cpp
index 485a5e43cd3..f8fec9d27ed 100644
--- a/src/graph/validator/IngestValidator.cpp
+++ b/src/graph/validator/IngestValidator.cpp
@@ -5,10 +5,7 @@
  */
 
 #include "graph/validator/IngestValidator.h"
-
-#include "common/base/Base.h"
 #include "graph/planner/plan/Admin.h"
-#include "parser/MutateSentences.h"
 
 namespace nebula {
 namespace graph {
diff --git a/src/graph/validator/IngestValidator.h b/src/graph/validator/IngestValidator.h
index 4a12e09d588..f9a0d0a89e9 100644
--- a/src/graph/validator/IngestValidator.h
+++ b/src/graph/validator/IngestValidator.h
@@ -7,9 +7,7 @@
 #ifndef GRAPH_VALIDATOR_INGESTVALIDATOR_H_
 #define GRAPH_VALIDATOR_INGESTVALIDATOR_H_
 
-#include "common/base/Base.h"
 #include "graph/validator/Validator.h"
-#include "parser/AdminSentences.h"
 
 namespace nebula {
 namespace graph {
diff --git a/src/graph/validator/LookupValidator.cpp b/src/graph/validator/LookupValidator.cpp
index f88e85e8d9c..4f7df3c1cef 100644
--- a/src/graph/validator/LookupValidator.cpp
+++ b/src/graph/validator/LookupValidator.cpp
@@ -14,7 +14,6 @@
 #include "graph/util/FTIndexUtils.h"
 #include "graph/util/SchemaUtil.h"
 #include "graph/util/ValidateUtil.h"
-#include "interface/gen-cpp2/meta_types.h"
 #include "parser/TraverseSentences.h"
 
 using nebula::meta::NebulaSchemaProvider;
diff --git a/src/graph/validator/LookupValidator.h b/src/graph/validator/LookupValidator.h
index a0a1fd859d0..6d6ada4d7ef 100644
--- a/src/graph/validator/LookupValidator.h
+++ b/src/graph/validator/LookupValidator.h
@@ -6,9 +6,7 @@
 #ifndef _VALIDATOR_LOOKUP_VALIDATOR_H_
 #define _VALIDATOR_LOOKUP_VALIDATOR_H_
 
-#include "common/base/Base.h"
 #include "common/plugin/fulltext/elasticsearch/ESGraphAdapter.h"
-#include "graph/planner/plan/Query.h"
 #include "graph/validator/Validator.h"
 
 namespace nebula {
diff --git a/src/graph/validator/MaintainValidator.cpp b/src/graph/validator/MaintainValidator.cpp
index a2bfeb595d1..feb7e4f3a4b 100644
--- a/src/graph/validator/MaintainValidator.cpp
+++ b/src/graph/validator/MaintainValidator.cpp
@@ -6,7 +6,6 @@
 
 #include "graph/validator/MaintainValidator.h"
 
-#include "common/base/Base.h"
 #include "common/charset/Charset.h"
 #include "common/expression/ConstantExpression.h"
 #include "graph/planner/plan/Admin.h"
diff --git a/src/graph/validator/MaintainValidator.h b/src/graph/validator/MaintainValidator.h
index 7b02a0a9fb9..d8738a18960 100644
--- a/src/graph/validator/MaintainValidator.h
+++ b/src/graph/validator/MaintainValidator.h
@@ -11,7 +11,6 @@
 #include "graph/context/ast/QueryAstContext.h"
 #include "graph/validator/Validator.h"
 #include "parser/AdminSentences.h"
-#include "parser/MaintainSentences.h"
 
 namespace nebula {
 namespace graph {
diff --git a/src/graph/validator/MatchValidator.h b/src/graph/validator/MatchValidator.h
index 762589a2dc8..320e20cf4e5 100644
--- a/src/graph/validator/MatchValidator.h
+++ b/src/graph/validator/MatchValidator.h
@@ -7,7 +7,6 @@
 #ifndef GRAPH_VALIDATOR_MATCHVALIDATOR_H_
 #define GRAPH_VALIDATOR_MATCHVALIDATOR_H_
 
-#include "common/base/Base.h"
 #include "graph/context/ast/CypherAstContext.h"
 #include "graph/planner/plan/Query.h"
 #include "graph/util/AnonVarGenerator.h"
diff --git a/src/graph/validator/PipeValidator.h b/src/graph/validator/PipeValidator.h
index 9169e1c1375..71f80ab78a8 100644
--- a/src/graph/validator/PipeValidator.h
+++ b/src/graph/validator/PipeValidator.h
@@ -7,7 +7,6 @@
 #ifndef GRAPH_VALIDATOR_PIPEVALIDATOR_H_
 #define GRAPH_VALIDATOR_PIPEVALIDATOR_H_
 
-#include "common/base/Base.h"
 #include "graph/validator/Validator.h"
 
 namespace nebula {
diff --git a/src/graph/validator/SequentialValidator.cpp b/src/graph/validator/SequentialValidator.cpp
index 61c12573df7..0b5e15ad6d1 100644
--- a/src/graph/validator/SequentialValidator.cpp
+++ b/src/graph/validator/SequentialValidator.cpp
@@ -6,7 +6,6 @@
 
 #include "graph/validator/SequentialValidator.h"
 
-#include "common/base/Base.h"
 #include "graph/planner/plan/Logic.h"
 #include "graph/planner/plan/Query.h"
 #include "graph/service/GraphFlags.h"
diff --git a/src/graph/validator/Validator.cpp b/src/graph/validator/Validator.cpp
index 48963d4ba4e..45c72ae5034 100644
--- a/src/graph/validator/Validator.cpp
+++ b/src/graph/validator/Validator.cpp
@@ -38,7 +38,6 @@
 #include "graph/validator/SetValidator.h"
 #include "graph/validator/UseValidator.h"
 #include "graph/validator/YieldValidator.h"
-#include "graph/visitor/DeducePropsVisitor.h"
 #include "graph/visitor/DeduceTypeVisitor.h"
 #include "graph/visitor/EvaluableExprVisitor.h"
 #include "parser/Sentence.h"
diff --git a/src/graph/validator/YieldValidator.cpp b/src/graph/validator/YieldValidator.cpp
index e36c57f9271..7476c096735 100644
--- a/src/graph/validator/YieldValidator.cpp
+++ b/src/graph/validator/YieldValidator.cpp
@@ -6,12 +6,10 @@
 
 #include "graph/validator/YieldValidator.h"
 
-#include "common/expression/Expression.h"
 #include "graph/context/QueryContext.h"
 #include "graph/planner/plan/Query.h"
 #include "graph/util/ExpressionUtils.h"
 #include "graph/util/ValidateUtil.h"
-#include "parser/Clauses.h"
 #include "parser/TraverseSentences.h"
 
 namespace nebula {
diff --git a/src/graph/validator/YieldValidator.h b/src/graph/validator/YieldValidator.h
index 5a6c9d68eb7..e63b4dfe307 100644
--- a/src/graph/validator/YieldValidator.h
+++ b/src/graph/validator/YieldValidator.h
@@ -7,8 +7,6 @@
 #ifndef GRAPH_VALIDATOR_YIELDVALIDATOR_H_
 #define GRAPH_VALIDATOR_YIELDVALIDATOR_H_
 
-#include <vector>
-
 #include "common/base/Status.h"
 #include "graph/planner/plan/Query.h"
 #include "graph/validator/GroupByValidator.h"