Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RC4 rebase master #2034

Merged
merged 37 commits into from
Apr 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
6bb3269
Upgrade rocksdb to 6.7.3 (#1948)
dangleptr Mar 20, 2020
806459e
Detect OS type and exit if not built in Linux (#1951)
JaySon-Huang Mar 23, 2020
01b008c
[doc] user-permission-mng (#1929)
amber-moe Mar 23, 2020
3f28146
[doc] ttl doc modification (#1939)
amber-moe Mar 23, 2020
0871c69
Let action not fail fast. (#1909)
Shylock-Hg Mar 23, 2020
6499c64
Remove removePrefix interface in kvstore (#1953)
dangleptr Mar 24, 2020
c2ea941
using admin client in MetaServiceHandler (#1864)
Mar 25, 2020
ae61c81
[doc] fix typo (#1954)
amber-moe Mar 25, 2020
7b26043
[doc]show statements (#1924)
amber-moe Mar 25, 2020
44bea75
[doc]customized dir (#1906)
amber-moe Mar 25, 2020
4008778
Fixed a bug caused by not filtering the versions of edges (#1962)
monadbobo Mar 25, 2020
498c2bb
[doc]modify job manger doc (#1957)
amber-moe Mar 26, 2020
82e4b48
Fix delete verticse (#1970)
Mar 26, 2020
1c1aae5
Fix the read performance issue after delete range with rocksdb-5.15.1…
dangleptr Mar 26, 2020
f114b21
Remove the LOG(FATAL) when encounting the unknown log type (#1978)
dangleptr Mar 26, 2020
f940ddb
1,Improve customer friendliness; 2, fixed typo error (#1980)
bright-starry-sky Mar 26, 2020
f08cc44
upgrade spark download address (#1981)
Mar 26, 2020
b14428f
fix-typo-in-doc (#1976)
Liuxue-Yang Mar 26, 2020
f81ec23
modify commands in build doc (#1969)
amber-moe Mar 26, 2020
cd6e965
modify log level (#1945)
laura-ding Mar 27, 2020
249b46c
use bloom filter, add event listener to collect stats of compaction, …
critical27 Mar 27, 2020
7d838d4
Update the interface atomicOp to support empty string (#2002)
dangleptr Mar 27, 2020
5a203d9
update to rc4 (#1968)
Mar 30, 2020
576d62e
Fixed if you execute "go from xx over *", and when there is no edge u…
monadbobo Mar 30, 2020
0297487
[doc]pr-commit-msg (#1993)
amber-moe Mar 30, 2020
a45eb66
doc:modify ttl query (#2006)
amber-moe Mar 30, 2020
6e79fe0
Let merge coverage report faster by fastcov instead of lcov. (#1943)
Shylock-Hg Mar 30, 2020
76e2529
Auto check keyword (#1922)
laura-ding Mar 30, 2020
4e434a5
Fix coredump for update if encountering bad format row (#2024)
dangleptr Mar 31, 2020
f4c8361
fixed loop depend problem for compile link (#1995)
bright-starry-sky Mar 31, 2020
f9a2a08
Check all reader is null or not before using it (#2029)
dangleptr Mar 31, 2020
9082f41
fix go without yield return errror result (#2012)
panda-sheep Mar 31, 2020
00ad503
fixed bug for delete vertex without edge (#2001)
monadbobo Mar 31, 2020
a5b7c9f
add alias for lookup (#2000)
bright-starry-sky Mar 31, 2020
70a0601
fix bug 1990/1991 (#2007)
liuyu85cn Mar 31, 2020
9fee5de
upload package to oss (#1972)
laura-ding Apr 1, 2020
7fa476e
Merge branch 'v1.0.0-rc4' into mergemaster
jude-zhu Apr 1, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
name: build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os:
- centos6
Expand Down Expand Up @@ -58,7 +59,12 @@ jobs:
-DCMAKE_C_COMPILER=clang \
-DENABLE_ASAN=on \
-B build/
- name: Make with one thread
if: matrix.compiler == 'gcc-9.2' && matrix.os == 'centos7'
run: |
cmake --build build/
- name: Make
if: matrix.compiler != 'gcc-9.2' || matrix.os != 'centos7'
run: |
cmake --build build/ -j $(nproc)
- name: CTest with multiple thread
Expand Down Expand Up @@ -90,10 +96,8 @@ jobs:
if: success() && matrix.compiler == 'gcc-9.2' && matrix.os == 'centos7'
run: |
set -e
/usr/local/bin/lcov --version
/usr/local/bin/lcov --capture --gcov-tool $GCOV --directory . --output-file coverage.info
/usr/local/bin/lcov --remove coverage.info '*/opt/vesoft/*' -o clean.info
bash <(curl -s https://codecov.io/bash) -Z -f clean.info
fastcov -o coverage.info -g $GCOV -l --exclude=/opt/vesoft/ --exclude=scanner.lex
bash <(curl -s https://codecov.io/bash) -Z -f coverage.info
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
shell: bash
13 changes: 12 additions & 1 deletion .github/workflows/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
schedule:
- cron: '0 18 * * *'
push:
# Releases are all branch based, and the branch package here is for testing.
branches:
- 'v[0-9]+.*'
paths-ignore:
Expand All @@ -30,10 +31,20 @@ jobs:
shell: bash
- name: Compute version
id: version
env:
CPACK_OUTPUT_DIR: build/cpack_output
run: |
[[ "${{ github.event_name }}" == "push" ]] && \
echo "::set-output name=version::$(cut -d/ -f3 <<< ${{ github.ref }})" || \
echo "::set-output name=version::nightly"
(echo "::set-output name=version::nightly"
cd $CPACK_OUTPUT_DIR && \
filename=$(find . -type f \( -iname \*.deb -o -iname \*.rpm \) -exec basename {} \;)
echo "::set-output name=filepath::$CPACK_OUTPUT_DIR/$filename")
shell: bash
- name: upload oss
if: github.event_name != 'push'
run: |
./ci/scripts/upload-oss.sh OSS_ENDPOINT=${{ secrets.OSS_ENDPOINT }} OSS_ID=${{ secrets.OSS_ID }} OSS_SECRET=${{ secrets.OSS_SECRET }} filepath=${{ steps.version.outputs.filepath }} nightly=true
shell: bash
- uses: actions/upload-artifact@v1
with:
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/pull_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
needs: lint
runs-on: self-hosted
strategy:
fail-fast: false
matrix:
os:
- centos7
Expand Down Expand Up @@ -110,10 +111,8 @@ jobs:
if: success() && matrix.compiler == 'gcc-9.2' && matrix.os == 'centos7' && steps.ignore_docs.outputs.num_source_files != 0
run: |
set -e
/usr/local/bin/lcov --version
/usr/local/bin/lcov --capture --gcov-tool $GCOV --directory . --output-file coverage.info
/usr/local/bin/lcov --remove coverage.info '*/opt/vesoft/*' -o clean.info
bash <(curl -s https://codecov.io/bash) -Z -t $(cat /etc/action/secrets/codecov) -f clean.info
fastcov -o coverage.info -l --exclude=/opt/vesoft/ --exclude=scanner.lex
bash <(curl -s https://codecov.io/bash) -Z -t $(cat /etc/action/secrets/codecov) -f coverage.info
shell: bash
- name: Cleanup
if: always()
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,9 @@ jobs:
run: |
./ci/scripts/upload-github-release-asset.sh github_token=${{ secrets.GITHUB_TOKEN }} repo=${{ github.repository }} tag=${{ steps.vars.outputs.tag }} filepath=${{ steps.vars.outputs.filepath }}
./ci/scripts/upload-github-release-asset.sh github_token=${{ secrets.GITHUB_TOKEN }} repo=${{ github.repository }} tag=${{ steps.vars.outputs.tag }} filepath=${{ steps.vars.outputs.shafilepath }}
./ci/scripts/upload-oss.sh OSS_ENDPOINT=${{ secrets.OSS_ENDPOINT }} OSS_ID=${{ secrets.OSS_ID }} OSS_SECRET=${{ secrets.OSS_SECRET }} tag=${{ steps.vars.outputs.tag }} filepath=${{ steps.vars.outputs.filepath }}
./ci/scripts/upload-oss.sh OSS_ENDPOINT=${{ secrets.OSS_ENDPOINT }} OSS_ID=${{ secrets.OSS_ID }} OSS_SECRET=${{ secrets.OSS_SECRET }} tag=${{ steps.vars.outputs.tag }} filepath=${{ steps.vars.outputs.shafilepath }}
shell: bash
- name: upload release artifacts
uses: actions/upload-artifact@v1
with:
name: ${{ matrix.os }}-release
path: build/cpack_output

docker:
name: build docker images
Expand Down
139 changes: 139 additions & 0 deletions .linters/cpp/checkKeyword.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
# signout--coding:utf-8--

# Copyright (c) 2019 vesoft inc. All rights reserved.
#
# This source code is licensed under Apache 2.0 License,
# attached with Common Clause Condition 1.0, found in the LICENSES directory.

import os
import sys
import re


PASER_FILE_PATH = 'src/parser/parser.yy'
SCANNER_FILE_PATH = 'src/parser/scanner.lex'

reserved_key_words = [
'KW_GO',
'KW_AS',
'KW_TO',
'KW_OR',
'KW_AND',
'KW_XOR',
'KW_USE',
'KW_SET',
'KW_FROM',
'KW_WHERE',
'KW_MATCH',
'KW_INSERT',
'KW_YIELD',
'KW_RETURN',
'KW_DESCRIBE',
'KW_DESC',
'KW_VERTEX',
'KW_EDGE',
'KW_EDGES',
'KW_UPDATE',
'KW_UPSERT',
'KW_WHEN',
'KW_DELETE',
'KW_FIND',
'KW_LOOKUP',
'KW_ALTER',
'KW_STEPS',
'KW_OVER',
'KW_UPTO',
'KW_REVERSELY',
'KW_INDEX',
'KW_INDEXES',
'KW_REBUILD',
'KW_INT',
'KW_BIGINT',
'KW_DOUBLE',
'KW_STRING',
'KW_BOOL',
'KW_TIMESTAMP',
'KW_TAG',
'KW_TAGS',
'KW_UNION',
'KW_INTERSECT',
'KW_MINUS',
'KW_NO',
'KW_OVERWRITE',
'KW_SHOW',
'KW_ADD',
'KW_CREATE',
'KW_DROP',
'KW_REMOVE',
'KW_IF',
'KW_NOT',
'KW_EXISTS',
'KW_WITH',
'KW_CHANGE',
'KW_GRANT',
'KW_REVOKE',
'KW_ON',
'KW_BY',
'KW_IN',
'KW_DOWNLOAD',
'KW_GET',
'KW_OF',
'KW_ORDER',
'KW_INGEST',
'KW_COMPACT',
'KW_FLUSH',
'KW_SUBMIT',
'KW_ASC',
'KW_DISTINCT',
'KW_FETCH',
'KW_PROP',
'KW_BALANCE',
'KW_STOP',
'KW_LIMIT',
'KW_OFFSET',
'KW_GROUP',
'KW_IS',
'KW_NULL',
'KW_FORCE',
'KW_RECOVER'
]


def get_unreserved_keyword(file_path):
parser_file = open(file_path)
flag = 0
unreserved_key_words = []
for line in parser_file.readlines():
if line.strip() == 'unreserved_keyword':
flag = 1
continue
if flag == 1:
if line.strip() == ';':
break
unreserved_key_words.append(re.sub('\\s+[:|]\\s+(\\w+)\\s+.*', '\\1', line).strip())
continue

parser_file.close()
return unreserved_key_words


if __name__ == '__main__':
cmd = 'git diff --diff-filter=ACMRTUXB HEAD -p ' + SCANNER_FILE_PATH + '|grep "^+"|grep -v "^+++"|grep "KW_"'
content = os.popen(cmd)
keywords=[]
for line in content.readlines():
keyword = re.sub('.*(KW_\\w+)\s*;.*','\\1',line.strip())
keywords.append(keyword)

if len(keywords) == 0:
exit(0)
unreserved_key_words = get_unreserved_keyword(PASER_FILE_PATH)
new_key_words = [word for word in keywords if word not in reserved_key_words]
if len(new_key_words) == 0:
exit(0)
result = [word for word in new_key_words if word not in unreserved_key_words]
if len(result) == 0:
exit(0)
print('Keywords \"{}\" in src/parser/scanner.lex are not in the unreserved keyword list.'.format(result))
print('Please add them to the unreserved keyword in the src/parser/parser.yy.')
exit(1)
9 changes: 9 additions & 0 deletions .linters/cpp/hooks/pre-commit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@
# attached with Common Clause Condition 1.0, found in the LICENSES directory.

CPPLINT=`dirname $0`/../../.linters/cpp/cpplint.py
CHECKKEYWORD=`dirname $0`/../../.linters/cpp/checkKeyword.py

echo "Performing checkout keyword..."
python $CHECKKEYWORD

if [ $? -ne 0 ]; then
echo "Checkout keyword failed"
exit 1
fi

if [ $# -eq 0 ];then
# Since cpplint.py could only apply on our working tree,
Expand Down
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ project("Nebula Graph" C CXX)

# Set the project home dir
set(NEBULA_HOME ${CMAKE_CURRENT_SOURCE_DIR})

if(${CMAKE_SYSTEM_NAME} MATCHES "(Darwin|FreeBSD|Windows)")
MESSAGE(FATAL_ERROR "Only Linux is supported")
endif ()

# To include customized FindXXX.cmake modules
set(CMAKE_MODULE_PATH "${NEBULA_HOME}/cmake" ${CMAKE_MODULE_PATH})
include(LinkerConfig)
Expand Down
32 changes: 32 additions & 0 deletions ci/scripts/upload-oss.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/usr/bin/env bash
#
# This script upload package to oss.
#
# - OSS_ENDPOINT
# - OSS_ID
# - OSS_SECRET
# - filepath
# - tag
# - nightly
#
# Example:
#
# upload-oss.sh OSS_ENDPOINT=xxx OSS_ID=xxx OSS_SECRET=xxx tag=v0.1.0 filepath=xxx
# upload-oss.sh OSS_ENDPOINT=xxx OSS_ID=xxx OSS_SECRET=xxx filepath=xxx nightly=true

set -e

for op in $@; do
eval "$op"
done

if [[ $nightly != "" ]]; then
OSS_SUBDIR=`date +%Y%m%d`
OSS_URL="oss://nebula-graph/build-deb"/nightly/${OSS_SUBDIR}
else
OSS_SUBDIR=`echo $tag |sed 's/^v//'`
OSS_URL="oss://nebula-graph/build-deb"/${OSS_SUBDIR}
fi

echo "Uploading oss... "
ossutil64 -e ${OSS_ENDPOINT} -i ${OSS_ID} -k ${OSS_SECRET} -f cp ${filepath} ${OSS_URL}/$(basename ${filepath})
2 changes: 1 addition & 1 deletion cmake/LinkerConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ execute_process(
OUTPUT_STRIP_TRAILING_WHITESPACE
)

if (${default_linker_type} STREQUAL "ld")
if ("${default_linker_type}" STREQUAL "ld")
set(default_linker_type "bfd")
endif()

Expand Down
Loading